Page 1 of 1

Breakout game

PostPosted: Wed Apr 20, 2011 5:51 pm
by ThaKid244
Hi. I am making a breakout style game where the bar is at the bottom and you bounce the ball off of it to destroy the boxes (you know what i mean :wink: )
I have the bar, ball and boxes but i just need to know what direction to follow in order to script the ball to bounce off randomly of the bar (This includes: increasing and decreasing speed of the ball)
Can someone please help me startout on this? Thanks!!

Re: Breakout game

PostPosted: Wed Apr 20, 2011 8:28 pm
by savvy
on the ball put a collision event when it touches the brick, then make it physical response...
1.0 is a non-changing speed
less than 1.0 is decreased speed
more is increased speed.

if you want it to destroy the block, put another collision with the same actor and then make a destroy actor event: collide actor.

when you advance more, you can do a single collision event with the brick -> script editor, then add the collision and destroy in there.

Re: Breakout game

PostPosted: Fri Apr 22, 2011 5:42 pm
by ThaKid244
Thanks sav!