Posted: 22nd Aug 2011 3:16
Hey guys,

Is there a command to reset the program?


Cheers.
Posted: 23rd Aug 2011 6:10
What do you mean? If you mean reset at game over or such no, you have to do that yourself by changing any variables etc that you have used back to the required settings. But I could be misunderstanding the question. I don't think there is a way to close and restart if that is what you mean.
Posted: 23rd Aug 2011 8:23
Goto home and Home at the top...

But you would have to delete all sprites and set all variables again
Posted: 23rd Aug 2011 10:01
Goto = No!!!!!!!!!!!!
Posted: 28th Aug 2011 6:06
Restarting your program is actually part of your logic, i.e.:

WHILE MAINLOOP=1
`
LOAD IMAGE
`
WHILE GAMELOOP=1
`
GAME LOGIC
`
ENDWHILE
`
DELETE IMAGE
`
ENDWHILE

As you can see, as your program ends the game loop and then loops around the master/main loop, your resources are managed in the outer loop. It's always a good idea to ensure your variables are reset at the right point in your nested loops, and that you delete any resources once you have finished with them, to keep your code clean and symmetrical. It's takes a little extra time, but you'll be thankful a few days/weeks down the road when you are trying to find memory hogging code and going back to reset variables you forgot about early on.