Chapter 7. Making a Puzzle Physics Game

Puzzle physics games are fun to play and relatively easy to make. In Construct 2, these games are actually really easy to make. In this chapter, we are going to make a puzzle physics game similar to Angry Birds or Crush the Castle.

In this chapter, we will cover the following topics:

  • How to make a puzzle physics game
  • How to add physics to game objects
  • Adding HUD elements that reflect the game

Starting the project

First, we need to start with a new project. Open up a new project and set the layout size to 1500, 480. In this game, we are going to move the "camera" around. This means that we will move the field of view to a game object.

Setting the background layer

Once you have opened a new project, set up the background layer. In this case, we have a ground and a sky. You should make sure that the background is on its own layer and make sure that there is a game object layer as well. This is what your project should look like:

Setting the background layer

Adding the cannon

Once you have these layers, add a cannon (seen in the screenshot that follows). Name it something, such as cannon, so that we do not get confused—it is important to name your game objects appropriately.

Adding the cannon

Before we continue, make sure that the cannon is on the game object layer and the background is on the background layer. Lock the background layer (by clicking on the lock icon) so that we do not accidentally modify it:

Adding the cannon

Adding sprites

We then need to add some blocks. These will serve as objects to interact with in the game. As shown in the following screenshot, we added a block and named it something that makes sense. We named it block.

Adding sprites

Once you have added a block, add a cannonball. We used a circular object and named it cannonBall, and it is shown in the following screenshot:

Adding sprites

Finally, we need to have some kind of goal. In this case, we added a circle with a star on it and named it goalBall, as shown in the following screenshot:

Adding sprites
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.98.207