Book Image

Stencyl Essentials

By : Richard Sneyd
Book Image

Stencyl Essentials

By: Richard Sneyd

Overview of this book

Table of Contents (20 chapters)
Stencyl Essentials
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Multiple tile layers


All we need to do now is make a few small changes to our game level to get all of this working correctly. Follow these last few steps:

  1. In the Dashboard tab, under Scenes, open up Level 1 again.

  2. You will see that we currently have two background layers and one tile layer. Actors can only be placed on the tile layers, which means, currently, all of our actors will be rendered to the same layer. This could create some ugly rendering anomalies regarding the z-order. To avoid this, let's add two additional tile layers by clicking on the following button twice:

    Tip

    z-order refers to the order in which sprites are drawn on the screen, so it is important to control which actors appear in front and which ones appear behind.

  3. You will now see two additional tile layers at the top of the Layers stack (Layer 3 and Layer 4) ), as shown in the following screenshot:

  4. How we order our actors on these layers is going to be very simple. Place the Air Balloon on the very top layer (Layer 4) so...