Jump to content

Source Engine demo recording system


smashthewindow
 Share

Recommended Posts

Does anyone know how the demo recording system in Source engine is done?

I would like to implement something similar in my game, but I am absolutely clueless on how to do this.

My initial thought is to save the absolute positions of every entity per frame into an XML file and then move every entity accordingly during demo replay.

But my current solution would probably end up with giant XML files and game crashing when trying to load the XML file. (I currently use TinyXML as my XML library.).

Thanks.

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

..what would be exactly 'demo recording system' ? Cut scene system or replay system for certain actions or..?

 

https://developer.valvesoftware.com/wiki/Demo_file

https://developer.valvesoftware.com/wiki/Demo_Recording_Tools

 

It's mainly used to create high-quality game recordings (export to picture frame by frame, edit by something like virtualdub).

I need something like this.

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

..this can be done rather easy actually..only thing you have to save is time related to certain animation, first frame of that animation at the moment capture started, and time when animation changed to some other animation/corresponding frame..this data should be enough to be able to recreate complete and 100% identical events during gameplay and its not heavy at all as you capturing only changing states at specific time...this also considering that you controling your animations per frame/time and not as it is by default in LE.

 

Link to comment
Share on other sites

..this can be done rather easy actually..only thing you have to save is time related to certain animation, first frame of that animation at the moment capture started, and time when animation changed to some other animation/corresponding frame..this data should be enough to be able to recreate complete and 100% identical events during gameplay and its not heavy at all as you capturing only changing states at specific time...this also considering that you controling your animations per frame/time and not as it is by default in LE.

And how are you recording entity positions?

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

..positions should be stored in similar fashion..long as direction vector is not changed, motion is in function of time you recording already..once direction vector is changed, you have to save it with new time start, until its changed again..on that way you will end up with rather small file size and it will be rather easy to reconstruct everything from this very few parameters..

 

Link to comment
Share on other sites

..positions should be stored in similar fashion..long as direction vector is not changed, motion is in function of time you recording already..once direction vector is changed, you have to save it with new time start, until its changed again..on that way you will end up with rather small file size and it will be rather easy to reconstruct everything from this very few parameters..

Ok, I can give that a try.

Thanks for the reply.

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...