Jump to content
  • Advertisement
Sign in to follow this  
yanuart

How to create a replay system for a racing game

This topic is 4974 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!