Author Topic: record games  (Read 2180 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,227
    • View Profile
    • http://www.titusgames.de
record games
« on: 18 January 2016, 12:57:56 »
It would be nice to have a feature that records every game played. My idea would be to record alll commands given to units in a file, so you can playback the whole game later.

Description:
- The "record" is stored in a temporary file in .megaglest called current_game.mgr  ( MegaGlestRecord )
- when the game starts, the game setup is saved in this file.
- from now all commands wich are executed are recorded in this file.
- when the game ends, you can choose to keep the file on the endgame screen stats and you have to give it a name.

playback of games:
- via commandline parameter
- via ingame menu, where you can select the .mgr-file you want to playback.

Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: record games
« Reply #1 on: 23 August 2016, 01:09:19 »
i know this topic hasn't been posted in for quite some time, but it's such a awesome idea! i have to "upvote it"
WiP Game developer.
I do danish translations.
"i break stuff"

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,227
    • View Profile
    • http://www.titusgames.de
Re: record games
« Reply #2 on: 24 August 2016, 11:10:59 »
hm, indeed, I will suggest it to my son he has some time at the moment maybe .....
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: record games
« Reply #3 on: 24 August 2016, 12:05:16 »
Sounds awesome :),
WiP Game developer.
I do danish translations.
"i break stuff"

thdgaming

  • Archer
  • *
  • Posts: 25
    • View Profile
Re: record games
« Reply #4 on: 4 December 2016, 21:24:27 »
I think it's a good idea, and I just have a new. When the record's finished, we can use a separate software for make a film, like a blender fork. But I know it can be super hard to develop, so I don't want to say to the developers : "Make it ! I need !" this is just another idea.
It can be mgr-studio project but, I don't know if another one want it.

Sorry for my bad english

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 457
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: record games
« Reply #5 on: 13 March 2017, 04:35:36 »
@titi, I was chatting with softcoder about this a few days ago. If it's a feature addition you would like to prioritize, you may want to check in with him about it. He mentioned something about code that was disabled, needed a lot of testing, but not yet designed for network play. But better to get the story from him! :)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,227
    • View Profile
    • http://www.titusgames.de
Re: record games
« Reply #6 on: 13 March 2017, 11:04:12 »
It might not be ready for network play, but to playback games its already good enough. Sadly my son lost interest on this for the moment. What we need here is also an exact description of what we want. For me a good start is:

Record EVERY game and save this in a directory in .megaglest. Here are saved the last n games or something.
At the moment the recording is done in memory and then after the game a file is written. This is maybe bad for big games where you can get out of memory with all those commands recorded. On the other hand recording to filesystem directly might slow down the game maybe. This has to be tested if it really slows down anything. If yes, a seperate recording thread might help.

Then later we can add a new menu where you can select the game to play back.

Genral thoughts:
A Problems with playing back recorded games We have no "key frames" so the game can only be played back from start to end. its not really possible to jump into the middle of a fight. Just fast forward migt be doable.
Another option is to stream games, but here we have the same problems that there are no key frames. So you can only "join" the stream on game start. You are not able to connect to an already running game.

So whats the real benefit of this feature?
It will enable you to decide that you want to see a full game again. SO if you think you have played a really fantastic game and you want to have a video of this game you can create this now while playing back the recorded game.
As this benefit is not too big at the moment we should not put too much effort in this feature. If its easy to do we can add it , thats all ( I think most of the code is already there )
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: record games
« Reply #7 on: 13 March 2017, 15:25:21 »
The real challenge i see with this is version changes (AKA, Techtree changes), this means replays from older patches will stop working unless you save some files from it, (perhaps keep techtree files on masterserver to be downloaded on demand for older replays?
WiP Game developer.
I do danish translations.
"i break stuff"

GunChleoc

  • Horseman
  • ****
  • Posts: 202
    • View Profile
    • Fòram na Gàidhlig
Re: record games
« Reply #8 on: 13 March 2017, 16:09:06 »
The way we handle that problem in Widelands is to record the software version with the replay file and show it on the replay selction screen. So the user can see if the replay will still work or not.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,227
    • View Profile
    • http://www.titusgames.de
Re: record games
« Reply #9 on: 13 March 2017, 16:27:26 »
game version are indeed a minor problem and we already know how to handle this for save games.
I would simply put the version in the file name.

@Coldfusionstorm: Why should I keep old game recordings for a long time ? Just for nostalgic reasons ?  ::)
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: record games
« Reply #10 on: 13 March 2017, 17:06:59 »
Don't  ::) me ;),  Anyhow, I think it would be very nice to have, Im used to Windows where you can run games as far back as 10 years, so my mindset is cented around that, i don't know if il "NEED" it, But it bugs me that i wouldn't be able to do it, specifucally if the saves don't contain, at least make the replays somewhat at least "recoverably for future versions, Aka older versions wouldn't have... i dunno, stat showing for some stats or something similar to that.

Im just talking on top of my head here. This is just my thoughts on it :).

UPDATE:

I just found this completely by accident while talking about units in warcraft 3 lol.

i found it a interesting read. Don't know if it's intirely relevant.
https://blog.forrestthewoods.com/synchronous-rts-engines-and-a-tale-of-desyncs-9d8c3e48b2be#.8efrh0f4c
« Last Edit: 13 March 2017, 18:08:18 by Coldfusionstorm »
WiP Game developer.
I do danish translations.
"i break stuff"

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,227
    • View Profile
    • http://www.titusgames.de
Re: record games
« Reply #11 on: 16 March 2017, 15:07:15 »
UPDATE:

I just found this completely by accident while talking about units in warcraft 3 lol.

i found it a interesting read. Don't know if it's intirely relevant.
https://blog.forrestthewoods.com/synchronous-rts-engines-and-a-tale-of-desyncs-9d8c3e48b2be#.8efrh0f4c
Its offtopic, but this is indeed a very good description on how MG works :) ( as far as I have read it yet ). In our wolrd "Desyncs" are "Out Of Sync" errors. It also describes why game recordings/replays will not work after a patch and why you cannot rewind :) .
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

thiemo

  • Swordman
  • *
  • Posts: 17
    • View Profile
Re: record games
« Reply #12 on: 20 March 2017, 11:39:33 »
I think I have seen such a feature in a mac game many years ago. It's cool. I am not sure if the purpose solely to get a film to watch again (and again and again ;-) ) or the command data shall be kept for analytics. If the later is not of importance, one could implement a tool that takes the recorded command data and "converts" them into a film saved as mp4, avi, matroska whatever format. (how have the MegeGlest films created that are on youtube?) The films might be advertising materials or one could make them a library where one could research about tactics.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: record games
« Reply #13 on: 26 March 2017, 04:54:35 »
I would think that creating a video file would be kinda out of scope. There's no shortage of dedicated software meant for this purpose and it's often more efficient, too (working directly with the graphics card in some cases). There's no reason to reinvent the wheel. Anyone wanting a video can use such capture programs to make the video (either from a game itself or from watching a recording).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: record games
« Reply #14 on: 28 March 2017, 22:51:01 »
I would think that creating a video file would be kinda out of scope. There's no shortage of dedicated software meant for this purpose and it's often more efficient, too (working directly with the graphics card in some cases). There's no reason to reinvent the wheel. Anyone wanting a video can use such capture programs to make the video (either from a game itself or from watching a recording).

100% Agree, That would be a incredible waste. There is already free opensource dedicated recording software for this (Open broadcaster software)
WiP Game developer.
I do danish translations.
"i break stuff"

 

anything