How do I get good Breakout physics?

0 favourites
  • 7 posts
From the Asset Store
Setup and ready for your art, animations and story. Viral Storybook App Template.
  • Hi

    So, I'm trying to make breakout type game, but regardless of which method I use I just can't get past the issue of the ball getting stuck bouncing between walls. I've tried physics, custom movement, math, anything I can think of. And it works great, except for this one thing, that happens regardless of tweaks. Here's a gif showing what I mean (this method uses physics): jm-j.com/example.gif

    How do breakout games usually avoid this?

  • They probably just add some y velocity when the y part of the velocity is near 0.

  • I thought about that, but couldn't get it to feel natural. Maybe I'll have to experiment a bit more though.

  • Another idea is to make the bouncing not quite realistic by moving and bouncing vertically and then horizontally. Hitting corners would probably just reverse the motion then. Typically when a ball hits a corner its motion angle can change considerably but it’s not something you really see happen in breakout clones.

  • Yeah, that is something that happens when tweaking the walls too much, the ball suddenly change directions and it feels unnatural

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd heavily advise against using physics for this application.

    Try a bullet behavior with the bounce off solids property. If the bounce of solids is unacceptable for whatever reason, use the line of sight ray casting feature to get the angle of reflection to do what you want with it instead.

  • Why'd you advice against physics?

    I did try line of sight with reflection, but got the same result as with physics.

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