Construct 2 Game Development by Example
By John Bura
()
About this ebook
This book is for complete beginners who have always wanted to learn how to make games and have never tried. It is the perfect introduction to game development, design, and production.
Read more from John Bura
Learn Css In 1 Hour Rating: 0 out of 5 stars0 ratingsBuild 6 Games In Unreal Rating: 0 out of 5 stars0 ratingsIntroduction to Unreal Rating: 0 out of 5 stars0 ratingsBuild a 3d Virtual Reality Whackamole Game Rating: 0 out of 5 stars0 ratingsLearn Javascript In 1 Hour Rating: 0 out of 5 stars0 ratingsIntroduction to Unity Rating: 0 out of 5 stars0 ratingsUltimate Ios 10, Xcode 8 Development Book: Build 30 Apps Rating: 0 out of 5 stars0 ratingsLearn Html In 1 Hour Rating: 0 out of 5 stars0 ratings
Related to Construct 2 Game Development by Example
Related ebooks
A Beginner's Guide to Puzzle Games: Beginners' Guides, #3 Rating: 0 out of 5 stars0 ratingsUnreal Development Kit Beginner’s Guide Rating: 1 out of 5 stars1/5A Beginner's Guide to 2D Platform Games with Unity: Beginners' Guides, #1 Rating: 0 out of 5 stars0 ratingsGameMaker Cookbook Rating: 0 out of 5 stars0 ratingsUnity Game Development Scripting Rating: 0 out of 5 stars0 ratingsGameMaker Essentials Rating: 0 out of 5 stars0 ratingsOuya Unity Game Development Rating: 0 out of 5 stars0 ratingsVideo Game Careers - Ultimate Edition: Video Game Careers, #4 Rating: 0 out of 5 stars0 ratingsBuilding an RPG with Unreal Rating: 0 out of 5 stars0 ratingsBox2D for Flash Games Rating: 0 out of 5 stars0 ratingsUnity from Proficiency to Mastery (Artificial Intelligence): Unity from Proficiency to Mastery, #1 Rating: 0 out of 5 stars0 ratingsCode Gamers Development Essentials Rating: 0 out of 5 stars0 ratingsUnity Game Development Blueprints Rating: 0 out of 5 stars0 ratingsGameSalad Essentials Rating: 0 out of 5 stars0 ratingsA Beginner's Guide to 2D Shooter Games: Beginners' Guides, #2 Rating: 0 out of 5 stars0 ratingsUnreal Engine Physics Essentials Rating: 1 out of 5 stars1/5NGUI for Unity Rating: 0 out of 5 stars0 ratingsMastering Oculus Rift Development Rating: 0 out of 5 stars0 ratingsMastering LibGDX Game Development Rating: 0 out of 5 stars0 ratingsHTML5 Game Development with GameMaker Rating: 0 out of 5 stars0 ratingsGetting Started with Unity 5 Rating: 5 out of 5 stars5/5Learning Unreal® Engine iOS Game Development Rating: 0 out of 5 stars0 ratingsUnity AI Programming Essentials Rating: 0 out of 5 stars0 ratingsUnity Multiplayer Games Rating: 5 out of 5 stars5/5Becoming Comfortable with Unity Rating: 0 out of 5 stars0 ratingsGame Development with Three.js Rating: 0 out of 5 stars0 ratingsMastering Cocos2d Game Development Rating: 0 out of 5 stars0 ratingsUnity from Zero to Proficiency (Intermediate): Unity from Zero to Proficiency, #3 Rating: 2 out of 5 stars2/5Blueprints Visual Scripting for Unreal Engine Rating: 0 out of 5 stars0 ratings
Computers For You
The Insider's Guide to Technical Writing Rating: 0 out of 5 stars0 ratingsMastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5CompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Artificial Intelligence: The Complete Beginner’s Guide to the Future of A.I. Rating: 4 out of 5 stars4/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5How to Create Cpn Numbers the Right way: A Step by Step Guide to Creating cpn Numbers Legally Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsThe ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 0 out of 5 stars0 ratingsElon Musk Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 0 out of 5 stars0 ratingsRemote/WebCam Notarization : Basic Understanding Rating: 3 out of 5 stars3/5CompTIA Security+ Practice Questions Rating: 2 out of 5 stars2/5Network+ Study Guide & Practice Exams Rating: 4 out of 5 stars4/5Ultimate Guide to Mastering Command Blocks!: Minecraft Keys to Unlocking Secret Commands Rating: 5 out of 5 stars5/5Mindhacker: 60 Tips, Tricks, and Games to Take Your Mind to the Next Level Rating: 4 out of 5 stars4/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5The Invisible Rainbow: A History of Electricity and Life Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5
Reviews for Construct 2 Game Development by Example
0 ratings0 reviews
Book preview
Construct 2 Game Development by Example - John Bura
Table of Contents
Construct 2 Game Development by Example
Credits
About the Author
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
Errata
Piracy
Questions
1. Getting Started with Construct 2
Downloading and installing Construct 2
What do the numbers mean?
Coding in Construct 2
Working with visual programming languages
Layout and event sheets
Sprites
Summary
2. Inputs and Controls
Getting started with inputs and controls
Keyboard inputs
Inserting a new keyboard object
Adding functionality to the keyboard object
Setting the keyboard key
Controlling the sprite with the keyboard
Setting up the direction of the sprite's movement
Setting keys for other directions
Testing the keyboard controls
Making the sprite move constantly
Changing the sprite's speed
Keeping the sprite onscreen
Mouse inputs
Adding mouse functionality
Setting up the Every tick command
Rotating the sprite to the mouse location
Facing the sprite towards the mouse point
Touch control inputs
Summary
3. Variables and Arrays
Introducing variables
Number variables
Integer variables
Real variables
String variables
Boolean variables
Other variables
Declaring variables
Writing variables in code
Variables in JavaScript
Examining JavaScript code
Variables in Construct 2
Adding a variable
Creating a global variable
Creating a score variable
Adding a variable to a sprite
Creating a health variable
Introducing arrays
Adding an array in Construct 2
Checking an array's properties
Setting data and adding variables
Checking an array for data
Summary
4. Game Mechanics
Introducing game mechanics
Game mechanics in Construct 2
Setting up a game mechanics project
Adding a game mechanics behavior to a sprite
Giving a sprite 8Direction movement
Editing the properties of a behavior
Creating a speed power-up
Inserting the power-up object
Adding a collision event
Destroying the power-up on collision
Increasing the player sprite's speed
Setting the duration of the speed boost
Restoring the player's speed to normal
Summary
5. Making a Simple Shooter
Starting the project
Controlling a sprite with the keyboard
Organizing the event sheet
Adding mouse controls
Making the player shoot
Adding the enemy
Destroying the enemy
Adding a spawner
Summary
6. Making a Tower Defense Game
Starting the project
Creating a spawn point
Laying out the level
Setting up the turrets
Adding enemies and projectiles
Rotating the turret
Firing the turret
Setting up the path for the enemy
Setting up an enemy wave
Summary
7. Making a Puzzle Physics Game
Starting the project
Setting the background layer
Adding the cannon
Adding sprites
Adding functionalities
Rotating the cannon
Creating a cannonball
Spawning the cannonball
Creating the spawning image point
Adding physics
Applying force at an angle
Setting cannonballs to fire one at a time
Setting the viewpoint to follow the cannonball
Making an immovable ground
Reloading the cannon
Adding the blocks
Destroying the cannonball on a complete stop
Delaying cannonball destruction
Designing our level
Changing block density
Adding the goal balls
Destroying the goalBall sprite
Adding particles
Adjusting the particle settings
Adding particles when goalBall is destroyed
Tracking the score
Adding text objects to the HUD
Spawning the textbox
Correcting the spawning angle
Expanding the HUD
Anchoring the HUD to the camera
Setting up an HUD cannonball tracker
Finalizing the game
Losing the game
Restarting the game on Game Over
Winning the game
Summary
8. Exporting Your Game
Exporting games in Construct 2
Setting up a Dropbox account
Exporting to an HTML5 website
Choosing the template for your HTML5 export
Assessing the contents of the game folder
Uploading and sharing a game with Dropbox
Other places to export your game
Exporting to Chrome Web Store
Exporting to Scirra Arcade
Exporting to Kongregate
Exporting to PhoneGap
Exporting to Intel XDK
Exporting to CocoonJS
Exporting for Windows Phone 8
Exporting to Tizen
Exporting for the Amazon Appstore
Exporting for Windows 8
Exporting to Open Web App
Exporting to Node-Webkit
Summary
A. Where to Go from Here
Index
Construct 2 Game Development by Example
Construct 2 Game Development by Example
Copyright © 2014 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: June 2014
Production reference: 1180614
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84969-806-1
www.packtpub.com
Cover image by Asher Wishkerman (<wishkerman@hotmail.com>)
Credits
Author
John Bura
Reviewers
Albert Chen
D.M. Noyé
Keefer Sery
Commissioning Editor
Pramila Balan
Acquisition Editors
Pramila Balan
Sam Wood
Content Development Editor
Poonam Jain
Technical Editors
Pratik More
Ritika Singh
Rohit Kumar Singh
Copy Editors
Roshni Banerjee
Adithi Shetty
Project Coordinator
Amey Sawant
Proofreaders
Paul Hindle
Joanna McMahon
Indexer
Hemangini Bari
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade
About the Author
John Bura has been programming games since 1997 and teaching since 2002. He is the owner of the game development studio Mammoth Interactive. This company produces games for Xbox 360, iPhone, iPad, Android, HTML5, ad-games, and others. Mammoth Interactive recently sold a game to Nickelodeon! He has been contracted by many companies to provide game design, audio, programming, level design, and project management. To this day, he has contributed to 40 commercial games. Several of the games he has produced have risen to number one in Apple's App Store. In his spare time, he likes playing ultimate frisbee, cycling, and working out.
About the Reviewers
Albert Chen is Assistant Professor in the Game Design and Development program at Cogswell Polytechnical College in Sunnyvale, CA. He has led students in developing serious games using game engines for The Boeing Company, NeuroSky, and Ericsson. His team won the Boeing Performance Excellence Award in 2008.
Prior to joining Cogswell in 2007, he was a professional game developer for over 12 years, working at EA, LucasArts, Factor 5, and The 3DO Company. He has a Bachelor of Arts degree in International Relations from UC Davis and a Master of Arts degree in Entrepreneurship and Innovation from Cogswell Polytechnical College.
I would like to thank my family for their love and support: Joy, Kayli, Brandon, and my mother, Sin-Hing Chen.
D.M. Noyé (Dwandell M. Noyé) is a successful entrepreneur, conceptual designer, and technical consultant with extensive experience working on major commercial projects with a number of large corporations as well as independent ventures spanning several fields, from music and literary arts to video games.
I'd like to thank Packt Publishing for believing in my expertise and giving me the opportunity to share it on this great project. I'd also like to thank the entire Scirra Construct community for the deep knowledge base they've built over a number of years, allowing me to acquire the forward-thinking skill of event-based programming.
Keefer Sery is currently a Game Art and Production major at Drexel University, expecting to graduate in 2015. He is also a freelancer for Digitas Health. His most notable work in Construct 2 was a segment of the research and development for Evolutionary Guidance Media's Cyberhero League. The project went on to become a winning entry in the World Future Society's BetaLaunch competition.
I would like to thank my grandmother, Janet Mitchener, for giving me the opportunity to attend school, and Dr. Dana Klisanen for giving me my first break in the industry.
www.PacktPub.com
Support files, eBooks, discount offers, and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
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.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across 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 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 nine entirely free books. Simply use your login credentials for immediate access.
Preface
Games have always been my passion. Creativity and production have always been on my mind. I love talking about production and I hope you enjoy reading about how to make games. This book will give beginners a first-hand knowledge of how to make games in Construct 2. I made my first game in 1997 when I was attending university.
In this book, you will learn how to make several games and learn the secrets of game development. After reading this book, you should have several playable games to build a foundation and move forward. It is important that