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.
Step 2
After creating a new project, you will see the following template.
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.
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.
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.
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.
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.
Step5
Now again, double click on the event sheet; a window box will appear. Select Key object and click "Next".
- Key(object)
- on key pressed
- Select (Space object)
- Done.
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.
Step7
Add event -> bullet,
- on collision with another object
- Select(Enemy)
- Done.
Add Action -> Destroy -> Done.
This is how the event sheet will look, after the event is complete.
Output
After this, press F5 to run the layout. Your browser will display the following output.
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.