Hello guest! Login or Register

Beginner's guide to Construct 2

197 votes

Well done for choosing Construct 2! Let's get started making your first HTML5 game. We'll be making the 'Ghost Shooter' demo game. Try it out here first so you know what we're aiming for: a player who looks at the mouse, moves with arrow keys, and shoots monsters with the mouse. You'll learn everything you need to know to make a simple game - from layers to the event system!

Note: please don't ask for help in the comments of this tutorial! Instead, head over to our forum to get the best possible response to any questions you may have.

Alternative tutorial


There is an alternative beginner's guide: How to make a platform game, aimed at making a jump-and-run platformer rather than a top down shooter. You can start with either tutorial, but we highly recommend you complete both to get a good idea how to make both kinds of game!

Installing Construct 2


If you haven't already, grab a copy of the latest release of Construct 2 here. The Construct 2 editor is for Windows only, but the games you make can run anywhere, such as Mac, Linux or iPad. Construct 2 can also be installed on limited user accounts. It's also portable, so you can install to a USB memory stick for example, and take it with you!

Getting started


Now you're set up, launch Construct 2. Click the File button, and select New.
The File menu 'New' button.
In the New Project dialog, you don't need to change anything. Just click Create project. Construct 2 will keep the entire project in a single .capx file for us. You should now be looking at an empty layout - the design view where you create and position objects. Think of a layout like a game level or menu screen. In other tools, this might have been called a room, scene or frame.

Inserting objects


Tiled Background


The first thing we want is a repeating background tile. The Tiled Background object can do this for us. First, here's your background texture - right click it and save it to your computer somewhere:

The Tiled Background texture
Now, double click a space in the layout to insert a new object. (Later, if it's full, you can also right-click and select Insert new object.) Once the Insert new object dialog appears, double click the Tiled Background object to insert it.

The Insert New Object dialog.
A crosshair will appear for you to indicate where to place the object. Click somewhere near the middle of the layout. The texture editor now opens, for you to enter the texture to tile. Let's import the tile image you saved earlier. Click the folder icon to load a texture from disk, find where you downloaded the file to, and select it.

Load texture from file
Close the texture editor by clicking the X in the top right. If you're prompted, make sure you save! Now you should see your tiled background object in the layout. Let's resize it to cover the entire layout. Make sure it's selected, then the Properties Bar on the left should show all the settings for the object, including its size and position. Set its position to 0, 0 (the top left of the layout), and its size to 1280, 1024 (the size of the layout).

Tiled Background properties
Let's survey our work. Hold control and scroll the mouse wheel down to zoom out. Alternatively, click view - zoom out a couple of times. You can also hold space, or the middle mouse button, to pan around. Neat, huh? Your tiled background should cover the entire layout now:

The inserted tiled background.
Hit control+0 or click view - zoom to 100% to return to 1:1 view.

(If you're impatient like me, click the little 'run' icon in the window title bar - a browser should pop up showing your tiled layout! Woo!)

This tutorial is on multiple pages

Total of 38 edits. Last edit by Ashley on 06 May 2012 2:49 PM
Posted by

10
kemosabe (351) Thursday, June 30, 2011 at 10:42:49 AM
Great tutorial and software! I'm just starting to use it now but I'm looking foward to learning more! Congratulations from Portugal! :)
4
SocialLie (9.9K) Saturday, July 02, 2011 at 3:26:03 AM
Great Work.. I just loving Construct 2.
Good work Scirra.
4
SocialLie (9.9K) Tuesday, July 12, 2011 at 4:00:10 AM
I love you Ashley
3
luisgmolina (1,417) Friday, July 15, 2011 at 7:49:43 PM
Very cool.
we need a advanced tutorial now, please.
thank you.
3
Skodex (241) Monday, July 25, 2011 at 6:14:40 PM
Thanks for this. You made something which I first thought to be rather complicated, seem extremely easy.
3
Dicon (292) Wednesday, July 27, 2011 at 12:08:49 PM
A great tutorial and not too difficult to get your head around. Are there any books out there for Construct? We all need them.
Thank.
Dicon
3
driftish (191) Thursday, July 28, 2011 at 8:36:42 AM
thanks a whole lot this tutorial was extremely helpful.
3
Mehtab (856) Saturday, July 30, 2011 at 10:45:41 AM
awesome tutorial and awesome tool!
2
stufa (225) Saturday, August 06, 2011 at 12:14:18 PM
I love it!!!
I've always wanted to create a video game. Your tutorial was clear and interesting. You make a great teacher Mr Ashley.

Oh I tried running your additional tutorial on Ghost Shooter. For some reason I can't run the demo play.

I'm afraid I'm quite a computer noob.
3
ianbrown3003 (266) Friday, September 09, 2011 at 9:27:08 PM
This is great! I've just started a games designer course, and although I get a full version of Gamemaker at some point during the course, I wanted to get hands on with using game-making software now...this program looks great, and your beginners guide has eased me in really well, it's well written and very user-friendly. Top work!

You've inspired me to play around more with this program, and that means I'll probably end up buying the full version soon. Good work!
2
Ghengis (2,499) Tuesday, September 13, 2011 at 4:13:04 AM
This is a must read. Excellent overview of how Construct 2 works.
3
Ashley (48K) Saturday, September 17, 2011 at 5:48:10 PM
Just made an update: the tutorial now covers image points (added in r56). It's on page 5.
1
chrisbrobs (2,779) Saturday, September 24, 2011 at 11:02:10 PM
Brilliant tutorial.
1
carminielloz (1,088) Friday, September 30, 2011 at 6:03:17 AM
oh my Gosh !!! this is amazing , thank you guys !!!!
I only just finished page 1 but I love it
the possibilities to creat a variety of videogames seem endless.
THANK YOU VERY MUCH GUYS !!!
1
carminielloz (1,088) Friday, September 30, 2011 at 6:34:29 AM
my hero moves nicely ( 8 direction , bound to lay out and scroll to )
but i think i missed something , the monster doesn t move , i changed the speed but it never moved in the first place ( i gave him bullet movement but nothing )


You need to Login to post a comment!
Login to your account, or register a new account