Creating Bullet-Shooting Game Using Constructor 2

Introduction

Constructor is used for 2D game creation without writing a lot of code. Now in this article, I will explain how to design the Start page of a bullet-shooting game using Constructor. Constructor 2 is a powerful HTML 5 game creator designed especially for 2D Game Developer.

Prerequisites

  • 64 bit Windows 7 or higher.
  • Minimum 2 GB RAM
  • AMD Graphics card with latest drivers

Multiplatform support

We can easily export it from Chrome Web Store, Firefox Marketplace, or use our Scirra Arcade to share our creations.

We need the following -

  • PC (or) a laptop with the ability to work on Constructor 2
  • Constructor 2 Game Engine
  • HTML 5 compatible browser

Step 1

Click File -> New -> New Empty project.

Constructor

Step 2

After creating a new project, you will see the following template.

Constructor

Step 3

An empty layout will be displayed. Now, we need to change the size of the layout in Layout Properties while the layout size must be (1000,600 ) and a new event sheet must be added and named as game event.

Constructor

Insert Sprite object

For adding the Sprite object, double click on the Layout sheet and insert a new object in dialog box. Now, we can select the Sprite object named as bullet.

Constructor

Constructor

In the properties window (in left), we need to change the following conditions' Values,

Click "Behaviors" in left hand side and insert a new bullet behavior dialog box. Then, add Bullet. And, we can change the Speed to 200.


Constructor

Step 4

For adding the Sprite object, double click on the Layout sheet. A new object dialog box will appear now. Here, we can select the Sprite object. Name it as Player.

Now, we are able to see the bullet object and the player object diagram in the given event sheet.

Constructor

Constructor

Constructor

Insert Keyboard object

Double click on the Layout sheet. A dialog box will appear. Now, we need to add Keyboard object to the Event sheet, so that it will lead to the creation of that object in empty event sheet.

Constructor

Step5

Now again, double click on the event sheet; a window box will appear. Select Key object and click "Next".

  1. Key(object)
  2. on key pressed
  3. Select (Space object)
  4. Done.

Constructor

Constructor

Constructor

Step 6

Now, we are in event sheet. Click "Add action" and select Player (object).

  • Player
  • Spawn another object
  • Select(bullet)

    Layer-1

    image point-2

  • After, Done.


Constructor

Constructor

Constructor

Step7

Add event -> bullet,

  1. on collision with another object
  2. Select(Enemy)
  3. Done.

Constructor

Constructor

Constructor

Add Action -> Destroy -> Done.

Constructor

This is how the event sheet will look, after the event is complete.

Constructor

Output

After this, press F5 to run the layout. Your browser will display the following output.

Constructor

Constructor

Conclusion

Finally, we have created a Start screen page of the game using Constructor 2. We will see advanced game development concepts in the upcoming articles.

I hope this article will be useful.


Similar Articles