Book Image

Learning Stencyl 3.x Game Development: Beginner's Guide

By : INNES BORKWOOD
Book Image

Learning Stencyl 3.x Game Development: Beginner's Guide

By: INNES BORKWOOD

Overview of this book

Creating video games has traditionally been a long and complicated process, requiring years of experience and a vast array of skills. However, with the introduction of comprehensive game-development toolkits such as Stencyl, the fun has returned to the art of game-creation ‚Äì anyone who has the desire to create their own video game can now do so with almost any desktop computer and a free software download from the Internet!Learning Stencyl 3.x Game Development: Beginner's Guide will put you on the fast-track to learning the essentials of the powerful Stencyl game-development toolkit. You will develop a complete, ready-to-publish video game including in-game advertising, by following the clear, step-by-step tutorials, supported by numerous screenshots and practical examples.This book will guide you through all the important steps required to develop and publish your video game. Starting with the installation and testing of the Stencyl toolkit, you will very quickly advance to the fun and exciting process of creating a playable game. The step-by-step tutorials will guide you from a blank screen, right through to giving your game that final polish and sharing it with the rest of the world. Whilst developing your feature-complete video game, you will learn how to easily detect collisions in your game using Stencyl's built-in physics engine. You'll discover how to use the powerful animation tools included in Stencyl's toolkit, and you'll find out how to make your game shine with sounds and visual special effects. You will also discover how Stencyl makes it easy to utilize the touch-screen and accelerometer features of smartphones and tablet computers. You will learn all the essential skills required to develop a video game from scratch ‚Äì right through to publishing a game on the Internet and testing games  on the most popular mobile devices.
Table of Contents (20 chapters)
Learning Stencyl 3.x Game Development Beginner's Guide
Credits
Foreword
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating a countdown timer


The game file that needs to be imported and loaded for this session is 5961_04_14.stencyl.

Ensure that the game has been saved, and close any open tabs, leaving only the Dashboard tab visible. Now execute the following instructions to create the countdown timer:

  1. Create a new Scene Behavior called Score Management.

  2. Click on the Attributes section button in the instruction block palette.

  3. Click on the Create an Attribute button, situated immediately below the category buttons.

  4. In the Name textbox, enter Countdown.

  5. Select Number in the Type drop-down list.

  6. Click on the OK button to close the dialog box.

  7. In the left-hand panel, click on + Add Event.

  8. Select Time, then Every N Seconds.

  9. Rename the Every N Seconds event to Decrement Countdown.

  10. In the new do every … seconds event, enter the digit 1 into the empty textbox.

  11. Click on the Numbers & Text section button at the top of the instruction block palette.

  12. Drag the increment number by 0 block into the do every...