@ccc I believe it’s written in Python 2.7, because the XCode template for Pythonista only supports Python 2 code.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Posts made by ScriptNasty
-
RE: MapMan (made in Pythonista) Available NOW in the App Store
-
RE: Can Someone Turn This Script Into a ‘Node’ Tutorial, Please?
@Phuket2 Wow, that definitely solved the alignment issue! But OP is still hoping someone can convert this memory card game into a “Tutorial.” Maybe in the same format as the Alien Game that Ole provided within the examples of Pythonista.
-
RE: Can Someone Turn This Script Into a ‘Node’ Tutorial, Please?
@JonB The default is definitely the center of the sprite, that’s why it doesn’t make sense that the same logic to center the layer objects wouldn’t work for the node objects.
-
RE: Can Someone Turn This Script Into a ‘Node’ Tutorial, Please?
@ccc I reviewed your PR and approved it; thank you for the pro tips and etiquette!
-
RE: Can Someone Turn This Script Into a ‘Node’ Tutorial, Please?
@enceladus Now that is a great starting point! Thank you for your timly response and contribution! I’ve definitely enjoyed looking through your scripting style and techniques. Do you know why the cards refuse to be in the center of the screen? I attempted making the cards once myself, out of Nodes, and I was unable to get them center as well. I roughly used the same exact logic that rcruz used with his Layers format of the cards, and they always seem to favor a more low-left output... No idea why...
-
RE: Can Someone Turn This Script Into a ‘Node’ Tutorial, Please?
@ccc I’ve, too, dabbled with swapping xrange(len(images)) for range(0, len(images)) in an attempt to produce an equivalent outcome, However, the output always seems to positions the cards in somewhat of an “ascending staircase” pattern... I have no idea as to why. Hah
-
RE: Can Someone Turn This Script Into a ‘Node’ Tutorial, Please?
Here’s my current rendition of rcruz63’s Cards.py. I’ve turned the game board into a 5x5 layout with 12 pairs of face emojis and a ‘Wild’ imp face emoji, and adding a bit more functionality to the user interface and experience. I don’t understand enough about classes and the scene.Node format to be able to convert the entirerty of the game, so I still had to use the scene_drawing.Layer format.
I welcome constructive critisim and pointers, so please fire away!
https://github.com/ScriptNasty/MemoryCards.py/blob/master/MemoryCards.py
-
RE: Can Someone Turn This Script Into a ‘Node’ Tutorial, Please?
Oh, and please script it to be OOP, having classes and such! Thank you!
-
Can Someone Turn This Script Into a ‘Node’ Tutorial, Please?
Hey there everyone. I’m new to the fourms; it’s nice to meet you all. So, I’m just a humble taxi driver trying to become a programmer with the help of Ole’s amazing contribution to the Python community (Thank you very kindly for all your hard work and dedication. The Pythonista app is absolutely astounding!) By the way, I’d just like to add: I’d gladly pay you another $10 for a “Code-folding” feature (haha).
As of right now, I've got under a years worth of experience with the study of Python. Notably, I’ve been focusing on 2D game development by studying rcruz63's "Cards.py" script, amongst other open-source contributions, to learn the fundamentals and basics of game development and programming in general.
I've amounted a decent grasp of how the Layer objects operate within Pythonista, but am truly looking to have a better understanding of the scene.Node(s). If someone wouldn't mind (and I understand a lot of you are professional programmers and probably tied up with life to the fullest extent) converting rcruz63's 'Cards.py' script into a Scene.Node tutorial, that's Python 3.6 compatible, I'd be tremendously grateful and thankful for your time and energy!
Here's a link to rcruz's 'Cards.py' script:
https://gist.github.com/rcruz63/5195131
Thanks in advance, guys and gals!