JoC #33: Playing Breakout! Collision detection

      Finagles’ 8th Rule: Teamwork is essential; it allows you to blame someone else.

Today, we’re finally getting our breakout game into a playable state! Yes!!

See how to implement functionality to recognise when the ball hits a block, and make the block disappear. This is really the centrepiece of our program – from now on, everything else is detail.

Download video

Concepts discussedcollision detection, removing an object from the world

Download (scenario as of beginning of this episode): breakout-v7.zip

22 thoughts on “JoC #33: Playing Breakout! Collision detection

  1. Hi Mik, with this vid’s code in place there is a error when the ball goes off the bottom of the screen. It is an Illegal State Exception because the ball is not in the world. I’ve tried a few solutions but I can’t figure out how to correct this. Any advise?

  2. PS. For a guy with a learning disability, Greenfoot and your videos are the most effective learning tools I have found so far for programing. Great job and a billion thanks!

  3. Got it!
    I moved the checkBlock() out of the if (!stuck) statement in the act method and now it works. Although I have no idea why.

  4. I’m Greenfoot Korean User. I wonder if you have any plan to publish ‘Intro to Greenfoot ‘ 2nd Edition. If you had the plan, what are the new features of 2nd Edition?

  5. I was wondering how could you create a scoreboard for the trick the turtle game instead of making the game end after you get a certain number of points.

  6. He Mik, I hope you will make some more videos soon. It really helps me and if I’m right it helps a lot of people

  7. Hey mik, I look every day but there are not coming more videos
    So I would ask you if you stop with the videos or are you going on.
    Plz say if you stop because I watch every day for new videos and the last 8,9 months there are no more videos so I can stop for looking to a new video evrey day

    I hope you go on
    Cheers
    Luuk

  8. These have been wonderful to watch and learn from. I’m excited to share them with others and hope there will be more videos, too.
    Thank you, mik!
    Eliza

  9. For now it is, sadly. I have always intended to continue (and still do), but found it hard to find time. So no promises, but maybe there will be more one day.

  10. Love these videos so far.. Sorry to hear you aren’t continuing. Is it possible you could bundle all the files up together in a zip file and setup a torrent or download location? It’d be nice to have them all together instead of going to each individual link.

  11. HI Milk,

    I am a total beginner! Watch and learned from all your video, 37 of them within 5 days! Because it is so interesting simple and yet powerful! I was totally glued to it. Gutted that it is coming to an end. Any advice as to where I should be heading next to gain more learning?

Leave a Reply

Your email address will not be published.