Anomoly Matches

Hi

I have encountered the following problem about 1 out of every 50 matches.
Basically, what happens is that the game engine fails to detect any hits for the full duration of the match. After the match is complete every single tile has been fired at (and the GUI shows this accordingly) but not single hit was landed for either player and both have 0 pts score.

It seems that the engine fails to pick up that the player has indeed SUCCESSFULLY placed his ships and in turn refusing to allow it to shoot (even though the round is way past round 5 and the match plays out fine otherwise).

This is the error being thrown in the engine.txt log (each an every round):

Failed to process command FireShotCommand for player DudeGameEngine.Exceptions.InvalidCommandException: All your ships must be placed before you are allowed to shoot —> System.InvalidOperationException: All your ships must be placed before you are allowed to shoot
at Domain.Games.GameMap.Shoot(PlayerType player, Point target, WeaponType weaponType) in W:\Projects\100k\2017\Github\2017-Batteships\GameEngine\Battleships\Domain\Games\GameMap.cs:line 83
at GameEngine.Commands.PlayerCommands.FireShotCommand.PerformCommand(GameMap gameMap, BattleshipPlayer player) in W:\Projects\100k\2017\Github\2017-Batteships\GameEngine\Battleships\GameEngine\Commands\PlayerCommands\FireShotCommand.cs:line 27
— End of inner exception stack trace —
at GameEngine.Commands.PlayerCommands.FireShotCommand.PerformCommand(GameMap gameMap, BattleshipPlayer player) in W:\Projects\100k\2017\Github\2017-Batteships\GameEngine\Battleships\GameEngine\Commands\PlayerCommands\FireShotCommand.cs:line 47
at GameEngine.Engine.GameRoundProcessor.ProcessPlayerCommands() in W:\Projects\100k\2017\Github\2017-Batteships\GameEngine\Battleships\GameEngine\Engine\GameRoundProcessor.cs:line 113

Hi BoerBedonnered,

This is very strange indeed, I am not sure what the cause of this could be, we will have a look and see what could be causing this, do the bots output files say anything different than the usual?

Well after digging in to this, this is what I think happened:

  1. My PC took a while to load up the game files and run player A’s bot for round 0.
  2. Player A correctly wrote its ship placement locations but overran the 2second placement time.
  3. The game engine registered that correctly that the ships have been placed but then detects the time overrun.
  4. Here is where the bug is, because now the engine continued on to Phase 2 -Round 1 (instead of Phase 1 - Round 2 -since it should get 5 chances, no?)
  5. The game engine then overrides the Placement command, with a DoNothing command instead and continues the gameplay.

Either 1 of 2 things (or both are wrong):

  1. The phase should never have changed to Phase 2.
  2. Even if Phase 2 has been reached, the engine failed to delete the player with no ships even though the logs clearly show that a purge is happening.

Here is round 0’s log:

07-05-2017 15:56:32:390 - I: Loaded bot C:\Bot\Game.Engine.-.Version.1.0.1\Game Engine - Version 1.0.1\Version 1.0.1\Reference Bots\C#Dude
07-05-2017 15:56:32:423 - I: Loaded bot C:\Bot\Game.Engine.-.Version.1.0.1\Game Engine - Version 1.0.1\Version 1.0.1\Reference Bots\C#2
07-05-2017 15:56:32:423 - I: Registered player AAA
07-05-2017 15:56:32:423 - I: Registered player BBB
07-05-2017 15:56:32:453 - I: OK!
07-05-2017 15:56:36:684 - I: Added Command DoNothingCommand for Player AAA
07-05-2017 15:56:37:392 - I: Added Command PlaceShipCommand for Player BBB
07-05-2017 15:56:37:395 - D: Beginning round processing
07-05-2017 15:56:37:396 - D: Processing Player Commands
07-05-2017 15:56:37:402 - D: Killing off players who have no ships left
07-05-2017 15:56:37:402 - D: Round processing complete

I’ve had the same issue, although in my case I think it was my Antivirus/Firewall Comodo blocking the bot or game engine from writing a file putting one or the other in the sandbox. Weirdly enough the match still progresses even though no ships were placed correctly

I confirm seeing this a few times.

I believe it had to do with running the engine too soon (While copying my bot files)

Or it could have had to do with running the game engine before the other one stopped properly. I just assumed it was something wrong on my part.

Just throwing in my vote on this. As I have seen the same behavior. (Still running the V1.0.0 game engine though.

i had seen this many times , it happens randomly , the problem i see in the log of phase round 0 ,states that it failed to execute the calibration test : the system cannot find the file specified .

Hi All,

Thank you for investigating and reporting this. We will have a look at it and fix it as soon as we have some time available.

Hi All,

This should be resolved in the latest release.