Break-It: an old school Breakout clone!

Break-It is a breakout clone programmed in Java by me! It was done without graphical assets, other than the logos in the credits at the beginning. Break-It is desktop only. It was developed on Windows 10, so I don’t know if it runs on OSX or Linux. If anybody is running these platforms, I am interested in performance feedback.

I hope you enjoy it! Please let me know how it runs on your machine and if you have any problems!

Break-It requires Java 8 to run.

Update: Source code is up on Github! Also, sound is re-implemented using Tiny Sound API. Sound is generally better: seamless music looping, an no sfx dropouts. I’m interested to have somebody test it on their non-windows system!

Github repository:

Link to JAR file:


https://s18.postimg.org/c0su4mr3p/screenshot.png

Hey I tried to play it 3 times. I’m on Linux (debian jessie). It loaded the intro/credits thing, then loaded the menu where it says to press enter. When I press enter, it just goes to a black screen. I know its running because at the top, the FPS still updates, just can’t see anything. Once I didn’t press enter and just let it run, and eventually it faded to the black screen. No errors in the console except the stupid error I posted about in a different thread, about how this Linux system won’t play sound if any other program that MIGHT use sound is open.

Thanks for the report. It’s definitely a sound issue. Is it playing any music at all?

I read through your thread about sound on Debian Jesse. I couldn’t ascertain whether or not you were able to pinpoint the cause of your sound woes, but my hunch is “no”.

The reason I’m 100% positive that it is a sound issue is because when you press enter, the music and screen both fade to black. In order to transition to the next game state, the screen has to be all black, and the MASTER_GAIN for the music thread must be at minimum value, which is this boolean check :

gainControl.getValue() == gainControl.getMinimum();

where gainControl is of type (FloatControl) Control for the SourceDataLine in question.

My hunch is that something is up with gainControl not correctly adjusting the gain. I’m not sure why that is. If the AudioSystem is failing to get the SourceDataLine, it will throw a LineUnavailableException. Are you by chance getting any stack trace prints on the console?

I updated the JAR to provide more specific info when exceptions are thrown in the sound class.

Here is a new link:

(I also updated the original link)

Hi

The sound works without any trouble under Mageia Linux 5, I hear the music and the effects. I get about 60 UPS and 600 FPS but the game seems to be very jerky, it drives it almost unplayable. It’s like tons of frames are missing when the ball moves, it makes it hard to follow.

Hi, thanks for the feedback. Do you get only 600 fps in the title screen as well, or is it just in the gameplay segment?

It’s between 400 and 600 in the title screen. Your game is simple but it looks really polished, I really hope that you’ll fix this bug. I’ll give it a try under Windows later.

Sorry for the delay. When I tried it, it was not playing any sound and throwing a LineUnavailableException. That’s the same error I was having trouble with.

I love Breakouts. This one is very good. It’s very dynamic.
Well done.
(Made level 4 on the first go…)

Thanks for the feedback!

Sorry for the late-late reply, but if you’re still around, I re-implemented the sound using TinySound, and I’m interested to see how it runs on your system now.

File got removed :confused: (link broken) ???

try this one:

Link works! … :point:
Getting an error due to the fact that I have no sound card. :persecutioncomplex:


TinySound not initialized!
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NullPointerException
        at com.noah.breakit.game.Game.<init>(Game.java:84)
        at com.noah.breakit.game.Game.main(Game.java:181)
        ... 5 more
Shutting down TinySound...
TinySound shutdown complete!