O'Reilly logo

Creating Mobile Apps with Appcelerator Titanium by Christian Brousseau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

We need a hero

Every game needs a hero and our game will be no exception to this rule. The first order of business will be to determine how he will look like on the screen. We want the hero to be able to face all the four directions when moving around the map, and we want him to have a walking animation when he is moving.

Hold that code, will you?

Just as we did with the map, we will need to have a graphical representation of our hero. Not only that, we will need a drawing for each direction to which our hero is facing as well as every frame of his walking animation.

To do this, we could use one image for every position at which our hero will appear in the game world, but a better approach will be to use a SpriteSheet. Much like a tileset, a SpriteSheet ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required