Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Construct Game Development Beginners Guide
Construct Game Development Beginners Guide

Construct Game Development Beginners Guide: A guide to escalate beginners to intermediate game creators through teaching practical game creation using Scirra construct with this book and ebook.

Arrow left icon
Profile Icon Daven Eric Bigelow
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5 (2 Ratings)
Paperback May 2012 298 pages 1st Edition
eBook
€19.99 €28.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Daven Eric Bigelow
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5 (2 Ratings)
Paperback May 2012 298 pages 1st Edition
eBook
€19.99 €28.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€19.99 €28.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Construct Game Development Beginners Guide

Chapter 2. Hello World! Construct Style

Now that we know how to navigate around the interface, we can move on to making games. The first, we'll be making is a platformer, such as the classic Mario and Sonic, the Hedgehog games.

In this chapter, we are going to:

  • Learn more about sprites, as well as how they can be animated

  • Learn how to use the tiled background object to make levels and backgrounds

  • Learn how to set the attributes of objects

  • Learn what behaviors are and how they affect objects

  • Learn what private and global variables are and how to define them

  • Use textboxes to display information to the player

  • Use events to control the game

So let's get started!

Sprites revisited

We've already covered the creation of a sprite object in Chapter 1, Our First Look at Construct. We'll now learn to create animations for them and get them ready for a real game. These skills are needed for making player and enemy sprites in nearly any game made in Construct.

Sprites revisited


We've already covered the creation of a sprite object in Chapter 1, Our First Look at Construct. We'll now learn to create animations for them and get them ready for a real game. These skills are needed for making player and enemy sprites in nearly any game made in Construct.

Time for action — creating a player sprite


We are now going to make our player object and set the animations for it.

  1. 1. Start a blank game project (similar to the one we created in Chapter 1, Our First Look at Construct), and give it the name MyPlatformer. Then enter your author name in the Creator box.

    Note

    Downloading the example code

    You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. 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.

  2. 2. Next, add a sprite into the layout.

  3. 3. We're now going to need some player graphics. You can use Construct's Picture Editor to make these or use a painting program of your choice. For this game, the player is ball-shaped and rolls around the map. It has animation frames for falling, jumping, dying, and winning a level. See the following reference image (exact image size does not matter, as the player...

Tiled backgrounds: defining the world


If you tried making a large image out of individual tile sprites, you'd quickly tire of trying to position each one. It is equally troublesome to store a large level in a single image, as they would take up too much video memory.

This is where the tiled background comes into picture. It repeats the same graphic, for as long and wide as you stretch it. These are great for making levels and worlds!

Time for action — make some tiled backgrounds


We are now going to make two tiled backgrounds: one for the grass that our player walks along, and the other for the dirt underneath.

  1. 1. First, we'll create the grass background object. Once again, open the Insert object box. Instead of a sprite, insert a Tiled Background object from the group Game.

  2. 2. Now draw the image for your grass. It does not need a hotspot, as the hotspot of a tiled background is always in the top-left corner.

  3. 3. Now name it Grass, and move on to making another one called Dirt. Position them to form an initial platform underneath the player, as in the following screenshot:

  4. 4. Change the Width of the layout to 1000 and the Height of the layout to 800. Then, make the entire level by copy-and-pasting (or dragging from the Objects bar) the grass and dirt objects around the layout, as shown in the following screenshot. You can use Ctrl and the mouse scroll wheel to zoom in and out of the layout.

  5. 5. Finally, set the layout background...

Attributes: telling Construct more about our objects


We are now going to learn about attributes. These can be thought of as a list of features about objects. An example of this is how apples, bananas, and oranges are all fruits.

In Construct, attributes can be custom-made, but there are also some built-in ones with special uses we'll be looking at.

Time for action — adding attributes to our objects


We are now going to give each of our objects the Solid attribute so that they can collide with each other. We will also give the player the Center view on me attribute so that the screen scrolls with the player.

  1. 1. Click on the player sprite and expand the Groups menu. Then expand the Attributes submenu. We can now tick the two boxes Solid and Centre view on me. The end result is shown in the following screenshot:

  2. 2. Now move on to give the Solid attribute to the grass and dirt tiled backgrounds.

  3. 3. To stop the player leaving the level, create a new tiled background called WorldBorder and place three of them: one for the bottom and two for the sides of the layout, as in the following screenshot. Tick Solid for these as well.

  4. 4. Finally, scroll down to the Properties menu (outside of Groups), and untick Transparent fill for the WorldBorder object and choose WebGreen as the Fill color. Notice in the following screenshot, the world border on the...

Behaviors: teaching objects how to act


In this segment, we'll be looking at the platform behavior and how to tweak it. Behaviors are pre-made movements and actions that an object performs in certain situations. They all have varying levels of customization, but when used correctly, can speed up game development tenfold.

Time for action — getting our player moving


Now we can give our player the platform behavior and try it out when we run the game. This is the first step in making the game interactive.

  1. 1. Select the player sprite, and scroll down the left-side menu to the Behaviors group. Then, click on Add in the New Behavior box. We now see the following screenshot:

  2. 2. Our player object now has the ability to move around using the arrow keys and jump using the Shift key. Run the game to see this in action.

  3. 3. Now we can look at the settings for the behavior in the left screen. Change the Jump Strength and Max floor speed values, as in the following screenshot, until they control how you would want them to:

  4. 4. Finally, if you'd like to change the controls of the game, bring up the game properties menu and scroll down to the Controls menu. Then use the drop-down boxes to choose keys for each movement, as in the following screenshot:

What just happened?

Our character can now move around the level at the player...

Variables: private and global


A variable is used to store a value that can change. These are useful in every game for keeping score and tracking the player's lives or health. In Construct, a private variable is stored by an object itself and can be different for each copy of that object. Meanwhile, a global variable is stored between layouts throughout the program.

Time for action — giving our player a life


In video games, a player gets a Game Over when the character they control runs out of lives. Right now, our player doesn't have that luxury, so let's change that. In our game, the player will have a Score private variable to store how many enemies they stomped in that life, while a Lives global variable stores how many lives they have left before they lose.

  1. 1. Open the left menu for our player again. Scroll down to the Private Variables group, and click on Add/Edit to get a window similar to the following screenshot:

  2. 2. Now click on the plus button and create a number named Score. Leave the value of it at 0 and click on OK. Then click on Done in the private variable manager screen.

  3. 3. To finish, make a global variable Lives. To do so, open the right menu, and in the project tab, right-click on the item Global variables and click on the context item Add global variable, as in the following screenshot, when it appears:

    Set the value to 3 and click on...

Textboxes: giving the player a heads-up


Textboxes are used to write information to the player. They can tell the game story, or tell the player how they are doing. They are important in most games as they can be used to teach the player how to play, as well as guide them through the levels.

Time for action — showing our player their health and score


We are now going to make two textboxes: one is to tell the player the score, and the other is to tell the player how many lives the character they are controlling has left. We'll also learn how to keep these textboxes on the screen with the player.

  1. 1. First, we will need to add a new layer to the layout. To do this, open the Layers tab on the right-hand menu, and click on the upward pointing paper button to make a new top layer.

  2. 2. Layers can be modified similar to objects. Open the left menu and rename the text layer to HUD (Heads Up Display), and the other layer to Game.

  3. 3. In the layer properties for HUD, change the Scroll X Rate and Scroll Y Rate percentages to 0. This keeps all objects on the HUD layer in the same position on the screen while the game is running.

  4. 4. Now, make sure the HUD layer is highlighted, as shown in step 2. This means each object we make is created on that layer. Insert two new Text objects to the layout...

Events: setting the rules and goals of a game


We are now going to learn a little of the biggest part of game-making in Construct. Events are used to define the very logic of a game and play an integral role in complex games.

For now, we'll be learning how to use them in this game to keep their lives and score updated.

Time for action — very eventful games


When the player's character touches deadly spikes, we know they should lose health or die, but how does the game know this? That's where we are heading. First, we need to learn how to create events in the Event Sheet Editor.

  1. 1. Add a new sprite to the Game layer, which will be the end goal, and place it at the end of your level. Name it Goal, and give it the Bounding box collisions mode.

  2. 2. Now put some sprites around your level named Hazard. They can be lava, saw blades, spikes, or any other contraption you can think of. However, this time they will keep Per Pixel collisions mode.

  3. 3. Now we are ready to switch to the Event Sheet Editor tab. Right-click while in the Event Sheet Editor, and click on Insert event in the context menu that appears.

  4. 4. Each object can have its own conditions, but for now we are going to create an Always condition from the menu opened by double-clicking on the System object. The System object is included in every game.

  5. 5....

Summary


Now that we have started learning how to make platform games, we've covered a lot of the basics needed to make one with Construct.

We started this chapter with animated sprites, which are the most important object in any graphical games made with Construct Classic. Then we learned about tiled backgrounds, which decrease the difficulty in making large maps. We then used some attributes to define which objects are solid and learned that the Player object must have the camera centered on it at all times.

After that, we gave the Player object movement with the Platform behavior, a pre-made movement designed for 2D platformer games. Our Player object then gained a personal score counter and some lives to add some challenge to the game. We then went on to add some textboxes that show the current score and lives, and then finished off the chapter with learning how to create events, the building blocks of any new gameplay elements we want to make.

Now that we've learned to do all this, we're...

Left arrow icon Right arrow icon

Key benefits

  • Learn the skills necessary to make your own games through the creation of three very different sample games
  • Create animated sprites, use built-in physics and shadow engines of Construct Classic
  • A wealth of step-by-step instructions and images to lead the way

Description

Construct Classic is a free, DirectX 9 game creator for Windows, designed for 2D games. Construct Classic uses an event-based system for defining how the game behaves, in a visual, human-readable way - you don't need to program or script anything at all. It's intuitive for beginners, but powerful enough for advanced users to work without hindrance. You never know when you'll need a helping hand exploring its inner workings, or harnessing its raw power to do your bidding.Construct Game Development Beginner's Guide is the book for you if you have ever felt the urge to make a game of your own. Reading this book will not only teach you to make some popular games using Construct, but you'll also learn the skills necessary to continue on and bring your game ideas to life.Starting as a beginner to Construct Classic, you'll be learning to make platform, puzzle, and shooter games, each styled after popular games of their genre. This guide covers everything from creating animated sprites, to using the built-in physics and shadow engines of Construct Classic. You will learn the skills necessary to make advanced games of your own. Construct Game Development Beginner's Guide will lead you on your journey of making games.

Who is this book for?

If you have thought of making a game of your own, this book is for you. All you need to know is that you can and how to operate a computer!

What you will learn

  • Navigate the interface of Construct Classic with ease
  • Create 2D games inspired by some of the most popular games in history
  • Use the built-in physics engine of Construct Classic
  • Create level editors for your games
  • Create enemy AI for platformers and shooters
  • Use the shadow casters and lighting effects in Construct Classic to create realistic environments
  • Use pixel shader effects of Construct Classic to create stunning visuals
  • Additional tips and tricks that will improve your future games

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 18, 2012
Length: 298 pages
Edition : 1st
Language : English
ISBN-13 : 9781849516600
Vendor :
Scirra
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : May 18, 2012
Length: 298 pages
Edition : 1st
Language : English
ISBN-13 : 9781849516600
Vendor :
Scirra
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 111.97
Construct 2 Game Development by Example
€36.99
Learning Construct 2
€36.99
Construct Game Development Beginners Guide
€37.99
Total 111.97 Stars icon

Table of Contents

9 Chapters
Our First Look at Construct Chevron down icon Chevron up icon
Hello World! Construct Style Chevron down icon Chevron up icon
Adding the Challenge Chevron down icon Chevron up icon
Making Noise Chevron down icon Chevron up icon
Practical Physics Chevron down icon Chevron up icon
Custom Levels Chevron down icon Chevron up icon
Platformer Revisited, a 2D Shooter Chevron down icon Chevron up icon
I'm Throwing a Grenade! Chevron down icon Chevron up icon
Our Final Moments Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(2 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
TD Bauer Nov 18, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great walk through that does the job introducing you to the CONSTRUCT software.
Amazon Verified review Amazon
H. Christiani Apr 11, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Very helpful book to get started with Construct Classic, which is now fully free to download from scirra's website.There is a newer version, construct 2 which is html5 based and not compatible with classic, but what you learn will be a big help later.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.