Replay Effect




I am hear to ask if anyone knows how to create a Replay Effect... So what I want is when a player moves right for example and once a button is pressed he replays that action... But if it was more advanced like, looked at the top right, double tapped down, moved right and left clicked, would I simply just store every step into variables!?


That is a possibility but simpler would be to log all the inputs. As then you only need to log on a change.

As if the log shows:
time: 10 pressed: A
time: 140
you can assume the player held A from 10 to 140.
Basically, come up with a way to store it, read it and execute it.


You also should keep in mind that if you want to make a replay system, you also have to take care of any random values you may be rolling. Best way would be storing the RNG (Random Number Generator) seed to the replay data and feed it back to the RNG to get consistent results. GM has it's functions to get and "feed" the RNG seed number. If I remember correctly they were random_get_seed(); and random_set_seed(value);
  • Like
Reactions: Yal


🍋 *lemon noises*
GMC Elder
Another idea is to use ds_lists to just 'record' actions each step, or the stuff you need (e.g. if you want to do a Ghost replay for a racing game, record its X, Y and direction for each step). Then you can just read the values from the list when you want to replay, and not have to worry about any calculations you'd need to do if you just record inputs.