JPSprite is a pack for atlases, sprites and animated sprites management.
All the best games use an atlas system because it is the best solution to optimize your game: improved performance because the sprites are using the same texture (less draw calls) and reduced memory consumption (a lot of wasted space if each sprite had its own texture).
JPSprite is based on TexturePackerGUI which is a software for atlases creation, which generates a texture containing the sprites and an xml to describe the UV coordinates for each of them.
Once your atlas and its xml file are generated by TexturePackerGUI, import and reference them in your ShiVa game.
Give to JPSprite a HUD component and the name of a sprite and it will apply the correct texture to your component and the corresponding UV coordinates.
It also embeds an animation system. If your atlas contains a serie of sprites ending with consecutive index (starting from 0), JPSprite will consider it as an animation. There are many options, such as the ability to choose the frame rate of the animation, change its scale, and much more.
JPSprite is also equipped with a formidable optimization system. If you decide to enable it, this system will adjust the performances of JPSprite depending on the state of your game. If your game frame rate is low at some time, JPSprite will automatically reduce its own working speed to maximize the resources available for the rest of your game, without any visible impact on the animated sprites.
As an example, the game Babel Rising: Cataclysm which can be found in my portfolio uses a similar sprite and optimization system, and the game can display several hundreds of animated sprites at once, keeping a good framerate.
What contains the lite version ?
It contains everything that is not related to the animations:
- Atlas loading.
- Static sprite display for HUD components and objects materials.
What contains the paid version ?
It adds support for animated sprites and contains a very powerful and smart optimisation system.
TexturePacker comes with a profile name 'ShiVa3D (+ JPSprite extension)' that sets all the options for you. All you have to do is to drag and drop your sprites into the TexturePacker UI.