Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't properly replay multiplayer log #1798

Closed
DreadKnight opened this issue Nov 4, 2020 · 15 comments
Closed

can't properly replay multiplayer log #1798

DreadKnight opened this issue Nov 4, 2020 · 15 comments
Labels
coding This issue requires some programming invalid The issue is not from the project or a "won't fix" multiplayer Problems that occur in online multiplayer pipeline Affects how the project is being developed priority This should get fixed as soon as possible!
Milestone

Comments

@DreadKnight
Copy link
Member

DreadKnight commented Nov 4, 2020

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:eyJjb25maWciOnsicGxheWVyTW9kZSI6MiwiY3JlYUxpbWl0TmJyIjozLCJ1bml0RHJvcHMiOjEsImFiaWxpdHlVcGdyYWRlcyI6MywicGxhc21hX2Ftb3VudCI6MzAsInR1cm5UaW1lUG9vbCI6LTEsInRpbWVQb29sIjotNjAsImJhY2tncm91bmRfaW1hZ2UiOiJGcm96ZW4gV2FsbCIsImZ1bGxzY3JlZW5Nb2RlIjpmYWxzZX0sImxvZyI6W3siYWN0aW9uIjoiYWJpbGl0eSIsInRhcmdldCI6eyJ0eXBlIjoiaGV4IiwieCI6MSwieSI6NH0sImlkIjozLCJhcmdzIjp7IjEiOnsiY3JlYXR1cmUiOiJTMSIsImNvc3QiOjJ9fX0seyJhY3Rpb24iOiJtb3ZlIiwidGFyZ2V0Ijp7IngiOjAsInkiOjN9fSx7ImFjdGlvbiI6InNraXAifSx7ImFjdGlvbiI6ImFiaWxpdHkiLCJ0YXJnZXQiOnsidHlwZSI6ImhleCIsIngiOjIsInkiOjV9LCJpZCI6MywiYXJncyI6eyIxIjp7ImNyZWF0dXJlIjoiTDIiLCJjb3N0Ijo1fX19LHsiYWN0aW9uIjoibW92ZSIsInRhcmdldCI6eyJ4IjoxLCJ5IjoxfX0seyJhY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2lwIn0seyJhY3Rpb24iOiJtb3ZlIiwidGFyZ2V0Ijp7IngiOjEwLCJ5Ijo1fX0seyJhY3Rpb24iOiJtb3ZlIiwidGFyZ2V0Ijp7IngiOjEwLCJ5Ijo2fX0seyJhY3Rpb24iOiJhYmlsaXR5IiwidGFyZ2V0Ijp7InR5cGUiOiJhcnJheSIsImFycmF5IjpbeyJ4Ijo2LCJ5Ijo0fSx7IngiOjcsInkiOjV9LHsieCI6NiwieSI6NX0seyJ4Ijo4LCJ5Ijo2fSx7IngiOjcsInkiOjZ9LHsieCI6NiwieSI6Nn0seyJ4Ijo3LCJ5Ijo3fSx7IngiOjYsInkiOjd9LHsieCI6NiwieSI6OH1dfSwiaWQiOjIsImFyZ3MiOnsiMSI6eyJkaXJlY3Rpb24iOi0xLCJoZXgiOnsieCI6NywieSI6Nn0sImNob2ljZUluZGV4IjoxfX19LHsiYWN0aW9uIjoiYWJpbGl0eSIsInRhcmdldCI6eyJ0eXBlIjoiY3JlYXR1cmUiLCJjcmVhIjoxM30sImlkIjoxLCJhcmdzIjp7IjEiOnt9fX0seyJhY3Rpb24iOiJza2lwIn1dfQ==')

@DreadKnight DreadKnight added coding This issue requires some programming priority This should get fixed as soon as possible! pipeline Affects how the project is being developed labels Nov 4, 2020
@DreadKnight DreadKnight added this to the 0.4 - Bounty Hunter milestone Nov 4, 2020
@DreadKnight DreadKnight added the multiplayer Problems that occur in online multiplayer label Nov 4, 2020
@issuehunt-oss

This comment has been minimized.

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Feb 22, 2021
@issuehunt-oss

This comment has been minimized.

@issuehunt-oss

This comment has been minimized.

@rianconley
Copy link
Contributor

rianconley commented Mar 29, 2021

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
Copy link
Member Author

DreadKnight commented Mar 29, 2021

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
Copy link
Member Author

DreadKnight commented Mar 29, 2021

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

@rianconley
Copy link
Contributor

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
Copy link
Member Author

@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
Copy link
Contributor

rianconley commented Apr 7, 2021

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
Copy link
Member Author

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

This comment has been minimized.

@issuehunt-oss

This comment has been minimized.

@issuehunt-oss

This comment has been minimized.

@issuehunt-oss issuehunt-oss bot removed the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Jul 8, 2021
@DreadKnight DreadKnight added the invalid The issue is not from the project or a "won't fix" label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coding This issue requires some programming invalid The issue is not from the project or a "won't fix" multiplayer Problems that occur in online multiplayer pipeline Affects how the project is being developed priority This should get fixed as soon as possible!
Projects
None yet
Development

No branches or pull requests

3 participants
@DreadKnight @rianconley and others