How do I make a tanks game?

Just started using Construct 2? Post your questions here

Post » Thu Mar 02, 2017 8:37 pm

Hi,

I am young begginer and I want to create a tanks game, but I don't know how so I want you to help me :)

I want to make a game where there is two tanks which shoots to themselfes

I want to make many other things in this game of course, but first I must know how to start :D
B
2
Posts: 6
Reputation: 162

Post » Thu Mar 02, 2017 10:07 pm

Gronie2014 wrote:Hi,

I am young begginer and I want to create a tanks game, but I don't know how so I want you to help me :)

I want to make a game where there is two tanks which shoots to themselfes

I want to make many other things in this game of course, but first I must know how to start :D

hi, i think for your generic question this is the start point..
https://www.scirra.com/tutorials/top/pa ... e=detailed
sorry my bed English ^_^
B
14
S
7
G
7
Posts: 557
Reputation: 6,093

Post » Fri Mar 03, 2017 12:35 am

Gronie2014 wrote:I want to make a game where there is two tanks which shoots to themselfes


SAY NO MORE.

Here you go: https://www.dropbox.com/s/tj8iqiob5vy8c ... .capx?dl=0

;) ;) ;)
Image Image Image
B
32
S
12
G
27
Posts: 761
Reputation: 17,246

Post » Fri Mar 03, 2017 12:25 pm

First you need some tank sprites and you can make your own or here are some free sprites:

Image

Once you have your tank sprites set up you need to add the 8 direction movement to the tanks.

The arrow keys will work to drive the tank without any events needed.

Then you need a bullet for them to fire. You can use that bullet sprite or make your own.

Give the bullet the Bullet behavior.

The bullet only fires at the angle it is set to so you have to set the angle to the angle the tank is facing.

On Key Pressed: Create bullet at position Tank X and Y. Set Bullet Angle to Tank Facing Angle, Enable bullet.


That is pretty much all you need to make a tank move and fire.

Once you get one tank working you can start creating an enemy tank and that will use the In Line Of Sight and Follow Path Behaviors so study the tutorials on those Behaviors.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Fri Mar 03, 2017 6:45 pm

Image I meant a game like this :D
B
2
Posts: 6
Reputation: 162

Post » Fri Mar 03, 2017 6:50 pm

Gronie2014 wrote:Image I meant a game like this :D


Look at the catapult example on C2 for ideas.

That is probably using physics for the bullet and that is a more advanced game design skill but you can still learn it pretty fast.

The rest is just creating sprites that you can move and a fire button.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Fri Mar 03, 2017 7:03 pm

So can you help me how to do it? I would appreciate that :)
B
2
Posts: 6
Reputation: 162

Post » Fri Mar 03, 2017 7:10 pm

Gronie2014 wrote:So can you help me how to do it? I would appreciate that :)


You first need to go study the catapult example in C2 because that is using physics.

I can't teach you how to set up physics in a game if you don't have the basics of how physics works.

The example uses a pig and a pivot arm to project the pig at a castle of blocks with the physics behavior.

That is the same as launching a missile or cannonball over the mountain at your opponent. If you understand what makes the pig fly and fall then you can make that game you posted.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Fri Mar 03, 2017 7:13 pm

Okay, but can you give me the link where I can study it?
B
2
Posts: 6
Reputation: 162

Post » Fri Mar 03, 2017 7:18 pm

Gronie2014 wrote:Okay, but can you give me the link where I can study it?


Do you have the free version of C2?

If not get one.

Click on New Game and scroll down to Catapult example.

Open that and run it so you can see how it works and then start looking at the event sheet so you see the controls used.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests