How do I make an Arkanoid style bounce using 8 direction?

Get help using Construct 2

Post » Mon Jul 10, 2017 8:05 am

Hi there,

So our player is in a little round spaceship and when it bounces on a wall or solid object we are trying to get it to bounce properly arkanoid style.

We are using the 8 direction control (4 directions) and currently the only thing we can see that's 'built-in' is the reverse system which reverses your X and Y vector so you bounce incorrectly.

For example,

If you are travelling north east at full speed and you slam into a wall, you should immediately be catapulted north-west at your original speed.

Is there a simple method for implementing this?
B
10
S
3
Posts: 50
Reputation: 800

Post » Mon Jul 10, 2017 8:08 am

why don't you use the bullet with bounce off solids instead?
Follow my progress on Twitter
or in this thread Archer Devlog
B
35
S
15
G
17
Posts: 944
Reputation: 12,210

Post » Mon Jul 10, 2017 8:22 am

Hi there @tunepunk - thanks for replying so darned quick!

I have just tried that and unfortunately the bouncing doesn't work as intended. Could you spare the time to suggest another method?
B
10
S
3
Posts: 50
Reputation: 800

Post » Mon Jul 10, 2017 8:40 am

Another solution could be to use a raycaster. I think there is a plugin for that, and have the ball change direction when it has travelled the lenght of the raycaster line.

Strange what didn't work exactly? That should work pretty well, unless the ball is travelling extremely fast.
Follow my progress on Twitter
or in this thread Archer Devlog
B
35
S
15
G
17
Posts: 944
Reputation: 12,210

Post » Mon Jul 10, 2017 8:46 am

It's not travelling very fast at all (200 in fact)

What happens is the the 'ship' hits a wall and stops with the bullet behaviour as well as the 8 direction behaviour. There is no bounce at all.

If I amend the speed of the bullet behaviour then it does bounce but begins to absolutely crazy as the 'speed' just goes bananas.
B
10
S
3
Posts: 50
Reputation: 800

Post » Mon Jul 10, 2017 9:19 am

Hmmmm hard to say what's going wrong without checking the code, but there must be something telling the ship to keep going that way that's why it's not bouncing, maybe?
Follow my progress on Twitter
or in this thread Archer Devlog
B
35
S
15
G
17
Posts: 944
Reputation: 12,210

Post » Mon Jul 10, 2017 9:58 am

Or perhaps check your collision polygons to see that the ship isn't getting stuck 'in' the wall or something.
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 201
Reputation: 3,460

Post » Mon Jul 10, 2017 10:00 am

The majority of Arkanoid type games use the bullet behaviour perfectly well, so I'd recommend posting a .capx for a quicker resolution.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Mon Jul 10, 2017 10:40 am

Agreed ... but I just can not get both the 8 direction and bullet behaviour working nicely together. This is what I have ...

Image

The movement works absolutely fine, however when the player hits a solid object he/she just stops and doesn't bounce.

To add ... both behaviours are enabled during an in-game trigger.
B
10
S
3
Posts: 50
Reputation: 800


Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 7 guests