Standard definition of sprites?
Members - Reputation: 218
Posted 16 November 2011 - 04:24 PM
Is there a standard way of describing image positioning in a sprite sheet?
I hope I'm using the proper terminology, so in other words:
A lot of times a single image file will have a lot of tiny images in it. Program would use those individual images for a game/application, but it needs to know the position of those images.
Is there a standard way of describing the positions of those tiny images?
For example maybe a text file:
name:offsetx, offsety, lengthx, lengthy
or in xml:
Is there a standard file format like that?
If not, than is there a recommended way?
And finally, if not even something that's recommended, are there any personal recommendations?
Members - Reputation: 151
Posted 16 November 2011 - 07:27 PM
<sprite name="butterfly"> <!--- I wouldn't use offset here, offset suggests the animation frame is offset by an x,y from the actual sprite's x,y ---> <x>200</x> <y>100</y> <!--- width and height make a lot more sense than length imho ---> <width>40</width> <height>25</height> </sprite>
Members - Reputation: 782
Posted 17 November 2011 - 07:46 AM
agreed, width+height is better, and so is the whole xml you made up.
still kind of disheartening there's no standard for something so commonly used.
There are too many variables that are important to program specific optimization for it to be standard imo.