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

Let's turn this map into a game

Now that we have set up our map, we can finally start coding and re-use the assets we just created. So let's open our app.js file and remove any existing code in order to have a fresh start.

The scaffolding

As with every Titanium application we have developed so far, we will create a new window with a black background. We also want to interact with this window later down our code, so we will keep its reference in the win variable:

var win = Ti.UI.createWindow({ backgroundColor: 'black' });

This window will probably be the only Titanium control that we will be using for the whole application. From this point, all the interactions will be done using the game engine. This will allow us to have a more powerful control scheme ...

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