Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Stencyl Essentials
Stencyl Essentials
Stencyl Essentials
Ebook287 pages1 hour

Stencyl Essentials

Rating: 0 out of 5 stars

()

Read preview

About this ebook

About This Book
  • 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
Who This Book Is For

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.

LanguageEnglish
Release dateApr 27, 2015
ISBN9781784390471
Stencyl Essentials

Related to Stencyl Essentials

Related ebooks

Software Development & Engineering For You

View More

Related articles

Reviews for Stencyl Essentials

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    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 (<richardsneyd@hotmail.com>)

    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 for more details.

    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

    Enjoying the preview?
    Page 1 of 1