Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building foundation offset #57

Closed
TheJJ opened this issue Oct 30, 2014 · 11 comments
Closed

Building foundation offset #57

TheJJ opened this issue Oct 30, 2014 · 11 comments
Labels
bug Behaving differently as it should behave lang: c++ Done in C++ code
Milestone

Comments

@TheJJ
Copy link
Member

TheJJ commented Oct 30, 2014

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:
openage

@TheJJ TheJJ added bug Behaving differently as it should behave lang: c++ Done in C++ code labels Oct 30, 2014
@TheJJ TheJJ added this to the v3.0 milestone Oct 30, 2014
@zaxozhu
Copy link
Contributor

zaxozhu commented Nov 2, 2014

As I understand, mouse cursor should be a center for a ground and a building sprite?

@TheJJ
Copy link
Member Author

TheJJ commented Nov 2, 2014

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.

@zaxozhu
Copy link
Contributor

zaxozhu commented Nov 2, 2014

You are right, algorithm needs to be fixed. However, I'm figured out how to place the ground properly.

@zaxozhu
Copy link
Contributor

zaxozhu commented Nov 2, 2014

I have a question. Is start_pos should be a west corner?

@TheJJ
Copy link
Member Author

TheJJ commented Nov 2, 2014

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.

@franciscod
Copy link
Contributor

i think the game assets have the offset, we don't have to calc it

@TheJJ
Copy link
Member Author

TheJJ commented Nov 5, 2014

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.

@franciscod
Copy link
Contributor

but are we using the hotspot whe placing the graphic atm?

@zaxozhu
Copy link
Contributor

zaxozhu commented Nov 5, 2014

openage_2014-11-06_00-12-42_00
This bug is on every building.
Edit: Gabe's hair is watching you.

@franciscod
Copy link
Contributor

lol@house

@franciscod
Copy link
Contributor

i improved the alignment with most buildings here #143

openage_2014-11-07_05-21-51_00

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Behaving differently as it should behave lang: c++ Done in C++ code
Projects
None yet
Development

No branches or pull requests

3 participants