Race Against a Previous Lap in 2D Driving Game

Hi All,

I have created a birds eye view 2D driving game and would now like to add the feature of being able to race againts one of your previous laps. I have seen this in many games refered to as ‘shadow racing’.

My question is how do I record all the actions of the car and then replay them to the screen? I have looked at the Robot class but wont this trigger the events for both cars including the one driven by the user?

I am also assuming I will have to record time against each action so that the replay knows how long to turn, accelerate etc.

Any help on this matter would be gratefully received.

Thanks

Olly

if u found a way to record the persons position at whatever time, then u could just do a position time “graph” sort of thing and just show the ghost position for the time.

im not sure how u would go about doing this, if it were me i would probably start with arrays or something, but i think theres probably a better way.

good idea tho, i look forward to playing this:)