How to make bouncing ball?

0 favourites
  • 6 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • Hi guys!

    I have got a problem. I have no idea what behaviours and what scripts should I add to make a bouncing ball like in game called "Pang". Down below you have a link to a film that shows bouncing ball in pang and this is what i want to do.

  • Hey there, the best behavior for this would be Plateform, when the ball touches the floor, use Simulate Control to make it jump; if the ball divides like in Pang, change the jump strength depending of the ball's animation

  • Thanks but I have been also wondering how to do that ball will move in different ways. Right now my ball is bouncing but only in one way.

  • For that you also need to set its vector X on created, set acceleration to 1 and deceleration to 0, then set its vector X with events, that way its horizontal speed will be constant (remember that a negative value will move it left);

    When it touches a wall, a simple method to invert the vector speed is to multiply it with -1, you can store its speed in a variable or use the behavior parameter obj.plateform.vectorX for the multiplication

  • Another way to do it, is using the Bullet Behavior on your Balls. I know that sounds painful... Hear me out.

    Set "Bounce off Solids" to enabled in the "Bullet Behavior" properties, and adjust the "Speed", "Acceleration", and "Gravity" in the same properties window to adjust how fast they will fall & how high they will bounce.

    If you are spawning fresh smaller balls after the big one gets taken out, like in the game you linked to. You could adjust the properties for those as well, if you want them to bounce differently, compared to the larger balls.

    At least this is the easiest way I've found to handle my balls. Always... be gentle.

    EDIT: Spelling Erroirs, Grammar, and added more text

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you both guys. You have helped me a lot.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)