Recording games
Moderator: OpenTTD Developers
Recording games
After reading about the world wide openttd day of a few days ago and seeing some screens, I wondered how great it would be to actually see this come to be.
Is it possible to record all the actions made in a game so that the original game can be replayed or played back to show off how a network would come to be. Maybe it can be implemented through a new 'player'/spectator that can 'watch' all the actions of a game and store them in file.
Then you could play back the game and watch the game in every area (the advantage over a video). I think it would be great promotion and would give people to show off their network designs.
- I have no idea how much data will have to be stored for one game. I can imagine it could become a lot if you want to capture all states.
- I also predict a problem in the playback, as cities might evolve differently. There might be more random elements in play.
Let me know if it is even slightly possible. If it has been suggested before, then sorry about this topic.
Is it possible to record all the actions made in a game so that the original game can be replayed or played back to show off how a network would come to be. Maybe it can be implemented through a new 'player'/spectator that can 'watch' all the actions of a game and store them in file.
Then you could play back the game and watch the game in every area (the advantage over a video). I think it would be great promotion and would give people to show off their network designs.
- I have no idea how much data will have to be stored for one game. I can imagine it could become a lot if you want to capture all states.
- I also predict a problem in the playback, as cities might evolve differently. There might be more random elements in play.
Let me know if it is even slightly possible. If it has been suggested before, then sorry about this topic.
Re: Recording games
OpenTTD can record and play back games, but it is aimed at debugging desyncs and as such it records an enormous amount (i.e. too much for simple replays) and playback only works if you enable it at compile time and only for the dedicated server which then fast forwards, so clients can't keep up with it and you don't see anything as well.
Re: Recording games
the biggest problem with making this a real feature is that it is extremely difficult or impossible to allow loading playbacks from old versions, as the internal gameplay may change drastically. it is basically the same thing that stops people with different versions to join the same multiplayer server.
so essentially playbacks can only be used by the exact same version that created them.
so essentially playbacks can only be used by the exact same version that created them.
Re: Recording games
or essentially the same savegame version? (if you get what i mean)Eddi wrote: so essentially playbacks can only be used by the exact same version that created them.

AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: Recording games
No, it really will only work with the exact same version.
Re: Recording games
How about some feature in the game just recording the screen? Or some part of the screen? It would be severely limited compared to the full record, but it would be something.
Re: Recording games
There's plenty of third-party software that does just that.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Recording games
Or there's the (outdated) time lapse patch at the end of a search in the development sub-forum.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Recording games
Thanks for the answer. How much is currently being recorded (MB/s)? And, is it a complete simulation, or are there important parts missing (this might be the big nogo here)? Just looking if it's feasible.Rubidium wrote:OpenTTD can record and play back games, but it is aimed at debugging desyncs and as such it records an enormous amount (i.e. too much for simple replays) and playback only works if you enable it at compile time and only for the dedicated server which then fast forwards, so clients can't keep up with it and you don't see anything as well.
As you say it can be processed fast enough to make clients not keep up. That sounds like a fast program counter which can be slowed down. Playback wouldn't be an issue (and concluding from that, with about max 50MB/s read for a hdd, playing back say, 5x as fast, would give a max 10MB/s of actual data being recorded, not even including game generation speed here). That's 36GB per hour. Ok, steep, but not impossible.
Recording an online game would be the same as playing it, so recording can keep up (or is the game slowed down during recording?).
Knowing the right version is simply a matter of properly tagging the recording (svn number if you really have to).
Just thinking out loud here.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Recording games
That depends upon the debug level which is set. The times we ran desync debugging on our servers we had log files of several 10s of MB for a real-life day and a savegame for every ingame week.NoMercy wrote:Thanks for the answer. How much is currently being recorded (MB/s)? And, is it a complete simulation, or are there important parts missing (this might be the big nogo here)? Just looking if it's feasible.Rubidium wrote:OpenTTD can record and play back games, but it is aimed at debugging desyncs and as such it records an enormous amount (i.e. too much for simple replays) and playback only works if you enable it at compile time and only for the dedicated server which then fast forwards, so clients can't keep up with it and you don't see anything as well.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Recording games
for simple playback, probably only the data sent through the network must be captured, which an initial savegame and "live data" which is probably less than 3KiB/s. most of that is heartbeat data like the random seed, to keep the connection alive and the clients synchronized, the real command data is probably way less.
Re: Recording games
Hi.
Lately i wanted to record games with latest third party programs.
I have tried numerous of up to date recording programs like Camtasia Studio 7 or Fraps99. Neither of them works, i have no idea why.
Ingame game recording would suck imo.
Could you just possibly make somehow that third party programs could be able to record OTTD?
Edit: I just realized i can record with third party programs when i run the game on 32bpp thingie.
Lately i wanted to record games with latest third party programs.
I have tried numerous of up to date recording programs like Camtasia Studio 7 or Fraps99. Neither of them works, i have no idea why.
Ingame game recording would suck imo.
Could you just possibly make somehow that third party programs could be able to record OTTD?

Edit: I just realized i can record with third party programs when i run the game on 32bpp thingie.
-
- Engineer
- Posts: 2
- Joined: 19 Feb 2012 09:38
Re: Recording games
One way to record games would be with writing function calls in a .nut file, compacted in an .tar archive, as an AI.
Time between clicks can be recorded as a Sleep() call.
This subject has a history since 2004:
http://www.tt-forums.net/viewtopic.php?f=32&t=10097
http://www.tt-forums.net/viewtopic.php?f=32&t=10668
http://www.tt-forums.net/viewtopic.php?f=32&t=26812
http://www.tt-forums.net/viewtopic.php?f=32&t=30379
http://www.tt-forums.net/viewtopic.php?f=32&t=32735
http://www.tt-forums.net/viewtopic.php?f=32&t=34406
Time between clicks can be recorded as a Sleep() call.
This subject has a history since 2004:
http://www.tt-forums.net/viewtopic.php?f=32&t=10097
http://www.tt-forums.net/viewtopic.php?f=32&t=10668
http://www.tt-forums.net/viewtopic.php?f=32&t=26812
http://www.tt-forums.net/viewtopic.php?f=32&t=30379
http://www.tt-forums.net/viewtopic.php?f=32&t=32735
http://www.tt-forums.net/viewtopic.php?f=32&t=34406
-
- Engineer
- Posts: 2
- Joined: 19 Feb 2012 09:38
Re: Recording games
Functions of NoGo could become a tool in recording,
if GSEventWindowWidgetClick() also could detect clicks on unhighlighted widgets, and
if the number of the clicked tile in the main window is passed as a parameter of the function.
I think then, with tools to write to a file, a gamescript could be written for recording a game.
But maybe it would be easier to use parts of the multiplayer code to record and replay.
if GSEventWindowWidgetClick() also could detect clicks on unhighlighted widgets, and
if the number of the clicked tile in the main window is passed as a parameter of the function.
I think then, with tools to write to a file, a gamescript could be written for recording a game.
But maybe it would be easier to use parts of the multiplayer code to record and replay.
Who is online
Users browsing this forum: No registered users and 2 guests