Recording user input for automatic playback

Is there a simple way to write out all of the player-generated inputs to a file so it can be played back later? I’m not talking about a movie recording of the gameplay. I would like to have an output file that has the key state changes with time stamps from an actual player so that I can just read those inputs in later and have it play through the game. It would be similar to having an AI play the game, except instead of an AI making the decisions, it’s just reading the decisions an actual player made during a previous session.

If there’s an existing solution, that would be awesome. If there is not an existing solution, would it work to just override the InputKey function in PlayerController and serialize out the input parameters, or would I need to track data from other functions as well?

i want to know this too (for a rhythm game)

I have an idea, but I haven’t tried it yet, I want to record it and save it to a mysql database via REST api, I’ll let you know if it works out.

So did this work out?

I’d like to be able to do playback debugging for functional tests! So if anyone has an elegant solution to this, I’d love to hear it.

1 Like

Is this what you are looking for?

I’m not sure it’s exactly what I’m looking for, something more like this really GDC Vault - Automated Testing and Instant Replays in Retro City Rampage

1 Like