Game Development Community

Advanced time control

by Wombah · in Torque Game Engine · 03/13/2006 (2:49 am) · 2 replies

I'm looking into controlling the passing of time within the game I'm currently planning. I found this thread on the subject, but it doesn't give me the level of control that I want. Now, I'm considering diving into the engine to see what i can do to control time separately for things like animations, physics and input, but first I'd like to see if anyone has already done this and/or thinks this is a can of worms best left unopened.

What I'd like is a play/pause/slow/fastforward button for animations and physics that do not interfere with user input/networking etc. As an example, I'd use this for playing a sequence of a 3rd person rpg in slow motion while the player can still look around with his/her orbitcam and choose actions in realtime. Not sure I'm making myself clear, but if it's any consolation I've gor a clear image of it in my head. :)

edited for correct linking

#1
03/13/2006 (6:19 am)
Also found this thread on the same subject. Has anyone done any more work on this, or did it prove to be too much work to be feasible? I'm not intimately familiar with torque (yet), but I'm fairly competent with gameprogramming and C++ in general. If i decide to try this it is at least partially as a chance to get to know torque a bit better.
#2
03/16/2006 (4:11 am)
I take it no one has done any work with this that they're willing to share and/or no one has an opinion on how complex this would be so I guess I'll just give it a shot myself.

So, my next question is what features ppl would like to see in a time-control resource. Not saying I'm going to try to make one, or succeed if I do try. Just trying to get a feel for what different capabilities would be useful, and hence where to start with this.

These are the suggestions I've come up with so far;

Control time for animations
This is already (partially) supported in TSthread::timeScale. Grouping animations together and setting speeds on the whole group might be useful, as well as a global speed for all animations.

Control time for the physics simulation
Haven't looked at this at all so far, but I assume theres a processTick() or similar somewhere that is a good start. Physics sim speed is controlled globally only I would think.

Control time for sounds
Haven't looked here either, but pitching sounds differently seems basic enough. Grouping sounds together same as animations might be useful.

In-game clock
Basically just a clock that slows down/speeds up when the sim does. Allows you to time things as if it were realtime even when sim is running slo-mo e.g. Only interesting if all timecontrol is made globally, if at all.

Script tie-ins for all of the above