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
About the Author
About the Reviewers


The world of game development has been in a state of flux for the past few years. New technology, as well as new development tools and frameworks, has diversified the games industry and opened up the field to those who may not otherwise have been in a position to realize and publish their game concepts.

Stencyl is one such innovation. Developed from the ground up by founder Jonathan Chung, to be as accessible as possible to as many people as possible, yet it still retains the awesome power necessary for professional-level developers. Stencyl makes it possible for anyone with a great idea and the right motivation to develop their own games, from concept to market.

Stencyl Essentials has been written to get you up and running with Stencyl faster than with any other book, as it has been written in terse, yet lucid prose with a no-nonsense style, enabling you to get to grips with Stencyl in a fun, yet fast-paced way. This book is centered around a project, which has been designed to reinforce all of the key learning objectives. You will be guided through the process of building a game prototype, which is based on a successful, published game called Mudslide Cowboy (CyberMyth Games). By the end of this book, you will be competent in the use of all of Stencyl's most important features, and quite prepared to start working on your own game projects.

What this book covers

Chapter 1, Exploring the Stencyl Toolset and Game Engine, introduces the Stencyl toolset and interface, demonstrating how to navigate through all the most important screens.

Chapter 2, Starting the Game Project, explains the game concept, which we will be working on in the subsequent chapters, and guides you through the process of creating your first game project.

Chapter 3, Backgrounds and Tilesets, explains how to import Backgrounds and Tilesets and how to configure their settings, in preparation for use in our game levels.

Chapter 4, Building Levels Using Scenes, explains how you can learn to utilize backgrounds, foregrounds, and tiles to sculpt a visually compelling and varied game level.

Chapter 5, Actor Types and Instances, introduces you to the process of importing, customizing, and configuring actors, which can then be made interactive through using actor behaviors.

Chapter 6, Writing Simple Behaviors, teaches you the process of building the game logic using the signature block-snapping interface of the Behavior Designer in Stencyl.

Chapter 7, Complex Behaviors and Code, digs deep into the incredible power of Stencyl's visual programming system, showing you how to harness it at a more advanced level.

Chapter 8, Adding Sound FX and Music, explains how Stencyl handles audio, and then guides you through the process of importing sound files, configuring them, and playing them in-game.

Chapter 9, Adding HUD Elements, shows how we can use actors in a special way to create animated elements of our heads-up display.

Chapter 10, Adding Menus and Buttons, guides you through the process of creating a Start screen and adding functional buttons to it.

Chapter 11, Scoring and Game Rules, helps you implement a game rule, based around the collection of gold coins, that will aid us in measuring success or failure during play sessions.

Chapter 12, Publishing and Monetization, gives us a clear overview of the principal publishing and monetization available to game developers in Stencyl.

What you need for this book

To get the most out of this book, you should at least have a basic understanding of computing. Ideally, you would also have some previous computer programming knowledge, although this is not completely essential. You will need to have access to a reasonably modern computer, with a reasonably modern operating system. For Windows users, Microsoft Windows XP or newer should do fine. I'd recommend at least 2 gigabytes of RAM, but preferably more. Mac OSX and Linux users should also be OK, as long they have a similar or superior amount of RAM.

Who this book is for

This book is mainly aimed at people who are familiar with computers, and have at least some basic computer programming experience. It has been designed to get you up and running with Stencyl in as little time as possible, so if you're looking for a no nonsense guide that will yield very fast results, this is the book for you.


In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: " When the download completes, you should have a file called AlienApproach.stencyl."

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us to develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.

Downloading the color images of this book

We will also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from:


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to and enter the name of the book in the search field. The required information will appear under the Errata section.


Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at , with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.


If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.