Jun-07-2020, 02:47 PM
I would like to create a structure sort of like "Processing" in Java, where someone writes a short python script with the following structure:
How close can I get to that goal?
import mygamelib def setup(): ... do stuff that happens once def loop(): ... do stuff that happens repeatedly in a loopAnd the contents of mygamelib - which I am writing - causes the setup function to be called once, and the loop function to be called over and over again. And I would like it to look exactly as above. I know that if I allow the adding of more variables, or change it into a while loop I can achieve functionally the same but my design requirement is that it is as simple as above.
How close can I get to that goal?