On 12/11/2017 07:27 AM, Dennis Lee Bieber wrote: > On Sun, 10 Dec 2017 16:05:37 -0800 (PST), Lauren Porter > <lnporte...@gmail.com> declaimed the following: > >> Hello all! I've been trying to create a game in Python Processing ^^^^^^^^^^^^^^^^^^^^ Seems like most of the replies missed this information. http://py.processing.org/
>> where a spaceship moves horizontally in order to miss a collision with >> an asteroid. >> <snip> > Global variables are seldom the proper solution -- especially if, as > you say, you have classes (in which case you likely should be > providing an instance of the class and modifying its contents) Except that with Processing, global variables are the only way to share things between the setup() function and the loop() function, since both are called directly by the framework. > And NO SIGN of a main program to actually call any of it. You've > defined a half dozen functions, and a few classes, but nothing to run any > of it. This is a python script that runs within the Processing framework, so it has no "main program" in the traditional sense. setup() and loop() are the entry points. Unfortunately this is confusing both to us on the mailing list and to the original poster, as I doubt very few of us use the Processing framework (unless you've worked with Arduino), and the OP is led to think that Python Processing is the same thing as generic Python (which it kind of is...). The OP probably will want to consult with the community at the Processing website (https://forum.processing.org/two/). -- https://mail.python.org/mailman/listinfo/python-list