courcat / dhrog

HTML5 Strategy Game
https://www.courcat.com/dhrog/
GNU General Public License v3.0
3 stars 0 forks source link

Camera shows top left corner for first turn rather than player's castle #7

Open oolivero45 opened 4 years ago

oolivero45 commented 4 years ago

When first starting a game, the map doesn't shop properly for the red team, only if it is the first turn of the game and the red team is player-controlled (i.e. not an AI). Instead, the camera shows the top left corner of the map (which is blank at the start of the game), rather than the player's base. Using a zoom button or dragging the map reveals the base as usual. If the red team is an AI, the issue does not occur; and for every turn after this first turn, the issue also doesn't occur. I've been unable to find any indication of a problem in the console - everything seems to be running normally and isn't throwing any errors.

Steps to reproduce

  1. Start a new local game (not online).
  2. Set at least red team to be player controlled. It doesn't matter whether the other three teams are AIs or not.
  3. Start the game.
  4. Observe that the map does not appear.

Reproducibility

oolivero45 commented 4 years ago

I'll just add - I know that we've technically abandoned this project, but I might get around to poking at it and seeing if I can fix it at some point.

oolivero45 commented 4 years ago

Edited issue to correct the fact that I got iOS 13 and iPhone 11 mixed up, and instead stated that I own an iPhone 13 Pro.

oolivero45 commented 4 years ago

Turns out that what is actually happening, as Timby pointed out via Discord, is that the first turn shows the very far top-left corner of the map, rather than the player's castle. You can drag the map to find the castle, or just press one of the zoom buttons to refocus the camera on it.

This is still an issue, but just not the one I originally thought it was. I'll update the issue accordingly.