This is a kind of FAQ, and the answer of GoToLoop is indeed the most answered reply...
General advice is to make a function, eg. named initSketch(), which is called in setup() to initialize all global variables, and to call when you need to restart. Obviously, some things like loading of images doesn't need to be done again, so they remain in setup().
Leave a comment on PhiLho's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic