Record "ghost" in car racing game

Hi there,

I was wondering how to record a “ghost” of the player driving a vehicle.

What comes into mind is to write the translation and rotation of my car into some sort of array every tick and then, when re-playing simply moving a “ghost” type along the exact positions from the array.

Is this how it is normally done in actual video games?

“What comes into mind is to write the translation and rotation of my car into a (List) every tick and then, when re-playing simple moving a “ghost” type along the exact positions from the array.”

#Yes, it’s that simple. That is exactly how it is done in every car game.
.

To get you going, just work at 10hz, that is fine for any race game. But feel free to try 50, 5, 20, or whatever you want.

“That sounds slow to me, though :X”

It’s rather bizarre that you would think that! It uses what can only be described as “zero” computing power. You’re only setting a few variables a few times a second. Things like “the physics engine” would, literally, use perhaps 10 MILLION TIMES more calculation power.

Again this question comes up a lot and it is very strange. So party on, and do exactly what you first thought. You were right. You simply save the position (and any other data you want - rotation, whether the door is open, etc etc.)

This may be an old thread but i have created exactly what’s described and put it on the asset store

I have been using it for my current game and works perfectly.

the other way is save the players actions (power, brake, etc) + time in a array. And load with as a car player with another tag. The good point is, less data, less complexity and more realist. Will be a real car working as a recorded player action.