Coder Social home page Coder Social logo

Building foundation offset about openage HOT 11 CLOSED

sfttech avatar sfttech commented on April 28, 2024
Building foundation offset

from openage.

Comments (11)

zaxozhu avatar zaxozhu commented on April 28, 2024

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

from openage.

TheJJ avatar TheJJ commented on April 28, 2024

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.

from openage.

zaxozhu avatar zaxozhu commented on April 28, 2024

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

from openage.

zaxozhu avatar zaxozhu commented on April 28, 2024

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

from openage.

TheJJ avatar TheJJ commented on April 28, 2024

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.

from openage.

franciscod avatar franciscod commented on April 28, 2024

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

from openage.

TheJJ avatar TheJJ commented on April 28, 2024

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.

from openage.

franciscod avatar franciscod commented on April 28, 2024

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

from openage.

zaxozhu avatar zaxozhu commented on April 28, 2024

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

from openage.

franciscod avatar franciscod commented on April 28, 2024

lol@house

from openage.

franciscod avatar franciscod commented on April 28, 2024

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

from openage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.