As a result, the atlas will be filled with as much sprites as possible, and you will have almost no lost space. With TexturePacker, you will create a square atlas with all of your sprites inside. Why using JPSprite and TexturePacker ?Īs we use square textures in games, there is often unused space in textures that comes separately. You can then tell JPSprite "Hey, apply this animation on that HUD component", and the animation will play.
You just have to name the sprites of your animation properly, with the frame index as a suffix, and JPSprite will automatically detect these sequences. While TexturePacker is designed for non animated sprites, JPSprite is able to animate things. The paid version adds support for sprites animation. This part of JPSprite is available for free. JPSprite is a tools that is able to read the atlas and its description file from TexturePacker, and apply the right UV coordinates to a HUD component or object material in a ShiVa game. TexturePacker can export that description file in many formats, we will use xml as it is the one that ShiVa is able to read natively. This atlas comes with a file that describes the UV coordinates of each sprite that is stored in the atlas.
TexturePacker is a great software that is able to combine several images into a big one, named an atlas or a sprite sheet. I have created JPSprite to share this experience to anyone wanting to create a powerful sprite based game, or any game developer trying to optimise its game starting, with 2D elements like menu items or so on.
I now have a great experience and I know how to do things in an optimised way. With these games I had to create my own sprite animation engine and as we were targetting mobiles, I faced several constraints and I had to work around optimisation. Sprites are the heart of these games, they use and abuse of sprites. As we are here to talk about sprites, I will just name 2 of the sprite based games I have developed: Hills of Glory WWII and Babel Rising Cataclysm that are available on iOS and Android. I have developed many games, both 2D and 3D ones. I'm Julien Pierron, former employee of Stonetrip, the company that has created the wonderful game development tool: ShiVa 3D. It contains everything related to this tutorial and is a great example on how to manage sprites data and movements in a 2D game.įirst, please let me introduce myself. This tutorial comes with a demo named JPSpriteSample, you can try it online. This tutorial will show you how sprite sheets from TexturePacker can easily be integrated in a game made with ShiVa 3D, by using a simple tool named JPSprite.