Demo recording is fixed and in...
by Mark Frohnmayer · in Torque Game Engine · 05/30/2002 (5:38 pm) · 32 replies
Hey all,
Just finished checking in the modifications necessary to get demo recording working properly. In addition to recording the state of the objects with the demo, you can now tag variables onto ServerConnection (prefixed with "demo") and they will also be archived into the demo stream. I haven't had a chance to cook up a recordings gui for RealmWars (I have to go to dinner :) but there is one in the fps mod.
Let me know if you run into any problems with it...
- Mark
Just finished checking in the modifications necessary to get demo recording working properly. In addition to recording the state of the objects with the demo, you can now tag variables onto ServerConnection (prefixed with "demo") and they will also be archived into the demo stream. I haven't had a chance to cook up a recordings gui for RealmWars (I have to go to dinner :) but there is one in the fps mod.
Let me know if you run into any problems with it...
- Mark
About the author
#22
Has anybody else looked into this? At least the fxReplicator stuff really should be recorded... I have no idea why it isn't... :(
I was about to write a little "Cinematic editor", but if the core recording functionality isn't working properly I guess it makes no sense to even start such a thing... :(
Edit: maybe it's the old client/server issue... the recording only records server events (I assume), and neither fxReplicator objects nor ogg sounds etc. are rendered / played on the server...?
Question then is: how to fix / compensate this? Any ideas anyone? Melv? ;)
02/19/2003 (1:01 am)
Hm, 8 months after my initial questions Mark still hasn't anwered... I guess he just doesn't visit the forums anymore... :'-(Has anybody else looked into this? At least the fxReplicator stuff really should be recorded... I have no idea why it isn't... :(
I was about to write a little "Cinematic editor", but if the core recording functionality isn't working properly I guess it makes no sense to even start such a thing... :(
Edit: maybe it's the old client/server issue... the recording only records server events (I assume), and neither fxReplicator objects nor ogg sounds etc. are rendered / played on the server...?
Question then is: how to fix / compensate this? Any ideas anyone? Melv? ;)
#23
02/19/2003 (7:10 am)
If you have seen the fxGrassReplicator avi you'll see it is recorded. So it is possible. I haven't looked into demo recording yet, and if no one has posted anything about this by then i'll spend some serious time looking at it.
#24
02/19/2003 (7:14 am)
Now that is interesting... so maybe I should check the differences between Melv's code and the fxGrass stuff... thx for the hint! :D
#25
I've not looked into the recording system in Torque but as far as I understand typical simulation recorders, they only record external input events and rely on object invariance to do the rest consistently.
I assume that a Torque recording would simply start the mission as normal and feed the engine with the recorded input events at the original time-frames (like key-frame animation) resulting in an exact replication of the original scene.
None of my fxObjects need to react to events and so would not be affected by a recording. The only related object would be the camera, which does react to events or more specifically is typically driven by the eyePosition of the controlling object which would respond to those kind of events.
The recorder is something I need to look at anyway for Strategem so I'll give it a look over in the next few days, maybe even tonight. I'll be sure to pass on any relevant information guys. :)
- Melv.
02/19/2003 (8:42 am)
An AVI screen-grab is not related to the recording you are talking about. I believe that the video you are referring to used "Fraps" to record the screen.I've not looked into the recording system in Torque but as far as I understand typical simulation recorders, they only record external input events and rely on object invariance to do the rest consistently.
I assume that a Torque recording would simply start the mission as normal and feed the engine with the recorded input events at the original time-frames (like key-frame animation) resulting in an exact replication of the original scene.
None of my fxObjects need to react to events and so would not be affected by a recording. The only related object would be the camera, which does react to events or more specifically is typically driven by the eyePosition of the controlling object which would respond to those kind of events.
The recorder is something I need to look at anyway for Strategem so I'll give it a look over in the next few days, maybe even tonight. I'll be sure to pass on any relevant information guys. :)
- Melv.
#26
02/19/2003 (2:44 pm)
The demo recording seems to use different script functions (for loading missions), these do not initialize the fx Objects.
#27
02/19/2003 (3:20 pm)
@Robin: what functions do you mean? got an example?
#28
When the demo recording starts, it goes through all the objects and serialises them (essentially). Presumably the de-serialisation doesnt work quite the same way on playback as in the game.
I'm sure there's a reasonably easy fix (like setting an update flag in the shape replicator to update itself at the correct time).
Phil.
02/19/2003 (3:26 pm)
I think the reason why the shape replicator isnt shown in a demo replay is because its not a bunch of shapebases.When the demo recording starts, it goes through all the objects and serialises them (essentially). Presumably the de-serialisation doesnt work quite the same way on playback as in the game.
I'm sure there's a reasonably easy fix (like setting an update flag in the shape replicator to update itself at the correct time).
Phil.
#29
A while back I went through the scripts and realized that for fxObjects (fxGrass for example), in clientCmdMissionStartPhase3 the initialization functions (StartGrassReplication() for fxGrass, etc.) are called each time a mission is loaded, but not for demo playback.
This is probably why demos don't have fxObjects. Since fxObjects are part of the mission, I don't think any changes are required to get them working in demos (other than starting them!).
02/23/2003 (1:45 pm)
Sorry, delayed.A while back I went through the scripts and realized that for fxObjects (fxGrass for example), in clientCmdMissionStartPhase3 the initialization functions (StartGrassReplication() for fxGrass, etc.) are called each time a mission is loaded, but not for demo playback.
This is probably why demos don't have fxObjects. Since fxObjects are part of the mission, I don't think any changes are required to get them working in demos (other than starting them!).
#30
Just add
and you have fxShapes and fxFoliage in your recordings ;)
09/22/2003 (10:48 am)
Just for the records, Robin was right...Just add
StartClientReplication(); StartFoliageReplication();to
function GameConnection::prepDemoPlayback(%this)in client/scripts/client.cs
and you have fxShapes and fxFoliage in your recordings ;)
#32
Thanks
11/22/2005 (6:48 am)
Any idea why would a call to screenShot would stop playpack from that instant. I allow the player to take screen shots while recoring his game. When playing back it works fine until the moment the player took a screenshot and the playback seems to stop but doesn't exit as noramlly it does when reaching the end of the recording.Thanks
Torque Owner Sabrecyd
I did notice the sfx didn't seem to record in the mission that had ogg music too - odd. The sfx recorded fine in the missions without the music.
I see Kurtis just posted an updated version. I might have to check that out.