How to record a game session?
Blitz3D Forums/Blitz3D Programming/How to record a game session?
| ||
How would I go about writing a method to record a player playing my game, then be able to replay that session back to them as a reply? Or allow them to upload that session for other players to see? Or maybe use the recording a as ghost to play against? |
| ||
I think the most effective and efficient method of doing this is to store input. If you only store player input, you're storing a very small amount of data each frame, which means that your overheads are very low. Of course this only works if your game is entirely deterministic (ie: if you give the game identical inputs, the result will also be identical.) Clearly this suits certain types of game (ones with a lot of physics and with non-randomized AI) and doesn't suit other types of game. (EG: Dark Souls wouldn't be nearly so appealing if the enemies were predictable.) You mention a ghost, which is common in racing games, for instance. I understand that this is a commonly used method of recording ghosts in racing games, so it would hopefully be quite suitable there. Some genres, not so much. |
| ||
OR, you can not listen to Gabriel's crap, and use this: http://www.blitzbasic.com/codearcs/codearcs.php?code=501 ~GF |
| ||
@andy_mc>> A code example about this : http://www.blitzbasic.com/codearcs/codearcs.php?code=2944 @GF>>I know that threats are not welcome on forums but i would give you a good thrashing if i could... Look at how you talk to our fellow Gabriel. What's your problem ? |
| ||
I found an article which goes into detail on why recording entities is often not practical and why you might consider listening to "Gabriel's crap". It's written by the programmer responsible for the replay system on a PS2 racing game, so if you are looking at it for a racing game, it's especially relevant. http://www.gamasutra.com/view/feature/2029/developing_your_own_replay_system.php |
| ||
Are we talking about your cannon fodder clone (think I've got the right person) - I'd agree with Gabriel - store inputs. Especially if they are merely clicks. |
| ||
I agree with Gabriel. I would like something like a player input recorder if I'd make a racing game or similar. The recorder code that RemiD posted looks good though, I like it. |