There a known way to 'pause' the game?

I was just wondering if there was a known/given way of pausing the game. ie, they hit esc, and I want to bring up a menu, and pause the action happening on the real 3D world.

Thanks for your time,

Hmm, I suppose that you want to continue rendering, though, so that you can display the menu onscreen and respond to it.

I think it’s largely up to you to design your game’s tasks such that they can be interrupted and/or paused when necessary. One answer, for instance, is to remove any tasks and/or intervals that control game action while the menu is up (taskMgr.remove(‘taskName’), ival.pause()); another is to set a global variable that your tasks check so that they do nothing when the flag is set.

If you have many tasks that need to be stopped/started, you might find it useful to use a big FSM to manage game state; for instance, you could have a GamePaused state in which all of your tasks are paused, and a GameRunning state that starts the tasks back up again.

If you just want to stop the 3-D world from rendering (while continuing to render the 2-D controls), you could just do something like render.hide().