Instant replay using encoder, ingame.

Has anyone managed to pull this off?
Client brief needs some form of instant replay for feedback, ingame…

Could I get this to work using an encoder and CaptureScreenshot?

Does it absolutely have to be a video? Encoding on-the-fly is AFAIK not possible (without a plugin).

If you just need an instant replay in-game, a simpler way to go would be something like my own MantaRecorder.

You can forget about recording to video.

What you can do is store the engine state in a cyclic array and replay that, but depending on the number of moving objects in your game, that can become fairly memory-intensive.

If you have a racing game, and essentially the cars are the only thing that moves, it’s fairly easy to simply always store the past 10 seconds of positions of all cars, and when you need a replay, simply use that.

If you have an FPS with destructable physics, good luck. :slight_smile: