- Home /
Recording and playback of gameplay using events (NOT video)
I'm trying to implement a playback system in my game. I've been fairly successful by recording events and using random number seeds to sync a game and play it back. However, I'm running into sync issues if the playback is say more than a minute or so.
The game is very simple, like a flappy bird type game set in space. We've got the player object that uses physics, and 'jumps' when someone taps on the screen. And then we have planets flying by that you must avoid. Using random number seeding, these planets will be the exact same every time. Same spawn location, speed, etc.
The recording will record when the user taps according to the frame. I think this is where the issue resides. There are times where the framerate may drop, and when playing back a recording, a planet may be in a different spot for a given frame.
I've tried removing the translate based on time.deltatime from the planets to compensate for that, but that doesn't seem to work either.
Any ideas? How do other games record a game without using video? And is the physics on the player object an issue here too?
thanks for any help.
I don't know that it will help, but are you using Update or FixedUpdate?
Answer by RobAnthem · Dec 09, 2016 at 10:16 PM
I would suggest finding all possible "Event" types you can that are being utilized, this list would be a good place to start Unity Scripting Search "Events" Then create object[] arrays and see if you can't force those events back out in the order they came. But that's all just theory.
Your answer
Follow this Question
Related Questions
Best way to record gameplay 1 Answer
several Random instances 1 Answer
Generate the same 'random' number sequence from a seed 1 Answer