Skip to content

Fight Replays

Jaxx86Jaxx86 Member Posts: 26
I think it would be great if the game included a replay feature that eliminated the pauses, so that we could take a moment to reflect back on an epic battle. This can include a start and stop time feature where you could look at the replay out of game later. It would be a nice way to analyze difficult battles or share them with your friends.

Comments

  • suchosssuchoss Member Posts: 16
    I can imagine that. I think it is good idea.
  • O_BruceO_Bruce Member Posts: 2,790
    Good one, but I don't think they would have actual time to implement this.
  • MedillenMedillen Member Posts: 632
    How about post ship feature ? There is a thread for that... The concept is interesting. They might give it a shot.

    But what I'd also like is a program that keeps the last 30 seconds of game in video stored somewhere. Sometimes, epics prowess happens with no warnings ^^ and then you really want to see it again.
  • IlphalarIlphalar Member Posts: 68
    The idea seems great to me. Every time I've been recording some videos of BG I've tried to make a fight with as few pauses as possible - just not to make the watching people fall asleep in a meantime ;) Can you maybe show us the specific thread (there is already quite a lot of them in that category)?
  • MedillenMedillen Member Posts: 632
    edited July 2012
    @Ilphalar true enough, I needed some time myself to find again ^^ The thread is more likely to be watched by BGEE dev so I highly recommend you posting your proposition there

    @Jaxx86 http://forum.baldursgate.com/discussion/205/post-ship-features-what-would-you-like/p1
  • IlphalarIlphalar Member Posts: 68
    Thanks a lot @Medillen :)
  • DemonthorDemonthor Member Posts: 7
    edited July 2012
    BG is already a beautiful game. You know what is also beautiful about it besides the art ? It is my impeccable strategy as I am reacting to every little thing to destroy my foes. I know I'm not the only one who pauses 20 times a fight. Would it be so hard to let me rewatch a battle without pauses so I could admire the art along with my own personal epicness in real time? Please comment.
  • TanthalasTanthalas Member Posts: 6,738
    These two requests are similar so I merged them.
  • DemonthorDemonthor Member Posts: 7
    Thankyou for the merge. Anyone know what this would entail technically speaking?
  • LinkamusLinkamus Member Posts: 221
    This would make a great DLC option - I would gladly pay $5 or whatever for something like this. In most cases I am against everything DLC, but in this case I think it would be cool.
  • ZeckulZeckul Member Posts: 1,036
    edited July 2012
    This would be epic, but it's a very difficult feature to implement unless the engine was specifically designed, early in the process, to allow for replays. IE has multiplayer so it must have notions of reproducability and determinism, so there's some hope there. I still think this would likely represent a tremendous amount of effort on the engine team.
  • DemonthorDemonthor Member Posts: 7
    edited July 2012
    That sounds like speculation though. I want a techy answer why its impossible. I will get a masters in comp sci if I have to.

    In theory...the recorder would duplicate everything on screen, then simply stop recording when the pause value was true. Only one variable really would need to be shared. It could even be an external application..........again, in theory
  • ZeckulZeckul Member Posts: 1,036
    @Demonthor I'm a software engineer. As I said, it's not necessarily impossible, but it requires careful design at the engine level. Basically you want that everything that has an effect on the simulation of the game world is issued through a command with a "time stamp" and executed deterministically, so implementing replays is as easy as being able to save and restore the state of the simulation (already there with save/reload), and storing commands so they can be re-executed at the right moment, and since everything executes deterministically, executing the same commands leads to the same effect.

    Alternatively, you could simply store the entire state of the simulation each frame, but that would likely be prohibitively expensive in terms of memory.

    So, that seems simple, but it requires that in the engine:
    - nothing happens in the simulation that isn't issued through a time-stamped command
    - every command has a deterministic effect - if a random number generator is used for simulating dice rolls, for instance, it has to produce the same sequence of random numbers every time

    Implementing multiplayer usually entails the same requirements (not necessarily though), so there's hope that the IE is already designed this way. But if it's not the case, then the entire simulation code would need to be re-designed and re-written.
  • IllustairIllustair Member Posts: 878
    I wonder how they do it Warcraft 3 replays then. They can save a replay for an entire game, with so much going on - from hundreds of units, structures, doodads. They have different levels of fast forward and rewind, pause, etc. And they still manage to make the file size of the replay very small.
  • ZeckulZeckul Member Posts: 1,036
    edited July 2012
    fredamora said:

    I wonder how they do it Warcraft 3 replays then. They can save a replay for an entire game, with so much going on - from hundreds of units, structures, doodads. They have different levels of fast forward and rewind, pause, etc. And they still manage to make the file size of the replay very small.

    When you order a group of footmen around in W3 (or any RTS), you issue a command that looks like
    [
    Frame: 26901
    Command: Move
    Unit IDs: 1, 2, 3, 4, 5
    Location: x=345 y=567
    ]

    with the unit IDs being some unique identifier for each of the footmen. The command gets executed on frame 26901 (the game updates at 30 frames per second, so that commands happens at roughly 15 minutes in). The engine takes care of executing the command: calculating the path for each of footmen and updating their position until the command is done. The engine is very carefully designed so that the result of executing that command is entirely deterministic: this allows for multiplayer synchronization and for easy replay functionality: the only thing that needs to be exchanged between machines (for multiplayer) or stored to disk (for replays) are the commands; the state of the simulation is computed on each frame from the state of the previous frame + the ongoing and new commands, and the engine makes it so a given set of commands always produce the same end result.

    So in the end a replay is just a list of commands issued by the players, every order they give, everything they do that has an actual effect on the simulation, i.e. selecting a unit wouldn't be saved, but moving a unit would. As SC2 shows even the fastest players only issue around 100 actual commands per minute (total APM takes into account UI actions that don't do anything like selecting/deselecting etc), and each command can be stored using only a few bytes, so replay files can be incredibly compact. Quick calculation: 50 bytes per command * 100 commands / minute * 20 minutes * 2 players = 200KB. That's about the size of a typical replay file.

    If you're interested here's a very good article on how multiplayer was done for AOE: the same basic ideas apply for implementing replays. http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php

    For fast forward all you do is increase the update rate of the simulation. For moving backwards that's very touchy; I believe W3 was the first game to implement that. I suppose what they do is do a full state save at certain points in time (notice how the slider will only let you go back at specific points in time); when you request moving back in time, the state is restored from that point and execution resumes as normal. So the simulation never actually executes in reverse, it's just a fancy save/reload hack.


    Post edited by Zeckul on
  • Ezzaam4FutbolEzzaam4Futbol Member Posts: 72
    I thought you were talking about a replay of your fight. Like this, you can post it on youtube and show it to people. But that one, it would be too easy to take back a fight from a specific moment.
  • DrugarDrugar Member Posts: 1,566
    Zeckul said:

    As SC2 shows even the fastest players only issue around 100 actual commands per minute

    I like how this says "*only* 100 actual commands per minute". That's still 1.8 commands per second. That's pretty much inhuman!

Sign In or Register to comment.