Coder Social home page Coder Social logo

Comments (15)

franciscod avatar franciscod commented on April 28, 2024

we'll need #121 first

from openage.

franciscod avatar franciscod commented on April 28, 2024

For "multi-layer buildings" (or at least the town center) we need to implement a combination of building annexes and graphic deltas.

If a building has annexes, they are like "extra heads" for the "main building". I don't know how this is handled ingame but it appears that they share hit points (or annex buildings don't have stats and they're only just for rendering purposes?)

Graphic deltas are similar, but simpler. They allow to "combine several graphic slots into one".

This is graphic 2972 (slp id 3416):
1415190220
And this is graphic 3782 (slp id 4164)
1415190238

On the game assets, the only mention (that i've found) of graphic 3782 is that it's a delta of 2972. This means whenever graphic 2972 gets rendered, graphic 3782 also gets rendered.

Both building annexes and graphic deltas have a position (offset) for positioning them accordingly to the "parent" object. This hints that we should use those positions instead of calculating a center like in #57

sources:

from openage.

franciscod avatar franciscod commented on April 28, 2024

I think milestone v3.0 sets the bar for ditching TestBuilding, TerrainObject, Texture and refactoring TestBuilding into Building (the real one that should remain for the final game) and Graphic as an enhanced Texture. What is the future of TerrainObject? πŸ˜•

from openage.

TheJJ avatar TheJJ commented on April 28, 2024

We will create a GameObject and rename TerrainObject to Building and let it inherit from GameObject. @jamesmintram's rendering improvements will then render GameObjects. The MultiLayerBuilding could inherit from Building then supporting the annexes.

from openage.

franciscod avatar franciscod commented on April 28, 2024

I don't think we need a MultiLayerBuilding: why Building shouldn't have all
the capabilites for handling annexes?

from openage.

TheJJ avatar TheJJ commented on April 28, 2024

Maybe, maybe not. I'm thinking of the simple implementation of a single sprite building, which is then extended for multi-sprite stuff. Is hopefully easier to understand and implement.

from openage.

mic-e avatar mic-e commented on April 28, 2024

The real building (or rather, building type) that will remain for the final game is a Nyan object, pending #28. The only thing we really need for milestone 3 is correct rendering of the deltas.

The main design question is: Do we want those delta graphics (I don't like that name, btw) to be rendered by the game, or do we want to merge them to one PNG file during openage.convert?

from openage.

franciscod avatar franciscod commented on April 28, 2024

even with delta (the name sucks) rendering we need annex buildings too! every town center is made of the "main" building + 3 annexes (that make the layers so the villagers can go through columns and below roofs and stuff like that)

i would reimplement the delta rendering instead of flattening all into a single png... when all is done we can optimize it if we consider it proper, but now it's too early to simplify the game assets IMO

from openage.

mic-e avatar mic-e commented on April 28, 2024

I didn't even know there was a difference between those two...

regarding optimization, keeping them separate might make sense (think the blacksmith + the tiny, but animated, column of smoke. combining them will create a large, animated PNG that will eat up a lot more graphics memory).

from openage.

goto-bus-stop avatar goto-bus-stop commented on April 28, 2024

Note also that in a Town Center, villagers have to be rendered on top of the center building part, but below the extensions. That would be difficult using just one PNG.

Town Center

from openage.

franciscod avatar franciscod commented on April 28, 2024

omg and somehow the unit outline gets masked by graphics that cover it.. aaaaaaaaaaaaa implementing that sure will be a nightmare

from openage.

mic-e avatar mic-e commented on April 28, 2024

@franciscod the hard part is to decide which one to draw first.

Using a shader to draw the outline isn't that hard. You just look at whether you're overwriting an "outline pixel" and if yes, don't.

Regarding the question which to draw first, I think you're safe when you draw the southernmost things first.

from openage.

franciscod avatar franciscod commented on April 28, 2024

#172 is bringing a huge part needed for having the village center: delta graphics and building annexes :D

from openage.

Jon0 avatar Jon0 commented on April 28, 2024

The tc works perfect in my work, its just annexes are not rendered in the editor list. The tc is found after the monestry and blacksmith in the editor list which only shows the side arms of the tc - after placement it should work.

from openage.

TheJJ avatar TheJJ commented on April 28, 2024

as #172 is merged, this is more or less done.

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.