This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Finn Kerr
Finn Kerr presents ...

2008/10/16

Breakout

As an end-of-the-year, post-AP CSA Exam, "fun project," we had to modify a game in at least three ways.
Specifically, I added powerups, a relative bounce (meaning the ball bounces off the paddle in a direction based on where on the paddle it hit), and sounds.
-------------
Update (10/17/08 2:12AM GMT)
-Fixed the sound problem
Update (10/17/08 2:19AM GMT)
-Fixed sound again
-------------
This game is based on Breakout by Eric Roberts who presented it as a nifty assignment at SIGCSE in 2006 using the Java Task Force libraries.

4117 views / 3 in the last 7 days

Tags: game with-source

open in greenfoot

There is no HTML 5 translation of this scenario available.
View legacy version (requires Java plugin)

This scenarios uses Java features that are not available for use after conversion to HTML 5. Please try the legacy version, which requires the Java plugin to be installed.

stephenstephen

2008/10/16

I am sorry, it may just be my computer, but this game seems to stop every time the ball hits a wall or anything.
davmacdavmac

2008/10/16

Mine too. There's probably an exception occurring.
Finn KerrFinn Kerr

2008/10/16

That's odd... All the files needed are there. It works perfectly fine when I run it in Greenfoot. For some reason it's not working on the website...
davmacdavmac

2008/10/17

It looks like you've got sounds (good.WAV, bad.WAV, brick.WAV, padle.WAV, wall.WAV, ball.WAV) which have uppercase WAV extensions but your code says to play good.wav etc (with a lowercase file extension). On Windows this doesn't matter but as soon as you put files in a jar file they become case sensitive - you must match the actual file name...
A new version of this scenario was uploaded on Sat Oct 18 01:12:49 UTC 2008
A new version of this scenario was uploaded on Sat Oct 18 01:20:05 UTC 2008
Finn KerrFinn Kerr

2008/10/18

Thank you davmac. I probably would have never figured that out on my own XD.
RubenAlonzoRubenAlonzo

2012/3/11

How do place a name in the paddle? for example I would like to make a big paddle (i can do this by altering the width to 404 which corresponds to the width in my world) but i then would like yo place a name in the paddle like "board of education". My problem is i dont know how or where to alter in the editor to make this so? Please help. my email is aceves.ruben@gmail.com or respond here. Thank you.
danpostdanpost

2012/3/11

Create a in the Paddle class called 'goBig()' which resizes (or re-creates) the image and use image.drawString(String, int, int) or create a seperate image with new GreenfootImage(String, font, Color, Color) and image.drawImage(GreenfootImage, int, int); either way, finish with setImage(image). The method can be public and called from the world using a reference to the paddle object 'paddle.goBig();' (if 'paddle' is the reference name).
RubenAlonzoRubenAlonzo

2012/3/12

Cheers.

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.