FreezingMoon / AncientBeast

The Turn Based Strategy Game/eSport. Master your beasts! 🐺
https://AncientBeast.com
GNU Affero General Public License v3.0
1.68k stars 585 forks source link

instantly replay match log [bounty: 20 XTR] #2161

Open DreadKnight opened 1 year ago

DreadKnight commented 1 year ago

There should be a new way for loading match logs, that should instantly get the match to the final state instead of replaying everything fast move by move. This new instant replay mode of doing things could be extremely useful in certain scenarios, by not having to waste time anymore, like when resuming a long match or trying to reproduce bugs.

The method would be called load and hotkey would be Ctrl + L from prematch screen. Previous method will be play, showing the animations and having Ctrl + P hotkey.

This requires state machine to be implemented.

DreadKnight commented 1 year ago

Tweaked this a bit as of discussion here https://github.com/FreezingMoon/AncientBeast/issues/2072#issuecomment-1577101742, simplyfing things and making them more logical.

xTammaro commented 1 year ago

Hey, I would like to attempt this issue. I am interested in this project and want to contribute!

DreadKnight commented 1 year ago

Heya! Go for it, will assing it soon.

On Wed, Oct 11, 2023, 4:24 PM xTammaro @.***> wrote:

Hey, I would like to attempt this issue. I am interested in this project and want to contribute!

— Reply to this email directly, view it on GitHub https://github.com/FreezingMoon/AncientBeast/issues/2161#issuecomment-1757694770, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEPNX2RKIZMRKF452QLDOTX62MX7ANCNFSM6AAAAAAWHY4YVY . You are receiving this because you authored the thread.Message ID: @.***>

xTammaro commented 1 year ago

I have looked at this for quite a while and the problem I am finding is that since the game log only stores actions, there seems to be no other way of getting to the current game state except through simulating the actions. I am struggling to figure out if the instant replay functionality is achievable without essentially snapshotting the game state data. One idea I had was to apply all the actions sequentially onto some sort of shadow game without visuals, animations etc, only data structures. Then transfer this data into the actual game and render it, but I am not sure how viable this is.

DreadKnight commented 1 year ago

@xTammaro Some other coder talked about state machines, which gave me the idea for this, so it would be the way to go about it.

xTammaro commented 1 year ago

Yeah sorry, I think this is too much for me right now although sounds interesting. I will look for a less complex issue to make a contribution and will I will come back to this in the holidays. You can unassign if you would like.

DreadKnight commented 1 year ago

Understood, no worries. Makes total sense.

On Thu, Oct 12, 2023, 12:45 PM xTammaro @.***> wrote:

Yeah sorry, I think this is too much for me right now although sounds interesting. I will look for a less complex issue to make a contribution and will I will come back to this in the holidays. You can unassign if you would like.

— Reply to this email directly, view it on GitHub https://github.com/FreezingMoon/AncientBeast/issues/2161#issuecomment-1759283836, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEPNXYZBXP2C36OS7MPLZDX6632ZANCNFSM6AAAAAAWHY4YVY . You are receiving this because you authored the thread.Message ID: @.***>