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

Points calculation bug impacting game play #97

Open
Ceaus opened this issue May 27, 2023 · 7 comments
Open

Points calculation bug impacting game play #97

Ceaus opened this issue May 27, 2023 · 7 comments

Comments

@Ceaus
Copy link

Ceaus commented May 27, 2023

Sometimes there's a weird points calculation bug in a quick online multi player game. And that bug screws up my turn. I wanted to make a video clip, but it's difficult making a video while I'm playing.

It happens sometimes that I have sufficient points to buy a piece. But as soon as I select a piece on the board, the points go below zero and that move becomes impossible/rejected. The piece I put on the board also disappears. When I press Undo to revert the move, everything looks fine again, with more than enough points to buy a piece. But as the clock is ticking there's nothing I can do anymore then to just skip the turn. And that's pretty frustrating when I play online, because at the higher ELPs, there's no way you can recover from a skipped turn. It's basically a death sentence for that game. I think in the last couple of months I had to forfeit a dozen games because of this.

@Ceaus Ceaus changed the title Points calculation bug Points calculation bug impacting game play May 27, 2023
@yiotro
Copy link
Owner

yiotro commented May 27, 2023

Thanks for the bug report. Few questions:

  • Do I understand right that if bug happened at one turn then it will keep happening till the end of the match?

  • Does it happen in quick matches? In duels? Or only in custom games?

  • Is this still happening after recent update (around a week ago)?

@Ceaus
Copy link
Author

Ceaus commented May 27, 2023 via email

@Ceaus
Copy link
Author

Ceaus commented May 30, 2023

I was able to record one specific occurrence of this bug. See https://imgur.com/a/0qasi7c.
I'm playing green. After three moves (00:05) I have 10 points and should be able to buy a piece. At 00:09 I am in fact buying a piece and then you see the bug occurring. I place the new piece on the board but that move is not accepted. And I also have less points then I started with (10/3 > 8/3). So I need to undo the moves to go back to a workable position.

@yiotro
Copy link
Owner

yiotro commented May 31, 2023

Thanks for the video. Hard to tell exactly what is going on internally but my assumption is that it's one of those rare desync bugs when game state on server is different than game state on your device, so server thinks that you're trying to make illegal move and undoes it (it's the protection against cheaters, it makes it impossible to make illegal moves).

I've spent quite a lot of time on this problem few years ago and achieved some success (it was way worse previously). But it's surprisingly complicated, so I wasn't been able to fully fix it.

@Ceaus
Copy link
Author

Ceaus commented Jun 3, 2023

There were another few occurrences.
Yesterday: After undoing the move (the units I placed were rejected), I was able to replace a tower with a strong tower. Then I ended my turn. In the following turn the strong tower was reverted back to a normal tower.
Today: Placed units were rejected (as per this bug description). That continued for some 4 turns after each other. That was pretty bizar.

it's one of those rare desync bugs when game state on server is different than game state on your device

I don't think it's a rare bug. Over the last couple of months it happened quite a few times. It can go weeks without occurring, but I've also experienced this multiple times (>5) in just a couple of days. Let me know if you want to see more video clips (I now know how to screen video capture).

Is there anything I can do to help debugging? Can I run a server locally to check? Anything else? I don't suspect the client code will reveal much.

@Ceaus
Copy link
Author

Ceaus commented Jun 3, 2023 via email

@Ceaus
Copy link
Author

Ceaus commented Jun 4, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants