We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm prototyping a small multilevel game using Hermes.
I'm trying to figure out the best way to freeze a world when the user wants to pause the game: is there a smart way to do that?
Also, I'm thinking of organizing the game in several worlds (one for each level, plus the intro, and other sections). My Idea is that a level that ends will call a worlds "manager" in its shutdown() method, the manager knows what to do and juggles among the various worlds. Does this sound right?
Thanks!
Answers
Use the
deactivatemethod to pause, then re-callstartto resume. You may want to include a bool member variable called_initialized; when it is false,setupwill perform initial set-up and flip it totrue, and when it is true,setupwill do whatever adjustments it needs to make to the current state of the system to resume.Your concept for a "WorldManager" sounds good to me. It's likely something that should have gone in Hermes v1, but we overlooked. If you write something good that generalizes nicely, you should submit it via pull request to Hermes! https://github.com/rdlester/hermes