Thursday, October 20, 2011

XNA - Sprite Viewer

It's been a while I didn't update my blog. Recently I've done a simple sprite viewer in XNA.

Basically it be used to view a texture atlas by providing correct texture data file.

In short, you will need to use Texture Packer to pack all your textures and generate the texture data file by selecting LibGDX format.

Just to promote a little bit about Texture Packer in case anyone of you who do not know what is that. The main role of Texture Packer is to combine different texture into one big texture which we call it as Texture Atlas. The purpose of doing is to optimize the in game performance so that it does not need so many draw calls to render sprites/animations.

This is even more important when u are developing games for mobile because it has limited memory so you must save as much as u can while maintaining the performance and quality of your game!

In addition, the main lesson I learned from this simple application is the input system that I designed based on delegation concept. Well there are other different ways of pattern you can use to implement your input system but most likely they'll be using delegation pattern too.


Sample screenshots:

Screenshot 1

















Screenshot 1


Download link: