Build a Shoot-’Em-Up in Construct 2: The Player’s Ship
videos

Build a Shoot-’Em-Up in Construct 2: The Player’s Ship

Tutorial Details
  • Difficulty: Beginner
  • Platform Used: Construct 2
  • Estimated Completion Time: One hour
This entry is part 1 of 5 in the series Build a Space-Based Shoot-'Em-Up in Construct 2

In this detailed five-part tutorial series, I’ll show you how to make a frantic side-scrolling shoot-’em-up, complete with multiple levels, parallax scrolling, lots of enemies, power-ups, and even a boss battle. We’ll make the whole thing with the free Construct 2 gamedev tool, meaning you don’t need any previous programming or game development knowledge. Let’s get started!


Play the Final Game Demo

Here’s what we’ll be working towards throughout the whole of this series:


The full game has power-ups, multiple levels and enemies, a parallax-scrolling background, and a big boss fight! The difficulty has been reduced to help show off the features in this demo, but of course you can make your game as easy or hard as you like.

In this first part of the tutorial, we’ll just focus on the setup, the background, and the player’s ship.


Install Construct 2

For this series, you can use the free version of the Construct 2 game editor – it has all the features you’ll need, and is not time-restricted.

There are many versions of Construct 2 available, as it is rapidly updated. In this tutorial series, I used version r110.2 beta but then switched to version r111 beta for its new “Function” feature. You don’t need to worry about this: just download version r111 beta and you’ll be fine!

It’s straightforward to install Construct 2, but do note that it’s currently only available for Windows. (Check out Jamie Cross’s Asteroids tutorial if you’d like a beginner-friendly shoot-’em-up tutorial that works on OS X.)


Get the Assets

The graphics for the spaceship, flying saucers, starscape, and space background are all included in our Totally Free Space-Based Shoot-’Em-Up Sprite Pack, so you should download those.

You’ll also need the tutorial download ZIP: this includes a few extra sprites, like power-ups and bullets, and some sounds that I made with the excellent bfxr tool. Feel free to use these for anything else, if you like!

The tutorial download ZIP also includes the final source of the game, in case you prefer to learn by experimenting with a completed project.


Watch the Screencasts

Introduction


Watch in full screen at 720p (use the Cog icon) for best quality, or download the MP4.

Parallax Scrolling Background


Watch in full screen at 720p (use the Cog icon) for best quality, or download the MP4.

The Player’s Spaceship


Watch in full screen at 720p (use the Cog icon) for best quality, or download the MP4.

In the next part of this series, we’ll add power-ups and enemies. Follow us on Twitter, Facebook, and Google+ to keep up to date!

Series NavigationBuild a Shoot-’Em-Up in Construct 2: Power-Ups and Enemies >>
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.facebook.com/aldo.olivares.d Aldo Olivares

    ty for the tutoal

  • Kyatric

    You’re welcome :)

  • http://www.facebook.com/aldo.olivares.d Aldo Olivares

    When is gonna be ready the next part?

    • http://gamedev.tutsplus.com/ Michael James Williams

      A new part will come out each Friday :)

  • Blake

    At the time of writing this (12/18/2012), there seems to be a bug in Construct 2 [r112-r113] were you can’t shoot/move correctly when moving diagonally, while using/holding down a keyboard control/key to shoot/fire a bullet with bullet behavior from a player object. Up and right works, but the other diagonal directions don’t work correctly. Even when playing the final game demo here for Kyatric’s tutorial I experience the bug, so I know it’s not just me, and how I’m coding things with my own events, and etc. I also noticed this bug when playing other people’s Construct 2 games as well.

    I’m actually surprised that Kyatric didn’t noticed it when he was making this game or maybe he did, I don’t know. If you’re holding down the space key to shoot, while also holding down+right simultaneously to move diagonally, you can’t shoot, the same goes for down+left, and up+left, but oddly, up+right works fine. It seems to be a bug with the interaction between the keyboard controls, and the bullet behavior. Diagonal shooting while also moving diagonally works fine if you’re using mouse buttons to shoot, but not if you’re using the keyboard controls/keys to shoot. Hopefully, this bug will be fixed in a future version of Construct 2 soon. I already reported the bug to Scirra.

    • http://gamedev.tutsplus.com Michael James Williams

      Well. Dang. Thanks for the bug report, we’ll look into it.

    • http://gamedev.tutsplus.com/ Michael James Williams

      Well. Dang. Thanks for the bug report, we’ll look into it.

    • http://gamedev.tutsplus.com/ Michael James Williams

      Dang. Thanks for the bug report. However, I’m not able to reproduce this – I can press any combination of the arrow keys while holding the space bar and it behaves as expected.

      What browser are you using? (I am on the latest stable version of Chrome, on Windows 7.)

      • Alex

        Same problem here while making a game… The trouble seems to be with the keyboard not recognizing the spacebar when pressed along with some directions. Solved this issue changing the shoot button to anything but Spacebar.

    • Kyatric

      I don’t believe this is a C2 bug.

      Actually, it sounds more like an i/o issue with the (your ?) keyboard. I used to play trackmania nations in win XP with an old USB keyboard and pressing up+left+down at the same time did not work whereas pressing up+right+down worked.

      Same as Michael, I can’t reproduce under win 7 whether I’m holding down the space key or mashing it.
      I believe it could be an issue with keyboard drivers and therefore the only one who could do something about it would be the keyboard’s vendor.

  • rawan

    Hi Michael,

    I think there is some issues (bug you can say that)

    When I set the fullscreen browser mode scale that is create some issues such as Next level text appear on the screen and and return back text will not show after the player destroy Plz help me for this query

    • Kyatric

      Prefer using the “Letterbox Scale” rather than Scale only.

      Apparently Scale and parallax don’t work well together, but it could be by design (not sure it’s bug).

      • rob

        Thanks Kyatric,

        I have resolved the issues but got new issues that is for speed in the desktop leptoap it working fine but when create apk file and put it in my android phone that create speed issues

        basically when I click the moving button with the help of touch event

        I have this code

        event
        Touch—Is Touching –(object)

        action

        Player —— set X to self.X +self.xSpeed*dt

        where xSpeed is plyer’s variable.

        do you have any idea what is the issues

        • Kyatric

          I have little experience with mobile development.

          I’d strongly suggest you to go and check Scirra’s forums it’s the best place to find support

          for mobile issues.

  • Dingo

    Thanks,it’s very useful. But how to download the MP4. I can’t open the video online,I only can download it to watch.

    • http://gamedev.tutsplus.com/ Michael James Williams

      I’ve added a link to the MP4 videos beneath each embedded YouTube video. Let me know if there are any problems :)

  • albert

    Thanks for this. I enjoy your tutorials a lot. Well done :-)

    • Kyatric

      Thanks very much for the cool comment :)

  • Rodney Arters

    so im trying to make it so my “player” doesn’t go off screen but for some reason it keeps doing it. ive checked the steps at least 20 times what do I do?

    • Kyatric

      Maybe try to post your capx in the scirra forums.
      The method in this tutorial works obviously, without seeing how you did it in your own project, no way to tell.

      • Rodney Arters

        ok thanks any ways