Make a beer pong ball bounce

0 favourites
  • 3 posts
From the Asset Store
Bounce the ball and try to keep it bouncing and prevent it from falling down for as long as you can.
  • I'm making a beer pong game where the user flicks a ball with their finger, and the ball can bounce off the table, bounce off the peripherals of the cups lids, or land in a cup, destroying it.

    So far the ball immediately bounces flies off after the finger releases because it's colliding with the table.

    It would be great if anyone could help me out.

    Here's the docs.google.com/file/d/0B9SIeNNI08_zYUp4eFdNb3dhY3c/edit

    Thanks

  • Not to be rude , but the game you asked for can't be made in C2 that "Easy" , You'll need a lot of scripting to get it as you like ... I recommend using a 3d engine ... atleast , the bouncing from table part can't be done without some math , but all the rest can be pretty much be done with behaviors !

    Don't forget that C2 is a 2d engine , so there's no z-axis in it !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • stop colliding with the table. turn that right of. remove the solid behaviour from the table. You don't want any solid behaviour in your game using this engine for what you want. you won't be able to use some of the nice benefits bullet. your going to have to do this manually for the effect you want. YOu really just try to create an old classic 2d tennis game :)

    create a new variables for your ball called depth and force

    get force based on the flick strength. You can find that in the touch.

    depth default starts at 0.

    As your ball is "thrown" it starts descending. Start decreasing depth and moving your ball forward. As your ball.depth goes down. Modify the size of your ball so it get's smaller.

    When your ball depth reach -30(abstract table depth) make you sound effect and then start increasing the depth towards 0. As it changes continue to resize the ball larger. This will simulate the bouncing.

    AS for your cups and collision. You will need 2 set's of object collisions. Rims and Cup holes.

    Everytick check for depth and overlap. your cups have a depth of -20(abstract).

    If your depth is 20 or less. Then check for overlapping. If overlapping rim then new angle based on the rim. If depth is 15 or less and overlapping cup. Then destroy cup.

    This of course is only an abstract model. You will need to implement, tweak and improve it :) good luck. but it's doable using this kind of system. Whiteclaws is right though. C2 doesn't support 3d collision. So you need to work around it and use old school development.

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