Construct 2 Game Development by Example
eBook - ePub

Construct 2 Game Development by Example

  1. 230 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Construct 2 Game Development by Example

About this book

In Detail

Construct 2 is an HTML5-based game editor that uses drag-and-drop functionality to allow users to create complex and engaging games with no programming experience. The software is fast and easy to learn for novices, yet powerful for advanced users, letting expert game builders work even quicker than by coding.

This book gets to grips with the basics of Construct 2 game design techniques and clearly explains and illustrates important features, from controls to game mechanics, before having you put those skills to the test by building three complete game projects. You will learn how to create games in popular and bestselling genres, distribute them through multiple channels, and expand your foundational knowledge into expert game design skills.

Approach

This book uses practical examples to teach readers, and imparts the key skills and techniques of working in Construct 2 through building complete game projects.

Who this book is for

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.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Construct 2 Game Development by Example


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...

Table of contents

  1. Construct 2 Game Development by Example

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Construct 2 Game Development by Example by John Bura in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Games. We have over one million books available in our catalogue for you to explore.