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

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • why don't you use the bullet with bounce off solids instead?

  • 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?

  • 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.

  • 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.

  • 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?

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

  • The majority of Arkanoid type games use the bullet behaviour perfectly well, so I'd recommend posting a .capx for a quicker resolution.

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

    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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)