Creating Video Game

2

Index

Attached Files

The following files have been attached to this tutorial:

.capx

defend-earth.capx

Download now 4.63 MB

Stats

5,636 visits, 10,459 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 10 May, 2015. Last updated 19 Feb, 2019

Time to spawn Aliens (Alienship) and sound effects for Player bullets; here we will spawn Alienship randomly so player will not see which way the next Alienship is coming down from. Therefore add this line below:

In this lines we are instructing Construct 2 to spawn Alienship every between 1.8 seconds and also we are instructing Construct 2 to pick random Spawn objects and not the same Spawn object all the time. We also are instructing Construct 2 to set Alienship bullet of angle to 90 which stands for downward towards Player.

Next if we RUN it we can move player left and right but nothing happens. Let’s make Player bullets do something. So when player bullets hit Alienship Player bullets will be destroyed and also Alienship too. Once that done we have to update our score and Alienship has been destroyed update this too. Now add this line below:

Now our game started to look good but, not much is it? What happens if Alienship collides with player? For that we have to instruct C2 to check for collision with player. We have to update player shields too. To do that adds this line below;

That’s done but still no fun in that is there? So we add little bit of extra fun. Remember our Timer? This is good time to use Timer to add little extra surprise for player. We can have many things but, I will only use Alienship to do this. Add this line below;

We instructing C2 to set our Timer back zero so, that means every ten seconds player will have surprise Alienship heading toward him with high speed on collision course. Wow now that’s cool.

Now you be saying hey we were defending Earth therefore where it is. I have not forgotten that. Now is time to do that. Import sprite and name it Earth. You will 2 frames for this which will look like below;

  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Hi I have problem with enemy counts. Working on a top down shooter. Can you help please.

    After killing all enemies we go to next level.