

How does one create so many art files? Easy. The HDR assets are used for devices with a screen width >= 2000 pixels or so, i.e. The HD assets are used for devices with a screen width greater than 959 pixels, for example the iPad 1st generation at 1024x768. The SD assets are used for older devices like an iPhone 3GS with a screen resolution of 480x320. These days, it can help to produce three tiers of art assets: SD, HD and HDR (HD Retina). We'll throw in a few standing frames too: ninja-stopped0000.png through ninja-stopped0003.png. For the jumping frames, ninja-sidekick-e0000.png through ninja-sidekick-e0012.png. We can flip the right-facing sprites over the x plane to create left-facing sprites.įor the running frames, we'll use ninja-running-e0000.png through ninja-running-e0007.png. In the case of a platformer, we just need frames of the ninja running and jumping to the right. The first step in making a spritesheet is deciding what sprite frames you want to include.
#Texturepacker last frame how to
In this chapter, we'll make a ninja spritesheet and then learn how to use it in your game. See how tightly packed these sprites are? Compressed image formats can be used to further increase the speed and efficiency of your game. Rotation can be applied to the sprites so that more of them fit neatly into the texture. Extra spacing around your sprites can be automatically trimmed from the texture and then re-applied when loaded into an actual sprite. Just like a movie reel, a spritesheet can create the illusion of motion.Ī benefit of packing your sprites into a spritesheet is that you can really optimize the texture memory required by your game. This makes it easy to animate a single sprite by changing the sprite's displayed frame in sequence over a specified duration.


It can be moved around the screen, stretched, rotated, skewed, faded and tinted.Ī spritesheet is a collection of sprites into a single texture file.
