B
B
BonBon Slick2019-08-19 08:40:23
C++ / C#
BonBon Slick, 2019-08-19 08:40:23

The effect of rewinding time in games?

"Prince of Persia" or "Life is Strange" titles that everyone knows or at least heard, there, while holding the button, they show all the latest actions, events in reverse order.
How is this effect called programmatically and how to implement it?
Example
I suspect that the last minutes of the game are just being recorded, the user has a counter, how much time he can rewind, by clicking we show the record in reverse order and subtract time. When the user has released the rewind time, we set his coordinates where he was N times ago and roll back the events, the events that occurred. To do this, you also need to keep a log, a stack of events and the coordinates of the user and all the actors on the stage. If I understand correctly.
In Example, if anything, the video approach is simplified, and therefore will not work.
Unreal Engine 4.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Griboks, 2019-08-19
@BonBonSlick

If the states of objects are reversible, then you can simply run time backwards. For example, if the bullet is flying according to the equation s=vt, then a negative t will give the past.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question