Sign in to follow this  

How to create a replay system for a racing game

This topic is 4661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this