How to create a replay system for a racing game

Started by
2 comments, last by kburkhart84 19 years, 1 month ago
Hi, I was wondering how do you create a replay system that'll mimic your last gameplay in a racing game without have to save alot of data ? Is there a resources/article about this ? thanks
Ride the thrill of your life
Play Motorama
Advertisement
Yes there is. You have to be a member to view it though but you can register for free.
Quote:Original post by BosskIn Soviet Russia, you STFU WITH THOSE LAME JOKES!
I believe this would work

This is how I do my recorded demos and it should work as a replay of sorts.

I record all x,y coords of all the objects in my game and write them to a file. Then all you have to do is have an interface in your engine that can read these files and put everything back where it was at the time recorded. Of course you're going to have to record perhaps every cycle maybe every 2-6.

This may give you unwanted file size for replays, but its one of the simplest ways I can think to do it.

Didn't check out the gamasutra article to see if that's what they do but still, go check that out.

toXic1337
toXic1337
I checked the article. Basicly it explains that if your code when given the same input will always give the same output(deterministic), then the only things you will need to record are the initial positions, etc..., then rerun the code, adding player input wherever there was any. As long as you ressed the random number generators the same and the code always is dterministic for all physics/positioning, this method works and is alot smaller than doing the positions every few frames.


This topic is closed to new replies.

Advertisement