Game Development Community

Timescale applied individually

by Robert Stewart · in Torque Game Engine · 11/05/2005 (1:49 pm) · 10 replies

I was just wondering what it would take to give each object its own $timescale, I tried changing dt in advanceTime to other values, it slows down animation, it just dosent slow down the players movement.

Where is a good place to start working on this?

#1
11/05/2005 (1:57 pm)
TGE 1.4 has some code to do this - ITickable is the interface.

Basically, for this case, though, you'd have to track each object's time seperately and apply individual scaling.
#2
11/06/2005 (12:12 pm)
What about classes that already are getting ticked? ITickable is not making much sense to me, how much work am I looking at for making this work with the Player class?
#3
11/13/2005 (3:34 am)
Gah, that'd be perfect for my battle system! Turn based semi-real time, when a players turn comes up. i want to freeze frame everything cept the camera and the "active" character, so i can input commands and stuff. Think Grandia 2+
#4
11/13/2005 (7:49 am)
Hey that would be a kewl idea for a FFIX style RPG too.
#5
05/30/2006 (3:22 am)
Now that 1.4 is out and what not, can anyone PLEASE explain how to go about actually going about using this Itickable to work like multiple Timescales?
#6
05/30/2006 (2:35 pm)
Maybe Ben could elaborate? Or someone could point me towards some tutorials on this Itickable function.
#7
05/30/2006 (3:02 pm)
Itickable was never actually implemented on the core classes, I think it's somewhere on the list of things to do, dunno if 1.42 has it, but I doubt it. The only example of it's implementation in the engine is I think on the TickableGUI or somesuch, which is just a holder example for how it could be used to do procedural GUI's
#8
05/31/2006 (4:38 am)
That saddens me greatly. Now i gotta do all sorta of hacks in who know's how many Processticks.....
#9
05/31/2006 (11:31 am)
Honestly I think you are going about this from the wrong direction--so it might make sense to list your actual requirements so we can help come up with a proper design. In any case, you do not want to be hacking at advanceTime, interpolateTick, and processTick without knowing quite a lot of the theory of the networking, physics, and movement system.

For those in the thread, all the iTickable class does is to provide objects that are not derived from GameBase the ability to receive game ticks (and therefore be simulation time "aware")--a basic example is a Gui interface that may need to be directly time aware.
#10
05/31/2006 (3:50 pm)
I see. So ben's comments were a tad misleading.

Alright. I'll try to list my requirements by stating a little more about my project.

I'm making a single player, console style RPG. the most typical example of a console style RPG is turn based battle. Ealier games it was pretty simple. Everyone would simply take turns attacking.

However, games are more advanced now.

In my battle system. characters and monsters are able to move around on the map during attacking, defending, retreating and what not. Turns are "counted up". it's based on their speed and what not. anyhow a visible meter is seen, and when players turns come up, I want all action to "pause" while decisions are being made from a command menu. Attack,magic,etc. Once a command has been made, the action would unpause, and the character will then run over and attack, or cast magic, etc.

The reason i want a pause is so characters can take their time making decisions. being able to see the monsters running toward you, and you having time to recact by defending or some other action. I want to be able to keep monsters/players suspended in the air if they are knocked upwards/back/etc.

Esentially, i want all movment,except camera control, the active character, and perhaps some other special effect objects like pointers, to stop while decisions are being made.


this morning i did do some hacking to processtick and updateanimation of player, and shapebase to add a conditional. I am able to set it to pause all the objects in their tracks, and another to allow the object to function normally while everything else is in a state of limbo. This does seem to do what i want, however i need to ensure that the animation is resuming exactly where it left off and it should be fine.

movies.rpgamer.com/grandia/grandia3/grandia3011.mov
Here's a video clip from the PS2 RPG Grandia 3. It has exactly the type of pausing i am looking for.

Thanks for reading, hope someone can help out.