Swing Copters...From The Ground Up

3

Index

Attached Files

The following files have been attached to this tutorial:

.zip

swing-copters-assets.zip

Download now 195.54 KB
.capx

swing-copters.capx

Download now 328.31 KB

Stats

16,361 visits, 37,367 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 11 Aug, 2017. Last updated 19 Feb, 2019

Introduction

In this tutorial, I will share my thoughts on how I think Swing Copters was made. From the left side, you can download the assets needed for this tutorial.

Free or License

For those of you using the Free version of Construct 2, you can still follow along with this tutorial since the total amount of events does not exceed the 100 events limitation. I do recommend updating to a personal license. Believe me, it's worth it.

In this tutorial, there are 61 events.

[page="

Setting up the project"]

Setting up the project

Start Construct 2 and create a new empty project. Change the window size to 432x768.

Keep it organized

Keep in mind that your projects should always be organized. The naming of layouts, event sheets, layers, groups etc. In the long run, it will be much easier to debug your projects. So with that said, let's start off by adding the layouts, event sheets, and layers that will be needed for this tutorial.

Change the name of Layout 1 to Intro and the name of Event sheet 1 to Intro Event sheet.

The layout and event sheet are linked to each other.

[page="

Add a layout with an event sheet"]

Add a layout with an event sheet

Next, add a new layout and its event sheet by right clicking on the Layout folder in the Projects panel. Select Add layout, then Add event sheet and name the new layout Game. Name its corresponding event sheet to Game Event sheet. Create a separate event sheet by right clicking on the Event sheets folder in the Project panel and name it Functions. It is a personal preference of mine to keep functions on its own event sheet. Like I mentioned earlier, I like to keep things organized.

Include an event sheet

Since each layout can only be linked to one event sheet, we need a way to access the events in the Functions Event. Our Game Event sheet is linked to our Game layout, so from our Game Event sheet, we will have to include our Functions Event sheet. To do this, right click anywhere in the Game Event sheet and from the pop-up select Include event sheet.

A new window will appear with the names of the remaining event sheets in your project. Double click on the Functions Event sheet to include.

Now would be a good time to save your project.

[page="

Layers"]

Layers

It is good practice to organize all your sprite assets on its own layer. For example, you could put all of your enemy assets on a layer named Enemies, your player assets on a layer named Player etc. The free version of Construct 2 only allows up to four layers! So you are limited. Still, you may follow along with this tutorial since you can combine your assets on one layer. The only problem you may run into is the Z Order (which objects appear in front of others).

This can be solved by adding actions such as Move to bottom or Move to top. But why add more actions to your project when you can access more layers?

From the Layers panel, add 5 more layers by clicking on the plus icon and name the layers from bottom to top.

-Background (layer 0)

-Midground (layer 1)

-Enemies (layer 2)

-Player (layer 3)

-Foreground (layer 4)

-HUD (Heads Up Display) (layer 5)

If you are using the Free version of Construct 2, then you know that there is a 4 layer limitation. I recommend putting the Midground layer sprite objects on the Background layer and the Foreground layer sprite objects on the HUD layer.

[page="

Adding Object Types"]

Adding Object Types

If you haven't already done so, download the zip file that I have included for this tutorial and unzip it to your working folder.

We are going to start with our Intro layout so select this by clicking on the tab.

Our game will support sounds, functions, high scores and touch input. Double click anywhere in the Intro layout and from the new window add the objects one by one to our project.

- Audio object

- Function object

- LocalStorage object

- Touch object

When done, you will see the objects you have just added in the Object type folder.

Now we are going to add all the sprite objects to our Intro layout.

From the Layers panel select the Background layer and double click anywhere on the Intro layout. Select the Sprite object and name this sprite obj_Backgound and click the insert button. A crosshair cursor will appear. Click anywhere on the layout.

The Image Editor will open allowing us to select our image. Since our background image changes color, we will need a couple of animation frames to take care of this.

So, right click anywhere in the Animation frames window and select Import frames > From files...

  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • dazedangels We us this counter for the Medal screen. If your score is 10 and you die then on the Medal screen. Start at 0 and increase by 1 every 0.07 seconds until 10 is reached.

    youtube.com/watch

    Check this vid at 0:36.

    Hope this helps.

  • Why are we creating an event in "Game Over" to add 1 to ScoreCounter every 0.07 if ScoreCounter isn't equal to Score? What is ScoreCounter doing, if the game is over?

    "-System: Every X seconds, where seconds is 0.07"

    Thank you.