Just ran into the issue @Kortgat described, here is the log output of the event:
2023-06-17T11:48:13.4626835+00:00 Information CyFi.CyFiEngine - Tick: 120 *************************************************
2023-06-17T11:48:13.4659152+00:00 Information CyFi.CyFiEngine - Bot: a4ed99cf-12b4-4786-be43-5eef98817373 send command UPRIGHT
Current state of bot: CyFi.Physics.Movement.Idle
2023-06-17T11:48:13.4661673+00:00 Information CyFi.CyFiEngine - Bot a4ed99cf-12b4-4786-be43-5eef98817373: command updated UPRIGHT
update input
FalseOn Ladder
The Elapsed event was raised at 06/17/2023 11:48:13
2023-06-17T11:48:13.6128240+00:00 Information CyFi.CyFiEngine - Tick: 120 *************************************************
If you check the tick counter you’ll see that the game loop triggered twice (while the previous loop is not yet done), causing the same tick to get processed two times (discarding some of the commands). I tested this in a game with two players and a 150ms tick loop and it happened multiple times.
I tested @Kortgat 's PR and it thankfully seems to improve the issue (thanks Charl for opening a PR ) but with the PR sometimes the game hangs, I’ll check if I can spot the issue.
@Jenique I think this is serious enough to warrant a release (especially since this shouldn’t impact the game’s characteristics e.g. movement etc)? From the testing that I’ve done it seems to seriously impact my bot’s performance.
EDIT: Adding to this, it looks like sometimes commands from bots are just ignored when there are multiple players (as in they don’t show up in the game logs at all). I increased the tick timer to a very large value to rule out my bot being slow and it still happened. Scaling back down to 1 player the issue disappears. I’ll check if I can see something that causes this.
EDIT2: The disappearing commands from above appear to be due to the command queue not being locked when new commands are being pushed to it. Will open a PR shortly with the fix.