Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Breakout ball movement with physics?

Author
Message
z_man
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: Australia
Posted: 12th Mar 2008 07:53
Hi

I'm making a 3D breakout type game with Dark physics in which the blocks you break are cubes in the physics system and the ball is a sphere. Because the typical movement of the ball in most breakout games is rather non realistic (no slowing down or loss of speed from bouncing) I am wondering how to tell dark physics what to do with the ball, so it never loses speed. Is this something to do with materials?

Thanks,
z_man

Intel Core 2 Duo 6600 2GB DDR2 RAM Radeon X1600 Series Realtek Sound System

Persist and you will succeed.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Mar 2008 11:05
Yes, you will need to add some bounce to the paddle / ball. You could also change the properties of bricks to provide different responses.

You will need to power the ball too. You could possibly use the new force field commands on the paddle when it is struck by the ball. You could even change the force field strength depending on power ups - that would be a nice new twist

I haven't played with the Force Field commands, but I'm thinking you could possibly create some sort of radial force that ensures the ball bounces at a reasonable angle.
z_man
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: Australia
Posted: 12th Mar 2008 13:39
Using the force field commands sounds like a great idea. It would be especially useful to make the game faster paced and therefore more exciting/more of a challenge. I will be sure to check them out.

z_man

Intel Core 2 Duo 6600 2GB DDR2 RAM Radeon X1600 Series Realtek Sound System

Persist and you will succeed.
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 15th Mar 2008 17:07 Edited at: 15th Mar 2008 17:14
@Z_MAN

One option is to review and adjust the speed on the fly using a simple function.



Here is the rest of the program if you are interested



Hope you find it helpful

Codger

p.s. The material property you may wish to look at is "Restitution"

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
z_man
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: Australia
Posted: 18th Mar 2008 12:48
Thanks Codger!

That code looks like just what I need, I will try it out.

z_man

Intel Core 2 Duo 6600 2GB DDR2 RAM Radeon X1600 Series Realtek Sound System

Persist and you will succeed.

Login to post a reply

Server time is: 2024-05-20 00:15:21
Your offset time is: 2024-05-20 00:15:21