Art useable for multiple units/buildings ?

Pomphis

Warlord
Joined
Sep 22, 2010
Messages
294
Location
Berlin, Germany
I am slowly making the first baby steps, but busy enough with XML. So I wonder whether I could create a new unit or building in XML and simply use the same art as for an existing unit/building. Should that work or will the game have a problem with two (or more) units or buildings using the same art ?
 
While I have never actually tried it, what I gather from the source code is that graphics works like this:

Let's say the game needs to draw a unit. It's the same for buildings, features and so on, basically all 3D graphics set in xml.
The exe asks the DLL for the graphics for the unit. The DLL looks up which unit art the unit is using, then looks up that unit art xml info, which it then returns to the exe file. This means the way I see it, 2 units can have the same info and the game wouldn't care because from a graphical point of view, they might as well have the same unit type.
 
I use this all the time when making new sets of buildings or units. I usually use a "rubber ducky" unit/building so that I am reminded to fix the art later.
 
Back
Top Bottom