Loading the texture atlas Loading the texture atlas To get the texture atlas into Pixi, load it using Pixi’s loader . If the JSON file was made with Texture Packer, the loader ...
Collision detection The hitTestRectangle function Collision detection You now know how to make a huge variety of graphics objects, but what can you do with them? A fun thing t...
More about sprites More about sprites You’ve learnt how to use quite a few useful sprite properties so far, like x , y , visible , and rotation that give you a lot of control ...
Size and scale Size and scale You can change a sprite’s size by setting its width and height properties. Here’s how to give the cat a width of 80 pixels and a height of 120...
Positioning sprites Positioning sprites Now that you know how to create and display sprites, let’s find out how to position and resize them. In the earlier example the cat spr...
Case study: Treasure Hunter The code structure Initialize the game in the setup function Creating the game scenes Making the dungeon, door, explorer and treasure Making the blob...