Make football (soccer) juggling game

0 favourites
  • 3 posts
From the Asset Store
Find pleasure in juggling balls with this basic HTML5 template
  • Hi everybody!

    I just started using Construct and I think it's amazing what you can do :)

    But I'm having a bit of difficulties with the Physics behavior.

    Im trying to make a football juggling game. Something really simple: you just have a ball on the screen, there is gravity, and when you touch it, it goes up and I add 1 to the score. It can bounce off the walls, but when it touches the ground the score goes back to 0.

    I dont know if Im using the right technique. I tried many things, but here is what I tried last and which is closest to what I wanna achieve (but still really bad) :

    I created a ball sprite and I have been applying Physics to it. I gave it density and elasticity. Im applied gravity to it when the game begins, and when it is touched, I apply a "Physic impulse" to it.

    But it doesnt really work, it all seems really bad.

    Does anyone have an idea on how I could do something realistic and playable?

    It would be great if I could make that work !

    Thanks :)

  • Hello!

    I must be really bad. I've been playing around with Physics but can't figure out how to do this.

    Any tips would be great.

    Thanks :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I have done one, maybe it was my first Construct game, using physics. Other than occasional glitches when the ball would go flying up like a bullet, it worked fine. Fixed that glitch too.

    Sounds like you have it right. You have to apply impulse when it is touched. UP in Construct is -90 degrees, so apply impulse at -90 angle to make it go straight up. Then adjust so the angle is less or more depending where the ball is touched, that way if it is tuched on the right side it will bounce up and left, and the other way around. So formula would be: apply impulse at angle -90+(Ball.X-Mouse.X ( or Touch.X)) / 10

    I divide by 10 because the angle can be too far from -90 if you touch too far to the left or right.

    or you can use apply physics impulse toward position:

    For X position set it: Ball.X+(Ball.X-Mouse.X)*2 at image point 0

    For Y position just 0, which is straight up

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