Ball escaping beyond solid wall - inputs

Get help using Construct 2

Post » Sat Jan 11, 2014 5:16 pm

As some of you know(?) I am working on a breakout clone (with my own twists)..

The ball has bullet behavior, and the walls on top, left side and right side is "solid".

Once in a blue moon the ball get sneaky and bounce through the wall and escape. Because of that it happens so seldom it is hard to "check bug" it.

So I would like to have your input on approach to "cure" this.

I wonder if it would be a good idea to identify the ball x and y position, and verify with the play area and if it is outside of the play area, adjust the position of the ball to be just inside the play area?

Would you do this or something else?

If you want to see the game itself it is here.
B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Sat Jan 11, 2014 6:34 pm

Well a couple of questions.

1. do you manually move the ball with a set.xy at any point.
If you do I suggest examining these.

2. Is your ball only moving due to bullet instructiosn.
If yes. no worries it's a good step :)

3. Thicken you walls. At certain velocity the ball can move fast enough on the logic level to pass through part of a thin wall.
Thicken the wall. If you need to hide the thick wall then put an image to hide the thicker wall.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Sat Jan 11, 2014 7:42 pm

@Jayderyu
Oh yes, thicker walls, why not. I could always make them invisible. But I wonder about walls beyond the layout, will they still function as solids even if it is outside? Because of having thick walls inside the window/layout make the playarea smaller. ;)
Ah well, I will experiment!

Bullet movement, yes. If I don't change my mind entirely. :) (due to other things)

Thank you!

B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Sat Jan 11, 2014 10:23 pm

You can move the walls outside the layout. The layout only is only a virtual definition of the game play size. In theory you can unbind the visual lock and see out side. So there isn't aproblem if your walls exist outside the layout.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Sun Jan 12, 2014 1:00 am

I forgot to update, @jayderyu, sorry! It worked nicely, thank you.
B
58
S
18
G
13
Posts: 447
Reputation: 10,735


Return to How do I....?

Who is online

Users browsing this forum: bluesun66 and 7 guests