Closed TheJJ closed 9 years ago
As I understand, mouse cursor should be a center for a ground and a building sprite?
Mouse cursor placement is easy to fix, the main problem currently is the wrong center of the building texture hotspot, which does not equal the terrain tile grid placement. The calculation algorithm mentioned is likely to be wrong.
You are right, algorithm needs to be fixed. However, I'm figured out how to place the ground properly.
I have a question. Is start_pos
should be a west corner?
currently, start_pos
is indeed the west corner of the building foundation. This can of course be adjusted to be the center of the mouse click. But this does not fix the offset error of the foundation and the building texture.
i think the game assets have the offset, we don't have to calc it
All graphical game assets have a hotspot, which is the center of the sprite. The challenge is to position this hotspot correctly, in this case the center position of odd and even foundation sizes has to be found.
but are we using the hotspot whe placing the graphic atm?
This bug is on every building. Edit: Gabe's hair is watching you.
lol@house
i improved the alignment with most buildings here #143
however, castles, houses and some other buildings are still misaligned.
i think we might have to deal with this at texture-hotspot-delta-zombine level instead of at tile level
The hotspot of buildings sprites may be offset. The placement algorithm probably needs to be fixed, the calculation is done in the terrain_object class. This algorithm needs to be improved, the hotspot is not correctly aligned with the terrain grid.
Error example: