Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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.

eBook
$26.09 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

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 Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

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
$19.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
$199.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
$279.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 $ 146.97
Construct 2 Game Development by Example
$48.99
Learning Construct 2
$48.99
Construct Game Development Beginners Guide
$48.99
Total $ 146.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 the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
Modal Close icon
Modal Close icon