Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Record and rewind gameplay example

Author
Message
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 24th Jul 2010 17:02 Edited at: 24th Jul 2010 17:19
Hi all, just the results of a little experiment.

Move the mouse to look around, the camera moves forward constantly. Avoid the cubes, if you get hit, press the mouse button to rewind.

Could be good for a prince of persia type game, or even a sports game where you want instant replays. It currently uses 100,000 indices to record onto, it overwrites, so at 60fps you get about 17 seconds, thats with 100 entities being tracked. So if you had a racing game with 8 cars, it could probably record a good couple of minutes gameplay.




Health, Ammo, and bacon and eggs!
cloudy
13
Years of Service
User Offline
Joined: 30th Jun 2010
Location:
Posted: 30th Jul 2010 09:21
no bad! I like

Madscientist
14
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 1st Aug 2010 05:57
But if you say had things in the background such as people walking and other things happening, you would need to track all of their positions and angles or even animation frames right? So you might need to have a function that checks if the object has animation and if so reverse it.

If it hasn't exploded yet, I haven't touched it.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Aug 2010 09:17
Yeah, I would add an object frame variable to the type to track that, tend to use SET OBJECT FRAME rather than the automatic animation commands, that would be the easiest way to track it.

Health, Ammo, and bacon and eggs!

Login to post a reply

Server time is: 2024-04-26 23:05:56
Your offset time is: 2024-04-26 23:05:56