For one object you could save it's x,y,angle, etc every frame to an array, then play it back.
Something like this:
You could do the same for multiple objects.
Another idea would be to save the player inputs and play those back. Unfortunately that is tricky to get a perfect replay with since the varying dt will get the timing off quick. It is possible though with a carefully designed game. It may not even matter in the long run as it would give some variation in the long run.