Can I switch off the "game clock?"
by Timlon · in Torque Game Engine · 02/23/2005 (3:40 am) · 11 replies
Hi,
A strange request this one. Basically I want to make an avi of my demo to put onto dvd. I have an app I write that reads in a list of individual frames and builds an avi for burning onto dvd.
My problem is I can save screenshots a name them within my Torque demo - but I don't want the engine to update based on time elapsed - normally this is a good thing as the game runs the same effective speed on all machines, but for my demo saving out files constantly it is not a good thing.
Is there a function to turn off this feature so my demo runs frame based rather than time based? OR alternatively a "pause" function that will pause the game so i can save my file, and then "un-pause" my demo again?
Thanks :)
A strange request this one. Basically I want to make an avi of my demo to put onto dvd. I have an app I write that reads in a list of individual frames and builds an avi for burning onto dvd.
My problem is I can save screenshots a name them within my Torque demo - but I don't want the engine to update based on time elapsed - normally this is a good thing as the game runs the same effective speed on all machines, but for my demo saving out files constantly it is not a good thing.
Is there a function to turn off this feature so my demo runs frame based rather than time based? OR alternatively a "pause" function that will pause the game so i can save my file, and then "un-pause" my demo again?
Thanks :)
About the author
#2
Thanks for the reply.
I don't actually need to pause the game necesarily, what I am worried about is the time elapsed between saving the screenshot (which will be automatic - 25 times a second ) and the game carrying on after the screenshot - the engine seems to handle "tweening" internally to keep the game running the same speed whatever machine you have. For instance if your machine runs my game at 10fps and mine at 60, the time it takes you to run from one end of the level to the other is the same - because the engine "tweens" everything on both our machines. Im concerned that saving the screenshot which had that effect on the game. Ideally what i want to do is either pause the game timing itself so it does not take any notice of the time elapsed between saving the screen shot or switch of the timing part altogether so the game becomes frame based rather than time based.
02/23/2005 (5:28 am)
Hi Eric,Thanks for the reply.
I don't actually need to pause the game necesarily, what I am worried about is the time elapsed between saving the screenshot (which will be automatic - 25 times a second ) and the game carrying on after the screenshot - the engine seems to handle "tweening" internally to keep the game running the same speed whatever machine you have. For instance if your machine runs my game at 10fps and mine at 60, the time it takes you to run from one end of the level to the other is the same - because the engine "tweens" everything on both our machines. Im concerned that saving the screenshot which had that effect on the game. Ideally what i want to do is either pause the game timing itself so it does not take any notice of the time elapsed between saving the screen shot or switch of the timing part altogether so the game becomes frame based rather than time based.
#4
02/23/2005 (8:08 am)
Hi Todd - fraps is indeed quite good but I have a reason for wanting to do this. I aim to create a what could be termed as a "Cartoon Maker" where users can "act out" scenes which will be recorded to a file (data describing the actions performed) and then "played" back so they can watch, and finally recorded as an avi. I would like everything to be done inside my app rather than using 3rd party apps. I have done this effectively in several other engines and have a nice routine to build an avi from a sequence of screenshot files. All i need to be able to do is stop Torque from performing any compensation on the game due to the lapse in time of saving each screenshot.
#5
02/23/2005 (11:03 am)
I think Sim::AdvanceTime() is the chap i need to fiddle with in the engine source to achieve this - am I right?
#6
Play a recording at a reduced speed
Automatically take screenshots every X ms
There were some scripts for this for Tribes / Tribes 2, you might be able to find them if you look on google.
02/23/2005 (11:37 am)
There is a variable called $timeScale, you can use it to slow down or speed up the playback of a recording. Using this with a function and schedules you can do the following.Play a recording at a reduced speed
Automatically take screenshots every X ms
There were some scripts for this for Tribes / Tribes 2, you might be able to find them if you look on google.
#7
02/23/2005 (12:30 pm)
They are already built into the TGE demo scripts.
#8
02/23/2005 (1:20 pm)
Ah I see Timlon, when you said "I want to make an avi of my demo" I assumed thats what you meant. I didn't realize you were trying to implement a feature for your game.
#9
thanks too Gonzo - I'll have a look (any ideas where?)
Todd - no problem, I really did not explain myself very welll at all the first time (and only barely the second!).
02/23/2005 (3:13 pm)
Great idea Harold thanks :) thanks too Gonzo - I'll have a look (any ideas where?)
Todd - no problem, I really did not explain myself very welll at all the first time (and only barely the second!).
#10
02/23/2005 (6:18 pm)
Screenshot.cs I think
#11
02/24/2005 (2:11 am)
Thanks for your help again Gonzo :)
Torque Owner Eric Lavigne