FreezingMoon / AncientBeast

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

can't properly replay multiplayer log #1798

Closed DreadKnight closed 3 weeks ago

DreadKnight commented 4 years ago

Can't properly replay a log for a multiplayer match in hotseat mode, as it stops after a few moves.

AB.restoreGame('AB-0.4:eyJjb25maWciOnsicGxheWVyTW9kZSI6MiwiY3JlYUxpbWl0TmJyIjozLCJ1bml0RHJvcHMiOjEsImFiaWxpdHlVcGdyYWRlcyI6MywicGxhc21hX2Ftb3VudCI6MzAsInR1cm5UaW1lUG9vbCI6LTEsInRpbWVQb29sIjotNjAsImJhY2tncm91bmRfaW1hZ2UiOiJGcm96ZW4gV2FsbCIsImZ1bGxzY3JlZW5Nb2RlIjpmYWxzZX0sImxvZyI6W3siYWN0aW9uIjoiYWJpbGl0eSIsInRhcmdldCI6eyJ0eXBlIjoiaGV4IiwieCI6MSwieSI6NH0sImlkIjozLCJhcmdzIjp7IjEiOnsiY3JlYXR1cmUiOiJTMSIsImNvc3QiOjJ9fX0seyJhY3Rpb24iOiJtb3ZlIiwidGFyZ2V0Ijp7IngiOjAsInkiOjN9fSx7ImFjdGlvbiI6InNraXAifSx7ImFjdGlvbiI6ImFiaWxpdHkiLCJ0YXJnZXQiOnsidHlwZSI6ImhleCIsIngiOjIsInkiOjV9LCJpZCI6MywiYXJncyI6eyIxIjp7ImNyZWF0dXJlIjoiTDIiLCJjb3N0Ijo1fX19LHsiYWN0aW9uIjoibW92ZSIsInRhcmdldCI6eyJ4IjoxLCJ5IjoxfX0seyJhY3Rpb24iOiJza2lwIn0seyJhY3Rpb24iOiJtb3ZlIiwidGFyZ2V0Ijp7IngiOjAsInkiOjR9fSx7ImFjdGlvbiI6ImFiaWxpdHkiLCJ0YXJnZXQiOnsidHlwZSI6ImFycmF5IiwiYXJyYXkiOlt7IngiOjEsInkiOjR9LHsieCI6MiwieSI6NH0seyJ4IjozLCJ5Ijo0fSx7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ijo2LCJ5Ijo0fSx7IngiOjcsInkiOjV9LHsieCI6NiwieSI6NX0seyJ4Ijo4LCJ5Ijo2fSx7IngiOjcsInkiOjZ9LHsieCI6NiwieSI6Nn0seyJ4Ijo3LCJ5Ijo3fSx7IngiOjYsInkiOjd9LHsieCI6NiwieSI6OH1dfSwiaWQiOjIsImFyZ3MiOnsiMSI6eyJkaXJlY3Rpb24iOi0xLCJoZXgiOnsieCI6NywieSI6Nn0sImNob2ljZUluZGV4IjoxfX19LHsiYWN0aW9uIjoiYWJpbGl0eSIsInRhcmdldCI6eyJ0eXBlIjoiY3JlYXR1cmUiLCJjcmVhIjoxM30sImlkIjoxLCJhcmdzIjp7IjEiOnt9fX0seyJhY3Rpb24iOiJza2lwIn1dfQ==')

issuehunt-oss[bot] commented 3 years ago

@dreadknight has funded $4.00 to this issue.


issuehunt-oss[bot] commented 3 years ago

@dreadknight has funded $2.00 to this issue.


issuehunt-oss[bot] commented 3 years ago

@dreadknight has funded $14.00 to this issue.


rianconley commented 3 years ago

Hey @DreadKnight I tried looking at #1805 but I can't reproduce the freezing issue. I'm going to try to get the logging feature working in multiplayer so we can debug properly. Sorry, can you remind me how to use the logging feature? If remember correctly in the console, you use AB.getLog() to get the string and then AB.restoreGame({string} to restore. Is this correct?

DreadKnight commented 3 years ago

Hey @DreadKnight I tried looking at #1805 but I can't reproduce the freezing issue. I'm going to try to get the logging feature working in multiplayer so we can debug properly. Sorry, can you remind me how to use the logging feature? If remember correctly in the console, you use AB.getLog() to get the string and then AB.restoreGame({string} to restore. Is this correct?

Heya! Please always use hashtags for issues, edited that one for you. The log thing is documented in the contribution guide over here https://github.com/FreezingMoon/AncientBeast/blob/master/CONTRIBUTING.md#report-issues Yes, you get it like that but you don't have to worry about the restore function, as we made that auto-added by default to simplify things, as you can see in the guide. Anyway, I tested it and yeah, seems it won't trigger anymore now, sigh. Maybe I fiddled with the version number or so hmm.

DreadKnight commented 3 years ago

@rianconley Found the issue: make sure the output given by AB.GetLog() is not between quotes when you run it from main menu.

rianconley commented 3 years ago

Sounds good. Yeah, I got it to work although it seems to freeze during loading - doing a click through made it unfreeze. I'll see if I can get that fixed as well.

DreadKnight commented 3 years ago

@rianconley It doesn't freeze for me. It used to do that a few years ago I recall though. I'm using latest stable version of Chrome.

rianconley commented 3 years ago

Hey @DreadKnight, I fixed the logging so it can restore the state of a multiplayer match. However, the restore only applies to single player. To restore for multiplayer, I'll need to build a separate logging component so it can simulate a multiplayer match using nakama api. Let me know if you think this is a good idea.

DreadKnight commented 3 years ago

Hey @DreadKnight, I fixed the logging so it can restore the state of a multiplayer match. However, the restore only applies to single player. To restore for multiplayer, I'll need to build a separate logging component so it can simulate a multiplayer match using nakama api. Let me know if you think this is a good idea.

Good to hear. If you can fix the movement-related sync issues without such a feature, then we can skip it for now at least. I'm still somewhat on the fence regarding nakama vs colyseus, because nakama did some good moves recently, though colyseus would be more suitable for the project... This reminds me of a very old issue somewhat, where the game would play itself quite a bit in order to generate a screenie or interesting scenario #84 Anyway, in the bigger scheme of things, would want to have certain players that don't play by themselves, but actually create bots to fight other players or bots #542, so running simulations would be useful for that kind of stuff. So if you can code it multiplayer-engine agnostic overall, even better, go for it :-)

issuehunt-oss[bot] commented 3 years ago

@dreadknight has cancelled funding for this issue.(Cancelled amount: $14.00) See it on IssueHunt

issuehunt-oss[bot] commented 3 years ago

@dreadknight has cancelled funding for this issue.(Cancelled amount: $2.00) See it on IssueHunt

issuehunt-oss[bot] commented 3 years ago

@dreadknight has cancelled funding for this issue.(Cancelled amount: $4.00) See it on IssueHunt