Demo recording mod?

Cee Colon SlashCee Colon Slash Join Date: 2012-05-25 Member: 152581Members
Again, another idea that I have no idea how to implement.

There are a number of great people doing screencasts of games they've played. I'm wondering if it would be possible (ie., if someone smarter and more savvy than me) to create a mod which would basically log the actions, locations and status of all players and structures at every tick, and then post-game, play them back. This would be a heck of a lot easier than capturing video (limited to one viewport) and great for reviewing matches.

Comments

  • RyneRyne Join Date: 2012-02-25 Member: 147408Members, NS2 Map Tester
    <!--quoteo(post=1969529:date=Aug 31 2012, 06:52 PM:name=Cee Colon Slash)--><div class='quotetop'>QUOTE (Cee Colon Slash @ Aug 31 2012, 06:52 PM) <a href="index.php?act=findpost&pid=1969529"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Again, another idea that I have no idea how to implement.

    There are a number of great people doing screencasts of games they've played. I'm wondering if it would be possible (ie., if someone smarter and more savvy than me) to create a mod which would basically log the actions, locations and status of all players and structures at every tick, and then post-game, play them back. This would be a heck of a lot easier than capturing video (limited to one viewport) and great for reviewing matches.<!--QuoteEnd--></div><!--QuoteEEnd-->


    They've talked about this. "post 1.0" if I recall.
  • spellman23spellman23 NS1 Theorycraft Expert Join Date: 2007-05-17 Member: 60920Members
    <!--quoteo(post=1969532:date=Aug 31 2012, 07:04 PM:name=Ryne)--><div class='quotetop'>QUOTE (Ryne @ Aug 31 2012, 07:04 PM) <a href="index.php?act=findpost&pid=1969532"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->They've talked about this. "post 1.0" if I recall.<!--QuoteEnd--></div><!--QuoteEEnd-->

    That seems like the mantra for a lot of cool features.

    Kinda wish they had the funds for another year of getting in all the features, smoothing things to perfection, and balancing the heck out of everything. Then v1.0 would be huuuuuuuuge
  • fanaticfanatic This post has been edited. Join Date: 2003-07-23 Member: 18377Members, Constellation, Squad Five Blue
    Demo recording is already in the game, but it has some significant issues that prevent it from being widely used at the moment.
  • perkyperky Join Date: 2012-08-31 Member: 157042Members
    I'd like to know if NS2 uses a 'lockstep' networking model, pretty much all multiplayer RTS games use it, however this is also an FPS. If it is using lockstep then demo recordings should be trivial to implement, you just record all the mouse and keyboard inputs and the rest is deterministic.
  • Cee Colon SlashCee Colon Slash Join Date: 2012-05-25 Member: 152581Members
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Demo recording is already in the game, but it has some significant issues that prevent it from being widely used at the moment.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Could you expand on this fana? Ie., is there an infrastructure in place to support it, or it's a very much behind-the-scenes kind of thing?
  • fanaticfanatic This post has been edited. Join Date: 2003-07-23 Member: 18377Members, Constellation, Squad Five Blue
    <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=118547" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=118547</a>
  • EgoGamerEgoGamer Join Date: 2012-06-21 Member: 153536Members, Reinforced - Onos, WC 2013 - Supporter
    Would love to see this too.
  • Hunter.S.T.Hunter.S.T. Join Date: 2012-05-26 Member: 152596Members
    Im not sure really, i worry that an ingame demo recording mod might be more susceptable to hacking.

    Im thinking of competition play, where i will be pushing for every player in the tournament to be required to record a demo, and post it publically, to ensure that they are not cheating.

    There are definatly some cheaters out there, sure its easy to cheat right now, but some of these people are buying multiple accounts. This worries me, i can certainly see how for people that are cheating now, having a second account could mean that they can try to cheat when the game does have anti cheat.

    I just worry that having a demo recording mod, also in lua, might make cheating easier.
  • Cee Colon SlashCee Colon Slash Join Date: 2012-05-25 Member: 152581Members
    Thanks for that link fana, I will be recording my games to see how this works!
  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    <!--quoteo(post=1969529:date=Sep 1 2012, 01:52 AM:name=Cee Colon Slash)--><div class='quotetop'>QUOTE (Cee Colon Slash @ Sep 1 2012, 01:52 AM) <a href="index.php?act=findpost&pid=1969529"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Again, another idea that I have no idea how to implement.

    There are a number of great people doing screencasts of games they've played. I'm wondering if it would be possible (ie., if someone smarter and more savvy than me) to create a mod which would basically log the actions, locations and status of all players and structures at every tick, and then post-game, play them back. This would be a heck of a lot easier than capturing video (limited to one viewport) and great for reviewing matches.<!--QuoteEnd--></div><!--QuoteEEnd-->
    I've done exactly what you describe a half a year ago, it is the gamestate-recorder in (the unreleased) GameOvermind. It ran server-side (didn't require any client-mods, so worked for vanilla-clients), worked virtually flawlessly and generated tiny demo-files. It had one major drawback however: performance.

    Here's a post about the performance-evaluations from quite some time ago:
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->With regards to the performance of the gamestate-recorder, as it stands currently, the recorder takes about 4ms per 100 entities per snapshot. Now in order to get smooth playback it is required to run the recorder on at least 20 snapshots per second. I should be able to bring this down when Server-Client Lua-sync is put in, because right now timing-issues arise due to the client running on a different clock than the server, causing desynced animations and assorted other stuff. This can be fixed by running some script client-side too, but the way I want to do it demands that both the server and client run the same script, which makes it no longer possible for vanilla-clients to join GameOvermind-servers, so obviously I'm waiting with that until automatic-downloading is put in. Anyway, to abate that timing-issue the server needs to send many snapshots per second to override if you will, any miscalculations the client is making. This point lies around 20, but I can bring that down later on to perhaps 5-10, so that's a performance-improvement waiting on the shelf.

    Now of course the recorder records more than just entities, but entities constitute almost all of the processing-time so I'm basing performance-numbers on that alone. I should also note that there is A LOT of performance-optimizations waiting to be done on those entities too, as right now I'm reading out far more data than I structly need to (most structures for example don't change position\angles after they've first spawned, so I only need to read out that data once, instead of every snapshot). Back to that 4ms, I'm guessing an average 6v6 game can contain up to 600 entities, so we're at 4*6=24ms per snapshot, add to that the 20 snapshots required for smooth playback, it brings us to 480ms per second (or about half of every second simply). So consider your server is able to run at 60 ticks (assuming there is no 30-limit), running the gamestate-recorder at 20 snaps would bring that down to 31.<!--QuoteEnd--></div><!--QuoteEEnd-->
    I've since stopped working on it, mainly because I did not see the improvements of performance I direly needed to get this thing to work smoothly on publics. Nothing much has changed up to now, and to get this technique to work one of 2 things need to happen:
    <ul><li>Major performance-increase for servers (and I'm talking factors here, not percentages)</li><li>Access to certain sections of the engine in order to fetch the networked-variables direct from there (saving up to 95% of the workload)</li></ul>
    I've brought both of those points up in the past, but nothing has come of it since.
Sign In or Register to comment.