How to capture player's old movement. (I need an idea.)

I am trying to understand how games like Frontlines and Time Travel how they track players movement? I need an idea. In Frontlines when you die. You can see how the player killed you and in Time Travel when you change your time your old movement is captured.

2 Likes

they save the properties of every object inside a table in given index which is equal to the current time of the server which contains another table with all instance in workspace and its properties at that given time. Then if you want to “time travel” to given moment you just type the given index you want and you can either just loop to it to create “time travel effect” or just straight up update all the properties to the corresponding time

3 Likes

The guy who made Braid gave a talk about implementing a rewind mechanic, might be inspiring

You can use this VPF Reply made by BoatBomber it will help you a lot to get started on this.

Circular queues is definitely what you want!

Have a heatbeat loop and capture the CFrame of your humanoidrootpart and put that information into a circular queue.

If you want to go back 1 second, you just get the first item in that queue (assuming 60 FPS, and therefore a 60 sized array).

Here’s how to make a circular array in python, which is how I made mine. You may want to edit it to remove the return clause checking if the array is full and just overriding it: