Stencyl Essentials
()
About this ebook
- Learn to develop fantastic 2D computer games in just a fraction of the usual time using Stencyl’s visual programming language
- Gain a deep understanding of all the great game development and design features and tools that Stencyl has to offer
- Build your very first computer game prototype with Stencyl by following the step-by-step lessons in this book
If you are a computer game enthusiast who has always wanted to know what it takes to build a playable game, or maybe you would like to expand your programming knowledge so that you can develop great computer games using a solid game engine and toolkit, then this book is for you.
Related to Stencyl Essentials
Related ebooks
GameSalad Essentials Rating: 0 out of 5 stars0 ratingsConstruct 2 Game Development by Example Rating: 0 out of 5 stars0 ratingsMoving from Unity to Godot: An In-Depth Handbook to Godot for Unity Users Rating: 0 out of 5 stars0 ratingsUnity 5 for Android Essentials Rating: 4 out of 5 stars4/5Learning Unreal® Engine iOS Game Development Rating: 0 out of 5 stars0 ratingsMastering Android Game Development Rating: 0 out of 5 stars0 ratingsUnity Game Development Blueprints Rating: 0 out of 5 stars0 ratingsGetting Started with Unity 5 Rating: 5 out of 5 stars5/5Becoming Comfortable with Unity Rating: 0 out of 5 stars0 ratingsiOS Game Development By Example Rating: 0 out of 5 stars0 ratingsUnity Animation Essentials Rating: 0 out of 5 stars0 ratingsNGUI for Unity Rating: 0 out of 5 stars0 ratingsGamification with Unity 5.x Rating: 0 out of 5 stars0 ratingsBuilding an RPG with Unreal Rating: 0 out of 5 stars0 ratingsSwift 2 Design Patterns Rating: 0 out of 5 stars0 ratingsLearning Stencyl 3.x Game Development: Beginner's Guide Rating: 0 out of 5 stars0 ratingsOuya Unity Game Development Rating: 0 out of 5 stars0 ratingsVMware ThinApp 4.7 Essentials Rating: 0 out of 5 stars0 ratingsGame Development with GameMaker Studio 2: Make Your Own Games with GameMaker Language Rating: 0 out of 5 stars0 ratingsBuild a 3d Virtual Reality Whackamole Game Rating: 0 out of 5 stars0 ratingsInstant BlueStacks Rating: 5 out of 5 stars5/5CRYENGINE Game Development Blueprints Rating: 0 out of 5 stars0 ratingsAndroid: Game Programming Rating: 0 out of 5 stars0 ratingsMastering Godot: A Comprehensive Guide to Game Development Rating: 0 out of 5 stars0 ratingsVirtual Reality with VRTK4: Create Immersive VR Experiences Leveraging Unity3D and Virtual Reality Toolkit Rating: 0 out of 5 stars0 ratingsTorque 3D Game Development Cookbook Rating: 0 out of 5 stars0 ratingsPapervision3D Essentials Rating: 0 out of 5 stars0 ratingsLearning Libgdx Game Development Rating: 0 out of 5 stars0 ratingsBeginning Unreal Engine 4 Blueprints Visual Scripting: Using C++: From Beginner to Pro Rating: 0 out of 5 stars0 ratingsWindows Store App Development: C# and XAML: C# and XAML Rating: 0 out of 5 stars0 ratings
Software Development & Engineering For You
Python For Dummies Rating: 4 out of 5 stars4/5Android App Development For Dummies Rating: 0 out of 5 stars0 ratingsGrokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Hand Lettering on the iPad with Procreate: Ideas and Lessons for Modern and Vintage Lettering Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Creative Selection: Inside Apple's Design Process During the Golden Age of Steve Jobs Rating: 5 out of 5 stars5/5Beginning Programming For Dummies Rating: 4 out of 5 stars4/5Level Up! The Guide to Great Video Game Design Rating: 4 out of 5 stars4/5Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems Rating: 4 out of 5 stars4/5Lua Game Development Cookbook Rating: 0 out of 5 stars0 ratingsOneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5Tiny Python Projects: Learn coding and testing with puzzles and games Rating: 5 out of 5 stars5/5Managing Humans: Biting and Humorous Tales of a Software Engineering Manager Rating: 4 out of 5 stars4/5How Do I Do That In InDesign? Rating: 5 out of 5 stars5/5Adobe Illustrator CC For Dummies Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsAgile Practice Guide Rating: 4 out of 5 stars4/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5Gray Hat Hacking the Ethical Hacker's Rating: 5 out of 5 stars5/527 PROGRAM MANAGEMENT INTERVIEW TECHNIQUES - To Ace That Dream Job Offer ! Rating: 5 out of 5 stars5/5Data Visualization: a successful design process Rating: 4 out of 5 stars4/5Succeeding with AI: How to make AI work for your business Rating: 0 out of 5 stars0 ratingsRy's Git Tutorial Rating: 0 out of 5 stars0 ratingsGood Code, Bad Code: Think like a software engineer Rating: 5 out of 5 stars5/5iPhone Application Development For Dummies Rating: 4 out of 5 stars4/5
Reviews for Stencyl Essentials
0 ratings0 reviews
Book preview
Stencyl Essentials - Richard Sneyd
Table of Contents
Stencyl Essentials
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Exploring the Stencyl Toolset and Game Engine
Downloading and installing Stencyl
Creating an account and signing in
Exploring Stencyl – screens and windows
The Welcome Center
Drop-down menus
The toolbar
The Welcome Center tab
The Dashboard
Scene Designer
The Palette
The Log Viewer
Summary
2. Starting the Game Project
Mudslide Cowboy
The fictional element
The game rules
Target platforms
The control system
Adaptive cursor
The project files
Creating the game project
Summary
3. Backgrounds and Tilesets
Backgrounds and foregrounds
Adding our first background
Three more backgrounds
Our first tileset
Summary
4. Building Levels Using Scenes
Creating our first level
Implementing foregrounds and backgrounds
Adding tiles to our level
Exercise
Summary
5. Actor Types and Instances
What are actors?
Adding our first actor
Importing our first animation
Collision shapes
Importing the rock Actor Type
Summary
6. Writing Simple Behaviors
The player handler
Creating a new actor behavior
Creating attributes
Custom events
Testing and debugging
Adding the balloon
Configuring prefab behaviors
Modifying prefab behaviors
Testing the changes
Summary
7. Complex Behaviors and Code
Adding player interaction
Initializing the variables
Handling player clicks
Our first custom block
Handling directional clicks
The when mouse is released event
Switching animations
Summary
8. Adding Sound FX and Music
Supporting both MP3 and OGG formats
Importing audio files into Stencyl
Sound file designation in Stencyl
Playing sound FX and music in Stencyl
Summary
9. Adding HUD Elements
The dynamic cursor
Summary
10. Adding Menus and Buttons
Adding the scene and background
Adding the buttons
Programming the button
Summary
11. Scoring and Game Rules
Collecting coins
Coin collisions and physics settings
Importing the font
Coin collection
Rendering text to the screen
Multiple tile layers
Summary
12. Publishing and Monetization
Mobile publishing and monetization
Monetization with ads
Ad extensions
Store certificates
Summary
Index
Stencyl Essentials
Stencyl Essentials
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2015
Production reference: 1230415
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-945-0
www.packtpub.com
Cover image by Richard Sneyd (<[email protected]>)
Credits
Author
Richard Sneyd
Reviewers
Dan Bendell
Innes Borkwood
Jean-Marc jihem
QUÉRÉ
Commissioning Editor
Kunal Parikh
Acquisition Editor
Richard Brookes-Bland
Content Development Editor
Ajinkya Paranjpe
Technical Editors
Rosmy George
Rohith Rajan
Copy Editor
Rashmi Sawant
Project Coordinator
Harshal Ved
Proofreaders
Martin Diver
Safis Editing
Paul Hindle
Indexer
Tejal Soni
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
About the Author
Richard Sneyd (BA Hons.) is the founder and CEO of CyberMyth Games, an indie game development studio based in Country Cork, Ireland. His role within the company requires that he wears many hats, including that of a programmer, designer, digital 2D and 3D artist, sound designer, scriptwriter, texture artist, leader, marketer, and business man.
He is also a fully registered, qualified, and highly experienced lecturer. His specialty subjects include 3D modeling and animation, computer game programming, 2D image processing, game design, desktop audio, psychology, consumer behavior, human resources, and business management. In addition to classroom teaching, he is actively involved in online education, regularly publishing new courses, and various other learning materials, such as books and tutorials, in conjunction with CyberMyth Games.
He is enthusiastic about his work, and his students and colleagues think of him as a very dedicated and accomplished teacher. All of his courses and books are characterized by a steady, incremental flow of information, and a lucid teaching style that is easy to understand and follow for all.
He is a husband to his wonderful wife, Jennifer, and father to a wonderful son, Darius.
Acknowledgements
I would like to take this opportunity to thank the Packt Publishing team for their outstanding work in helping to bring this book—my first ever published book—to fruition. I have thoroughly enjoyed working with them throughout the entire process and appreciate their candid encouragement and feedback, which ultimately raised the standard of my work. Along similar lines, I would like to thank the reviewers, Innes Borkwood, Daniel Bendell, and Jean-Marc jihem
QUÉRÉ, whose poignant criticisms and observations have also served to raise the standard of the final product.
I also wish to acknowledge the tireless efforts of the Stencyl development team—principally, Jonathan Chung, founder of Stencyl Inc, as well as all of the hardworking members of the community who have contributed to the development of the Stencyl game engine and toolset. Thanks to their efforts, Stencyl has enabled a plethora of designers, artists, and hobbyists to realize their game ideas, which may not otherwise have been possible, and has evolved from its hopeful beginnings into the remarkable, cross-platform game development system that it is today.
I reserve my final acknowledgements for my beautiful wife, Jennifer, and my son, Darius, whose awesome baby cuddles made it all worthwhile. Without their patience, love, and support, none of this would have been possible. Thank you.
About the Reviewers
Dan Bendell is a budding young developer, currently studying computing and games development at the University of Plymouth. He is expected to complete his studies in 2016, after completing a year's work in the industry. On finishing his academic endeavors, he wishes to pursue his dream of either starting up a games development company or working at one, allowing him to create games that will truly engage his audience, as well as working with a variety of new people on a daily basis.
Jean-Marc jihem
QUÉRÉ is a senior computer science engineer and is also the author of numerous articles in the French specialized press and books (on WinDev). Self-taught, he provided software for more than 20 years in every domain: decision-making methods, artificial learning, robotics, and autonomous systems. As a technology evangelist, he has chosen to support Livecode and Stencyl (since the migration from Flash to Haxe). He actively contributes to the community (extensions, translation, and support). Undoubtedly, you will meet him one day on the Stencyl forums. And you will be welcome!
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
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