How do I make Bounce kind of game

Just started using Construct 2? Post your questions here

Post » Wed Oct 11, 2017 6:02 pm

Hi

I wanted to make a game like bounce game.Where you have a ball with some nice bounce i mean when it jumps it should bounce 2 to 3 time and finally settle down and when it hits a wall it should bounce back a little bit like a real ball.and this ball can be controlled i mean i should move forward, backward and jump as well.
Please help me.Thanks in advance.
B
22
S
8
G
1
Posts: 32
Reputation: 2,064

Post » Thu Oct 12, 2017 6:36 am

Hi @ramyaswetha

It seems you are looking for a "physics" type of game.

I personally do not have experience in this type of games, so Ill point you towards this article :

https://www.scirra.com/tutorials/64/phy ... the-basics

This should help you getting started.

If you have any other problem with something general, don't hesitate to browse Construct 2s' tutorials !

Have fun !
B
12
S
4
G
1
Posts: 39
Reputation: 1,378

Post » Thu Oct 12, 2017 10:44 am

You may also be able to do this without physics.
Add Bullet behavior to your ball, set Bounce off solids=yes, Set angle=No, Gravity=10, speed=100. (experiment with these values)
Add Solid behavior to the floor.

Create an event to increase bullet gravity every time the ball collides with the floor:
On Ball collision with Floor -> Ball set Bullet gravity to Ball.Bullet.Gravity*2
This will make the ball to jump lower every time.

You can control the ball by changing its bullet properties - speed, angle of motion, gravity.
Check out my awesome game Doptrix
B
17
S
9
G
28
Posts: 515
Reputation: 16,329

Post » Thu Oct 12, 2017 5:12 pm

yes buy adding bullet behavior am getting bounce when in collides with solid but the problem is am unable to control it.For example when it collides with solid it bounces back and not getting stopped after few seconds.I wanted to control it i mean similar like object having platform behavior
B
22
S
8
G
1
Posts: 32
Reputation: 2,064

Post » Fri Oct 13, 2017 4:06 am

Your best option would probably be Platform (without Physics). However, Platform can't bounce off solids, so you'll need to simulate realistic bouncing yourself. Say by calling "Simulate Platform jump" on collision with the floor and decreasing jump strength with every bounce.

You can try using Physics. The problem is, as far as I know, it doesn't work together with Platform. So to control the ball you will need to change some physics properties - force, impulse, velocity etc.

And finally, you might be able to do this with Bullet behavior only. (Depending on how much control of the ball you need)
Say, if the player pressed UP key, change bullet angle to 270 (upward direction) and increase bullet speed.
Check out my awesome game Doptrix
B
17
S
9
G
28
Posts: 515
Reputation: 16,329

Post » Sat Oct 14, 2017 3:26 pm

ramyaswetha try some of my tutorials and you will find what you looking for

https://www.dropbox.com/sh/eioscti86bpr ... 7YPza?dl=0
B
252
S
39
G
15
Posts: 1,964
Reputation: 40,753


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests