How Are Ship Images Positioned?
Posted: Fri Oct 11, 2013 3:16 am
Could someone explain how a ship's base, cloak, floor, and shield images are laid out?
kestral.xml
kestral.txt
The wiki isn't clear on what each of the x/y offsets are relative to and how the images' bounds affect one another.
The cloak image is always scaled 20 pixels wider and taller than the base image, so presumably it's positioned at baseX-10, baseY-10 to keep their centers lined up?
The floor's position/scale wasn't mentioned at all (Given the 35px sprites, there shouldn't be any floor scaling).
These are described as offsetting the 'entire' ship.
X_OFFSET*35 + HORIZONTAL
Y_OFFSET*35 + VERTICAL
The Kestral's base seems to be centered vertically on the shield image, so what's that y="-116" doing where the wiki says it "Slides the base image"?
kestral.xml
Code: Select all
<img x="-71" y="-116" w="677" h="444"/>
kestral.txt
Code: Select all
X_OFFSET
0
Y_OFFSET
2
VERTICAL
0
ELLIPSE
350
220
-30
0
The wiki isn't clear on what each of the x/y offsets are relative to and how the images' bounds affect one another.
The cloak image is always scaled 20 pixels wider and taller than the base image, so presumably it's positioned at baseX-10, baseY-10 to keep their centers lined up?
The floor's position/scale wasn't mentioned at all (Given the 35px sprites, there shouldn't be any floor scaling).
These are described as offsetting the 'entire' ship.
X_OFFSET*35 + HORIZONTAL
Y_OFFSET*35 + VERTICAL
The Kestral's base seems to be centered vertically on the shield image, so what's that y="-116" doing where the wiki says it "Slides the base image"?