Comments (15)
we'll need #121 first
from openage.
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):
And this is graphic 3782 (slp id 4164)
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:
- http://aok.heavengames.com/university/modding/guide-to-data-editing-2/
- no sleep night, openage is amazing lol
from openage.
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.
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.
I don't think we need a MultiLayerBuilding: why Building shouldn't have all
the capabilites for handling annexes?
from openage.
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.
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.
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.
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.
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.
from openage.
omg and somehow the unit outline gets masked by graphics that cover it.. aaaaaaaaaaaaa implementing that sure will be a nightmare
from openage.
@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.
#172 is bringing a huge part needed for having the village center: delta graphics and building annexes :D
from openage.
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.
as #172 is merged, this is more or less done.
from openage.
Related Issues (20)
- "error: βDictβ is not a member of βnyanβ" during build HOT 7
- Can't build with clang, error: "jthread is supported now, remove custom definition" HOT 4
- Asset conversion issue, AttributeError: 'NoneType' object has no attribute 'readable' HOT 6
- Adding PR/ISSUE Templates for this repo HOT 7
- Asset path type is incorrectly used HOT 5
- error: Couldn't find qml root folder HOT 15
- Test fail when building with GCC 13.2.1 HOT 10
- Error launching game, uncaught exception(s) HOT 25
- openage game: error: the following arguments are required: --modpacks HOT 4
- Running Error on Mac osx 13.4(Macbook M1 Pro ARM architecture) HOT 1
- FATAL: terminate has been called uncaught exception std::exception of type std::__1::system_error: thread::join failed: Invalid argument HOT 2
- Multiple cmake issues when trying to build HOT 4
- Submission to Steam HOT 2
- OpenGL error when launching on Wayland HOT 11
- CMake can't find toml11 on Linux Mint 21.2 HOT 4
- Errors after the new PR merged HOT 3
- Link on website https://openage.sft.mx/ to windows packages is a broken link HOT 2
- Windows Build: Python Command Requiring --modpacks Argument HOT 3
- Asset conversion stalls on media conversion HOT 10
- Fix Ubuntu Dependency installation script HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openage.