Almost every 3D game that has a replay feature does it by recording the position, orientation, scale and state of every relevant entity/object (instead of rendering to a video, which would actually be a much larger hit to performance since you have to write to the hard drive for every frame). Tracking and recording the…