Socoder -> Monkey -> Restart/Retry functionality
|Posted : Monday, 17 March 2014, 15:43|
How do you guys normally handle your restart/retry functionality in your Monkey games?
I'm thinking I just need to clear out all of my lists, reset the player position, and reset any other relevant variables.
Or do you normally delete all objects (such as Player, Level, etc) and recreate them?
Example source welcome
|Posted : Monday, 17 March 2014, 15:53|
Most of my games play out inside big giant arrays, so clearing out to restart is simply a case of a giant for-loop that resets it all.
As well as that, I try to ensure that a level loader function empties any per-level stuff, whilst loading, so I wouldn't just do "level width x level height", I'd do the entire array, to ensure there's no random leftovers outside the boundary of the level.
''Load, Next List!''