Book Image

Learning Construct 2

By : Aryadi Subagio
Book Image

Learning Construct 2

By: Aryadi Subagio

Overview of this book

Table of Contents (17 chapters)
Learning Construct 2
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Construct Classic was released in 2007. It was initially created as a hobby project by a group of students working in their spare time. However, the project was really buggy at first, with the team spotting many flaws in the design of Construct Classic, such as absence of support for platforms other than Windows. The team decided that supporting Construct Classic was not a good decision and decided to halt development in April 2013. The entire source code was published on SourceForge, and people can still freely access it if they want, although now there is no official support being provided. Construct 2 was already developed in 2011 with major design changes in mind. One of the design changes proposed was to use HTML5 as the technology behind the tool instead of DirectX that was used by Construct Classic, which allowed the software to support lots of different platforms.

Construct 2 makes it easy for people to make 2D games, regardless of their background. It comes with a complete set of powerful features, has the ability to support multiple platforms and app stores, and possesses an easy-to-understand visual programming system. It is also extensible using a plugin system, with lots of plugins being developed by the community to extend the capabilities of Construct 2.

Learning Construct 2 will introduce you to Construct 2's interface and workflow, and at the end, it will provide you with the skills and knowledge you need to develop your own games, even if you don't know programming at all. This book will guide you through the features of Construct 2, and it uses Construct 2 to create features that are available in popular games, for example, physics, high scores, and AI.

What this book covers

Chapter 1, Downloading and Understanding Construct 2, introduces you to Construct 2. This chapter will make you familiar with the interface and terms that Construct 2 uses, as well as give you a quick overview of the event system.

Chapter 2, Creating Your First Game Design, will teach you what you need to know about game designing. We will start with the definition of a game, make challenges and rewards, and finally move on to create our game design document.

Chapter 3, Creating Diverse Player Experiences with a Flappy Bird Clone, will examine what makes Flappy Bird addictive and how we can attempt to make a similar experience. We will use a technique called procedural generation to create random objects.

Chapter 4, Making a Breakout Clone, will teach you how to modify gameplay elements. We will use instance variables to modify the state of game objects.

Chapter 5, Making a Platformer Game, will teach you about the physics engine inside Construct 2, how it behaves, and how you can use it to incorporate physics in your game objects.

Chapter 6, Creating a Space-shooter Game, will teach you how Construct 2 stores data locally and how to read this data in a game. In this chapter, we will create a leaderboard in our game to demonstrate it.

Chapter 7, Making a Battle Tank Game, will teach you about the basics of AI and how to make an enemy object with its own AI. We will make an AI that makes the enemies shoot at the player when they see the player.

Chapter 8, Debugging Your Game, will teach you about events that usually cause bugs and how to avoid them. Alongside this, we will use debugging features inside Construct 2.

Chapter 9, Mastering the Best Practices, will teach you about the best practices in game development in general and in Construct 2, revealing some techniques that developers use to make their game in an efficient way.

Chapter 10, Publishing Your Game, will teach you how to export your game to the Web, desktop, and mobile platforms.

What you need for this book

In order to run the example code presented in this book, you will need an HTML5-compatible browser. Chrome is recommended, though any modern web browser will be sufficient, as they all have supported HTML5 specifications.

To experiment with the code yourself, you only need a Windows machine, as Construct 2 is a Windows-only software. Construct 2 provides virtually all you need to make your own game, from developing to debugging to publishing. The additional software that you might need is a graphics tool such as GIMP or Photoshop.

Who this book is for

This book is for people who want to make their own games but do not have any skills or experience to do so. This book will guide people in creating their game without the need for previous programming knowledge. After reading this book, you will know, understand, and apply the techniques used in game development.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Construct 2 saves its project in a .capx format, which is just a ZIP file of a project."

A block of code is set as follows:

"playerScore1": 50
"playerScore2": 100
"playerScore3" 70
"playerScore4": 20
"playerScore5": 60

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from: https://www.packtpub.com/sites/default/filesdownloads/7678OS_ColoredImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.