Question

Take a look at this image:
http://www.sprites-inc.co.uk/files/X/X/X4-X6/mmx_x4_x_sheet.gif

My question is; What is the best way to use this is a spritesheet? Making the usual FrameCount / FrameWidth won't work so well here. My brother suggested that I could assign each frame with a position, size and number. That sounded like a great idea, but the problem is that I have no idea how!
All I know that I can do, after assigning those three, is how to change the frame depending on their numbers.
So; What is the best way to do, and if this is, how do I do it? Do you know a site with such tutorial? I have searched but can't find anything. Or could you give me hints here?

Thanks for responding!

Was it helpful?

Solution

What you are looking to do, is work with a Texture Atlas, which is essentially an index of images contained inside of your spritesheet. You can then import the data into your environment to process the sprites contained inside of your image.

Typically you would have all the sprites separate, and you would use a sprite packing tool, that would create a spritesheet, and a texture atlas for you to use.

In this case, you already have a spritesheet packed, therefore you would need to calculate the atlas yourself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top