Game Development Community

Freezing the Sim

by Dusty Monk · in Torque 3D Professional · 03/22/2011 (4:33 pm) · 5 replies

Has anyone done something like this, or could someone maybe point me to a resource or the best places in the code to poke at to achieve this?

What I'd like to do is implement a full-blown pause of the sim - a pause button. The renderer of course, would continue to run, but everything that is ticked in the sim would be not updated until the sim is unpaused. So particle effects, animations, player movements, everything is paused. Any pointers, links, suggestions or caveats would be appreciated.

Thanks,

Dusty

About the author

Dusty Monk is founder and president of Windstorm Studios, an independant game studio. Formerly a sr. programmer at Ensemble Studios, Dusty has worked on AAA titles such as Age of Empires II & III, and Halo Wars.


#1
03/22/2011 (5:03 pm)
There's the old $timescale global. Setting it to 0 freezes *most* of the sim -- have forgotten just what it does and doesn't pause though.
#2
03/22/2011 (7:07 pm)
Ah, good old $timescale, I loved it in Tribes 2, and I still love it, great for accomplishing slow motion portions of my missions :).
#3
03/23/2011 (1:56 am)
It would be nice if there is a timescale for the shader driven stuff (foliage,forest kit,..)
#4
03/28/2011 (8:04 am)
I seem to recall that $timeScale doesn't freeze the schedules.

Nicolas Buquet
www.buquet-net.com/cv/
#5
03/28/2011 (9:15 am)
@Nicolas: it does. Schedules are driven by simulation time, and it causes all sorts of headaches when you try to use them with the simulation paused.