Custom ball movement

Get help using Construct 2

Post » Wed May 01, 2013 10:33 pm

I've been trying to make a ball movement similar to what you'd find in a breakout game and..wow, it's more difficult than I expected. Thing is, every example and tutorial I've found uses the bullet behavior which, unfortunately, is too wonky for an actual breakout game; the ball tends to "stutter" and teleport in tight areas and the bounce is not always accurate.

That said, I was wondering if anyone has programmed or knows how to program their own ball movement with just events. I read through a few flash tutorials and came close, but I couldn't get an accurate bounce off the walls and bricks, just the paddle. Thanks for any help!
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed May 01, 2013 10:44 pm

Try Physics behavior

B
18
S
6
G
3
Posts: 197
Reputation: 4,129

Post » Wed May 01, 2013 11:14 pm

Sounds a bit redundant don't you think?
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed May 01, 2013 11:20 pm

ok i just got an idea, try to combine bullet and Physics

on ball collision --> bullit off

something like that! I will think of a proper way to do this, but thats a start.
B
18
S
6
G
3
Posts: 197
Reputation: 4,129

Post » Wed May 01, 2013 11:28 pm

lol..The physics behavior is working pretty well with this, actually. All I need to figure out is how to get the ball to maintain a constant speed.

Still open to event-only movements though, or perhaps something using the custom movement behavior.Tokinsom2013-05-01 23:36:51
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed May 08, 2013 12:13 pm

Hey @Tokinsom,

Not sure if you are still looking for an events only ball movement example. But I found this one a few weeks back. It was created by @R0J0hound, and as always it's another superb example from the BIG DOG!!

BallMovement.capx

Hope it helps!
B
32
S
6
G
7
Posts: 489
Reputation: 8,217


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests