The name of my colony appears and disappears soon after, when I change the camera.
If I move my unit to the next colony, the name appears and does not disappear again.
Confirmed (debug game, move scout two tiles south of a colony, deselect, reset moves on the scout, and as soon as the green border begins to flash the classic colony label disappears). Something similar happens with the modern colony labels --- the lower part with the current buildable is chopped off.
This is pretty minor IMHO, and will have to wait for someone who understands the display code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not now, but in the future (in approximately 3 or 4 months), I plan to collaborate with the project. You could tell where, specifically, is responsible for displaying the codes?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
At a guess, somewhere in MapViewer.java. Beware that if you plan to work on the FreeCol code you will need to be able to work this sort of thing out for yourself, as we have very few developers and they are busy with other stuff.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, I already have a little experience in open source. Collaborated for more than 1 year in the open source project OpenKore (in Perl).
What I will have more difficulty is the fact that in Java, because I'm not used to high typography.
Anyway, thank you, this is for future plans =)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have seen this effect often when moving units.
It does seem to occur more often with scouts, especially after De Soto .
That suggests this may have to do with fog of war zone changes due to moving.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is an optimization to, in some cases like when refreshing the unit cursor, only redraw parts of the map (a few tiles around it), because map display consumes a large amount of CPU-time.
Colony labels are naturally associated and drawn together with the tile containing the colony, but part of them gets drawn on the tiles south of the colony.
Only when the active unit is 2 tiles south of a colony is the tile between both redrawn without the colony tile being redrawn, too. You can see this on my screenshots from a colony with a very long name.
There are a few solutions I thought about:
- Making the redrawn area larger would only move the problem and make it worse.
- Drawing all labels with the tile south of the colony could result in the same problem with a unit north of the colony.
- I could hack in some special case code, but I was working on cleaning up the code for map drawing and I'd not want to obfuscate it again.
- Moving all labels higher would hide the colony tile, but would be the easiest, cleanest solution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I further investigated this issue and found its slightly worse than known:
- The blinking of the cursor is not correctly deactivated, even in terrain view mode it was needlessly running the background thread and refreshing the tile. -> I fixed that in git.be3df27a.
- It also happens with the terrain cursor and its worse cause it can be moved more/faster, sometimes affecting colony names in same row but in a far away column on the side from occasional bigger refreshes.
- A single refreshed tile causes an area that is as high as 2 tiles to be refreshed, when 1.5 tiles height would be enough. I'm waiting to change this though, as this bug would not happen with the tile 2 south, but instead for the 2 tiles 1 south+1 southwest and 1 south+1southeast.
- The bug also affects the dark halo of undeads, which I activated temporarily for all units in testing. Its the only other thing affecting enough of the area of other tiles. As the halo is mostly not shown its less important though.
I think, the most likely fix would be drawing extra colony labels for the row above of which would be drawn normally.
No idea about the halo, because its so large that the glitch even shows for refreshed tiles north of it...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Probably wise ATM, however I am very pleased to see some progress on this annoying bug. The haloes are indeed a very minor issue --- I would be inclined to try to make them smaller, at least on the upper side.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I searched the codebase and could not find anything to test if revenge mode is running.
I'd need some isRevengeMode() call or similar to prevent map drawing from slowing down for the bugfix for the halo. It would also slightly speed up map display without doing the bug fix, as its currently doing isUndead on all units.
Could such a method be added Mike?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you, I'll use it for the bugfix. Its just that my difficulty was in finding a O(1) solution for the common case, like remembering when the mode is started. ^^
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I fixed the dark halo in git.9f6e4a9f. I profiled the game with it and the testing for revenge mode is fast enough.
A tiny bit of forts and fortresses was drawn over the tile south of them, which also triggered this bug. I fixed this in git.3a095390.
That means everything affected by this bug is fixed now.
For the future, please remember there may be code updates needed when replacing images with new artwork larger than a tile (any keys starting with "image.tileitem.") !
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Confirmed (debug game, move scout two tiles south of a colony, deselect, reset moves on the scout, and as soon as the green border begins to flash the classic colony label disappears). Something similar happens with the modern colony labels --- the lower part with the current buildable is chopped off.
This is pretty minor IMHO, and will have to wait for someone who understands the display code.
Not now, but in the future (in approximately 3 or 4 months), I plan to collaborate with the project. You could tell where, specifically, is responsible for displaying the codes?
At a guess, somewhere in MapViewer.java. Beware that if you plan to work on the FreeCol code you will need to be able to work this sort of thing out for yourself, as we have very few developers and they are busy with other stuff.
Well, I already have a little experience in open source. Collaborated for more than 1 year in the open source project OpenKore (in Perl).
What I will have more difficulty is the fact that in Java, because I'm not used to high typography.
Anyway, thank you, this is for future plans =)
I have seen this effect often when moving units.
It does seem to occur more often with scouts, especially after De Soto .
That suggests this may have to do with fog of war zone changes due to moving.
There is an optimization to, in some cases like when refreshing the unit cursor, only redraw parts of the map (a few tiles around it), because map display consumes a large amount of CPU-time.
Colony labels are naturally associated and drawn together with the tile containing the colony, but part of them gets drawn on the tiles south of the colony.
Only when the active unit is 2 tiles south of a colony is the tile between both redrawn without the colony tile being redrawn, too. You can see this on my screenshots from a colony with a very long name.
There are a few solutions I thought about:
- Making the redrawn area larger would only move the problem and make it worse.
- Drawing all labels with the tile south of the colony could result in the same problem with a unit north of the colony.
- I could hack in some special case code, but I was working on cleaning up the code for map drawing and I'd not want to obfuscate it again.
- Moving all labels higher would hide the colony tile, but would be the easiest, cleanest solution.
I further investigated this issue and found its slightly worse than known:
- The blinking of the cursor is not correctly deactivated, even in terrain view mode it was needlessly running the background thread and refreshing the tile. -> I fixed that in git.be3df27a.
- It also happens with the terrain cursor and its worse cause it can be moved more/faster, sometimes affecting colony names in same row but in a far away column on the side from occasional bigger refreshes.
- A single refreshed tile causes an area that is as high as 2 tiles to be refreshed, when 1.5 tiles height would be enough. I'm waiting to change this though, as this bug would not happen with the tile 2 south, but instead for the 2 tiles 1 south+1 southwest and 1 south+1southeast.
- The bug also affects the dark halo of undeads, which I activated temporarily for all units in testing. Its the only other thing affecting enough of the area of other tiles. As the halo is mostly not shown its less important though.
I think, the most likely fix would be drawing extra colony labels for the row above of which would be drawn normally.
No idea about the halo, because its so large that the glitch even shows for refreshed tiles north of it...
Probably wise ATM, however I am very pleased to see some progress on this annoying bug. The haloes are indeed a very minor issue --- I would be inclined to try to make them smaller, at least on the upper side.
I found some small parts of the territorial borders drawn on the map were also affected.
That and the settlement names is fixed in git.8a482888.
I searched the codebase and could not find anything to test if revenge mode is running.
I'd need some isRevengeMode() call or similar to prevent map drawing from slowing down for the bugfix for the halo. It would also slightly speed up map display without doing the bug fix, as its currently doing isUndead on all units.
Could such a method be added Mike?
Very easily. Git.6503070.
Thank you, I'll use it for the bugfix. Its just that my difficulty was in finding a O(1) solution for the common case, like remembering when the mode is started. ^^
I fixed the dark halo in git.9f6e4a9f. I profiled the game with it and the testing for revenge mode is fast enough.
A tiny bit of forts and fortresses was drawn over the tile south of them, which also triggered this bug. I fixed this in git.3a095390.
That means everything affected by this bug is fixed now.
For the future, please remember there may be code updates needed when replacing images with new artwork larger than a tile (any keys starting with "image.tileitem.") !