- Home /
Bouncy Ball Game
Hi folks, I'm trying to create a game where a player has to keep a ball bouncing up and down while having control of a paddle. It's a little like BreakOut apart from the fact that I would like the player to have to play keepy-uppy with the ball and dodge falling objects.
As an example of how the game would start off; the ball will fall at a fairly slow pace of say, 1 (using gravity, but if you can think of a better way then please, let me know =]) and when the player hits the ball with the paddle, it bounces back up. Once again this would still be at a fairly slow pace but goes quite high (around 5 units on the Y).
As the game progresses I would like the gravity to be higher, so about 10 near the end and the force from the bounce to be smaller so the ball doesn't bounce as high so it can come down faster.
I've tried a few different way of doing it and each time something else goes wrong. using the bouncy physics isn't very good for this because it only increases the height of the ball as it bounces and I can see no way to make it the opposite...unless I have missed it somewhere.
Any help is most welcome and it can be written in C# or JS.
Regards,
Cas
I wouldn't use physics for this kind of game. It'd really be simpler to either write your own simplified physics engine or just use transform.translate with basic collision detection. As for the gravity thing, I don't quite understand what you're talking about- the force from the bounce is directly proportional to the incident force! If it strikes the paddle harder, it will naturally bounce higher. Unless, of course, you are using some kind of exotic physics.
Ok, cheers. With regards to the ball bouncing higher; I meant that if I used the bouncy physics and dropped it from a height of 5 it would bounce back to 5, second bounce = 5.2, third bounce = 5.4 and so on. Surely if something is dropped it will lose height for each bounce it does, not gain height unless it has extra forces added to it on the way down....
That's what I thought... If you turn the bounciness down, it should act more naturally.
Answer by morrison · Oct 17, 2011 at 06:56 AM
I actually just got a book for class called Unity 3D Game Development by Example that teaches you how to make the exact game you want to make. It's actually pretty basic and fun to make.
Your answer
Follow this Question
Related Questions
How could I make a bouncy object move mostly along the Z axis? 1 Answer
Ball bouncing up after rolling over a cliff when it should be rolling down? 0 Answers
Why does a rolling ball not accelerate past a slow speed? 1 Answer
Bounce ball with constant speed and height. 0 Answers
Constant force, with gravity, and correct collisions. 2 Answers