No announcement yet.

Demo 8 near to completion ?

  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    I think I got the cause of the bug.
    It computes the size of a tile in pixels and supposes it's always greater than 1. That is:
    tileSize.width = (getWidth() - mapBorder*4) / mapSize.width;
    tileSize.height = tileSize.width / 2;
    If you get a width of less than 2, the height will be 0, which looks like what you've got here.
    If you get a width of less than 1, it's rounded down to 0 and you whould have a black screen.
    I fix that so there's a minimum size of 2/1. It would warrant some resizing, because right now that thing is computed at a somewhat weird time (setPreferredSize right after creation), but I'll fix that later (or not if I forget).
    Clash of Civilization team member
    (a civ-like game whose goal is low micromanagement and good AI)
    web site and forum here on apolyton)