O'Reilly logo

Starling Game Development Essentials by Juwal Bose

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

Creating a top-down game scene

Let us try to implement a sample Starling-based top-down level with provision to detect the tile on which we touch. We will use the source and the tile sheet given in the Chapter 1 folder from the shared source. The code for the TopDownScene class is shared in the following code snippet. You will need to initialize this class from the Starling document class using new Starling(TopDownLevel, stage).

package com.csharks.juwalbose { import starling.display.DisplayObjectContainer; import starling.display.Image; import starling.events.Event; import starling.events.Touch; import starling.events.TouchEvent; import starling.textures.Texture; import starling.textures.TextureAtlas; public class TopDownLevel extends DisplayObjectContainer ...

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