Need Help with Implementing Replay System for FPS Game

Hi there,

I’m diving into creating an FPS game on Roblox following the new Gameplay curriculum. I’m intrigued by the idea of incorporating a replay system, similar to the example shared below:

I’m facing an issue: I want to figure out how to implement a replay system that shows how a player died in the game.

So far, I haven’t tried any solutions, and I couldn’t find relevant information on the Creator Documentation.

If anyone has insights or advice on how to tackle this, I’d appreciate your help!

Thanks!

3 Likes

Afaik this is typically done by keeping a log of every movement or input a player does over the entire match and then replaying this by simulating the exact same events with code.

There are a few challenges to overcome, one such example is managing memory optimally. Thousands or even tens of thousands of frames will occur between the beginning and end of the match. For this reason it would be best to only retain the last 15-30 seconds or so (depending on how long you hope the replay to be) in order to reduce memory usage.

You would also need to set up an entire separate area where the camera will be viewing dummies, rather than doing so in the actual playable area where players are currently present and fighting. This could be done on runtime, but keep in mind this is yet another memory-taxing circumstance.

Then there are the minor details like what animations each character is playing every frame, what direction they are facing, when they aim, shoot, use any other inputs such as grenades or melee, sprint, emote, etc.

I’m sure this is possible to do on Roblox and that it could be optimized quite well, however it is undeniably going to take a lot of time to develop something like this. I don’t see myself taking on this kind of challenge anytime soon, mainly because I don’t think it is the sort of feature to make or break the gameplay of an FPS, rather I think it is more of a luxury addition that is just nice to have.

2 Likes