Join Lee Brimelow for an in-depth discussion in this video Creating sprite sheets with TexturePacker, part of Building Flash Games with Starling.
- View Offline
So in the last movie I showed how you can incorporate images into your game…using that Assets class and embedding the images there.…But typically in a game you are going to have lots of different image files, and…the problem with that, if you keep them all separated, is that everytime your game…loads it's going to have to make multiple network requests.…So if this game is embedded on the web, you don't want every single little image…file to have to create a new network operation to get it.…
What's better is to pack all of the graphics in your game into either a single…image or sometimes you have too many and you have to go into, let's say, a second…or a third, but packing them all together into a single image and this gives…you numerous benefits.…First of all again, you only have to make one network operation to get the…image, and then the other is that you are not having to upload multiple…textures on to the GPU, you essentially upload, in our case, it's going to be a…single image on to the GPU as a texture and then we can pull the individual…
Starting with installation and configuration of Starling and creation of a Flash Builder project, the course shows how to prepare and import graphical assets, create MovieClip classes from sprite sheets, manage various gaming objects, detect collisions, and add both particle and sound effects. The finished game can be deployed to any browser or mobile device that integrates Flash Player 11, which was released in September 2011.
- Downloading and installing Starling and Flash Builder
- Creating the project
- Creating the main game class, static assets class, and other classes
- Building the state machine
- Creating a static assets class
- Adding images
- Creating sprite sheets with Texture Packer
- Creating and importing bitmap fonts
- Detecting collisions
- Adding particle effects
- Adding sound effects