Hyper Blazer

Here’s a WIP version of an overhaul of Hyper Blazer:
http://www.gagaplay.com/hypblazer/test/hypblazer.jnlp

It still uses a very old version of LWJGL, so I’m not expecting better compatibility than the old version of Hyper Blazer. (I’ll work on that soon).

What’s new:

  • More levels (+ a really easy introduction level)
  • Larger draw distance which makes things somewhat easier (although it’s still not an easy game :))
  • Unlockable music & continues (all scored points are added to unlock credits)
  • More types of tiles (elevated tiles) and flexible road width (not only 5 tiles width)
  • Different music
  • New graphics and animated textures
  • Music is now not played through OpenAL anymore but uses EasyOgg. I couldn’t get good compatibility using OpenAL.

I’m hoping to get some feedback about whether or not all these changes are actually an improvement over the previous version and where gameplay can be improved.
Although the LWJGL version still has to get updated to the latest version, crash reports are still welcome.

Screenshots:

http://www.gagaplay.com/hypblazer/new/sc0.png

http://www.gagaplay.com/hypblazer/new/sc3.png

anaglyph 3D mode:

http://www.gagaplay.com/hypblazer/new/sc4.png

too bad for the jnlp as once my screen resolution changed it look distorded, anyway it was playable and pretty fun, nice one !

PS: I remember that Thijs made a similar one in an Applet on Arcazoid

By distorted do you mean stretched (on a wide screen display)?
It seems it doesn’t correctly correct the aspect ratio on wide screen displays (it should, but it doesn’t. I’ll fix that)

Thanks for testing! :slight_smile:

dont have to care much it is not really a game probleme, what happend is that my screen did not know the automaic choosen screen resolution and then once switched it doesn’t fit very well the screen until I set the correct screen setting for this mode like vzoom,hzoom, etc…

Does this need Java 6?

Mac OS X Java 5

No it doesn’t need Java 6, but it’s still using a very old version of LWJGL and I guess you’re using an Intel Mac?
First thing I’ll do is update to the latest LWJGL

I just uploaded a new version.
New:

  • The aspect ratio of the display should now also be correct on wide screen displays
  • Updated to LWJGL 2.1.0

Because of the update of LWJGL, I wonder if it now works better on Linux and Max OSX :).
(for the moment only 32bit linux and windows are supported, still have to check how to add 64 bit support)

http://www.gagaplay.com/hypblazer/test/hypblazer.jnlp

fails to work here on 64bit linux get the following

*** START ***
CLEAN UP
java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.Sys
	at org.lwjgl.openal.AL.<clinit>(AL.java:59)
	at com.gagaplay.hwblast.Game.cleanup(Game.java:455)
	at com.gagaplay.hwblast.Game.main(Game.java:227)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.javaws.Launcher.executeApplication(Launcher.java:1321)
	at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1267)
	at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1066)
	at com.sun.javaws.Launcher.run(Launcher.java:116)
	at java.lang.Thread.run(Thread.java:619)
#### Java Web Start Error:
#### null

since your using the latest lwjgl, it should just be a matter of including the liblwjgl64.so and libopenal64.so in the linux natives jar to get it to work.

Ah, thanks! :slight_smile:
I just updated the windows and linux libraries, so hopefully it works now on 64 bit too.

The aspect ratio of the display should now also be correct on wide screen displays

It looks wrong here, unless I set the display mode to “full” (=stretch). Your best bet is probably using the desktop resolution.

It’s still fun and I do recognize those levels. The music is as awesome as ever. :slight_smile:

Hm, yes that makes sense. I thought usually full screen modes always stretched to fill the whole screen, but I apparently not…
I don’t want to use the desktop resolution though, as that won’t run full speed on many machines (including my laptop).

I wonder if there’s a programmatic way to force ‘stretched mode’, hmmm…

[quote]It’s still fun and I do recognize those levels. The music is as awesome as ever. :slight_smile:
[/quote]
Thanks! :slight_smile:
(The previous music is still included as an unlockable)

works great now except for the music, if your mixing OpenAL and Java Sound then its probably due to the fact that they usually don’t work together too well on linux. I’d recommend you use the standalone library slick-util (note different from slick, its actually a sub part of it) as that is probably the most well tested and reliable library for playing sounds and ogg files with OpenAL. You can find it at http://slick.cokeandcode.com/downloads/util/ with javadoc at http://slick.cokeandcode.com/javadoc-util/ see its source for a the simple test example on how to use it.

Graphically it looks pretty good, however not sure i like the small flying triangles everywhere as it gives the impression that the graphics are broken(cracking?) or something, probably better to go with a small texture or something instead.

The red color floor at the end of each level looks slightly odd due to the gradient applied to it as it gives it a standing up sort of effect which doesn’t look that good and would be better if it looked more flat.

Was slightly disappointed that the ball didn’t fall into holes like the original game but instead blew up but then thats just me nitpicking :slight_smile:

however overall its a very enjoyable game and very addictive.


*** START ***
1680x1050 1.6
Setting mode 800 x 600 x 24 @58Hz
VSync=false
Throttle=true
/player.png
Texture '/player.png' loaded.
Texture ID 0 assigned
Loaded clip /explo1.wav
Loaded clip /boing.wav
Loaded clip /fx2.wav
Texture ID 1 assigned
Texture ID 2 assigned
/tunnel0.png
Texture '/tunnel0.png' loaded.
Texture ID 3 assigned
/tunnel1.png
Texture '/tunnel1.png' loaded.
Texture ID 4 assigned
/tunnel2.png
Texture '/tunnel2.png' loaded.
Texture ID 5 assigned
/tunnel3.png
Texture '/tunnel3.png' loaded.
Texture ID 6 assigned
/bg5.jpg
Texture '/bg5.jpg' loaded.
Texture ID 7 assigned
/title.png
Texture '/title.png' loaded.
Texture ID 8 assigned
/levelscore.png
Texture '/levelscore.png' loaded.
Texture ID 9 assigned
/19x16Lucida.png
Texture '/19x16Lucida.png' loaded.
Texture ID 10 assigned
Frequency:58
/tile.jpg
Texture '/tile.jpg' loaded.
Texture ID 11 assigned
Texture ID 12 assigned
/TileDrag.png
Texture '/TileDrag.png' loaded.
Texture ID 13 assigned
/TileSpeed.png
Texture '/TileSpeed.png' loaded.
Texture ID 14 assigned
/gagaplay.png
Texture '/gagaplay.png' loaded.
Texture ID 15 assigned
Loaded clip /claps.wav
Loaded clip /low1.wav
INIT COMPLETE
LEVEL 1
setUnlocked 0
setValue 0
save Soundtrack: 1 - Blazing to Eden
OK
OK
setValue 0
save Soundtrack: 1 - Blazing to Eden
OK
setUnlocked 0
setValue 0
save Number of Continues: 0
OK
OK
setValue 0
save Number of Continues: 0
OK
setUnlocked 0
setValue 0
save Bonus Multiplier: 1X
OK
OK
setValue 0
save Bonus Multiplier: 1X
OK
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable
FINISH!
LEVEL 2
java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable

Plays a lot more nicely with my Linux / Java 6 box now. Still can’t say I’m keen on switching into fullscreen mode without prior warning, but there you go.

PS I had been thinking of making a game similar to this for the next 4k competition, but I probably won’t bother now.

Thanks for the excellent feedback, guys. Exactly the kind of feedback I was hoping for :smiley:
I know what to do next

That’s fun! :slight_smile:

I just uploaded a new version:

http://www.gagaplay.com/hypblazer/test/hypblazer.jnlp

The sound implementation can now be switched between javasound and OpenAL.
The OpenAL implementation now uses slick-util as suggested by kapta.

However, per default the JavaSound implementation is selected (streaming using OpenAL for the music is just not working reliably on my computer and also slick-util did not solve this). On my PC, the JavaSound implementation works best.

To switch to OpenAL, open the .properties file located in ‘System.getProperty(“user.home”) + “/.hyperblazer”’ and set the property ‘openal’ to ‘1’

I’d like some feedback on the following (hopefully from people with different OS’es):

  • How does the default JavaSound implementation work? (does it work at all, does it have a sufficiently small latency, any problems?)
  • Idem for the OpenAL implementation

Thanks in advance!

Tested on Linux (Debian Lenny), with OpenJDK 1.6.0_0-b11.

I couldn’t run without first editing the JNLP file to put the opening tag onto one line.

Once I fixed that I could hear jump sound effects with so little latency they almost seemed to be played too early! There was no background music, and it crashed at the end of the first level. Popped up a dialog which said nothing interesting (words to the effect of “There has been an error and Hypblazer must exit”) and didn’t respond when I clicked on the button.

The console from which I ran has lots of

java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.

and a

FINISH!
java.lang.NullPointerException
        at com.gagaplay.sound.SoundSystem.playFX(SoundSystem.java:115)
        at com.gagaplay.hwblast.Game.nextLevel(Game.java:773)
        at com.gagaplay.hwblast.engine.TileFinish.touch(TileFinish.java:37)
        at com.gagaplay.hwblast.engine.Road.touch(Road.java:72)
        at com.gagaplay.hwblast.engine.Player.tick(Player.java:147)
        at com.gagaplay.hwblast.Game.logic(Game.java:517)
        at com.gagaplay.hwblast.Game.run(Game.java:417)
        at com.gagaplay.hwblast.Game.main(Game.java:227)

which is probably the error which made it crash.

Will now try with OpenAL, but I expect that it has a missing resource and won’t be much happier playing it with a different system.

Edit: well, I was wrong. With OpenAL I got less than a second of background music, and it crashed when I was on about 20 points.

java.io.IOException: mark/reset not supported
        at java.io.InputStream.reset(InputStream.java:351)
        at java.io.FilterInputStream.reset(FilterInputStream.java:217)
        at com.sun.media.sound.SoftMidiAudioFileReader.getAudioInputStream(SoftMidiAudioFileReader.java:135)
        at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1111)
        at org.newdawn.slick.openal.WaveData.create(WaveData.java:123)
        at org.newdawn.slick.openal.SoundStore.getWAV(SoundStore.java:712)
        at org.newdawn.slick.openal.SoundStore.getWAV(SoundStore.java:682)
        at org.newdawn.slick.openal.AudioLoader.getAudio(AudioLoader.java:54)
        at com.gagaplay.sound.SoundSystem.<clinit>(SoundSystem.java:40)
        at com.gagaplay.hwblast.Game.gameStart(Game.java:763)
        at com.gagaplay.hwblast.Game.logic(Game.java:554)
        at com.gagaplay.hwblast.Game.run(Game.java:417)
        at com.gagaplay.hwblast.Game.main(Game.java:227)
java.lang.NullPointerException
        at org.newdawn.slick.openal.SoundStore.getWAV(SoundStore.java:714)
        at org.newdawn.slick.openal.SoundStore.getWAV(SoundStore.java:682)
        at org.newdawn.slick.openal.AudioLoader.getAudio(AudioLoader.java:54)
        at com.gagaplay.sound.SoundSystem.<clinit>(SoundSystem.java:40)
        at com.gagaplay.hwblast.Game.gameStart(Game.java:763)
        at com.gagaplay.hwblast.Game.logic(Game.java:554)
        at com.gagaplay.hwblast.Game.run(Game.java:417)
        at com.gagaplay.hwblast.Game.main(Game.java:227)
java.lang.NullPointerException
        at com.gagaplay.sound.SoundSystem.playFX(SoundSystem.java:106)
        at com.gagaplay.hwblast.engine.Player.jump(Player.java:230)
        at com.gagaplay.hwblast.engine.TileJump.touch(TileJump.java:31)
        at com.gagaplay.hwblast.engine.Road.touch(Road.java:72)
        at com.gagaplay.hwblast.engine.Player.tick(Player.java:147)
        at com.gagaplay.hwblast.Game.logic(Game.java:517)
        at com.gagaplay.hwblast.Game.run(Game.java:417)
        at com.gagaplay.hwblast.Game.main(Game.java:227)

Thanks again for testing pjt33, I really appreciate it!

[quote]I couldn’t run without first editing the JNLP file to put the opening tag onto one line.
[/quote]
I blame this on the JRE you’re using (the jnlp is valid XML and should be fine), but it’s good to know. I’ll change the jnlp to work around it.

[quote]…and didn’t respond when I clicked on the button.
[/quote]
I’m not sure what’s causing this, but it also seems a JRE issue?

[quote]java.lang.Exception: Unable to open the sourceDataLine: javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.
[/quote]
Strange, as I think it’s the JRE that selects this format. Again, a JRE issue?

[quote]java.io.IOException: mark/reset not supported
at java.io.InputStream.reset(InputStream.java:351)
at java.io.FilterInputStream.reset(FilterInputStream.java:217)
at com.sun.media.sound.SoftMidiAudioFileReader.getAudioInputStream(SoftMidiAudioFileReader.java:135)
at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1111)
[/quote]
Again, looks like a JRE bug to me?

I think the rest of the exceptions are results of the above ones.
In any case, I checked but the resources are definitely all there.

Now, normally I don’t like to blame the JRE so easily for all my problems, but to be honest I don’t know what else to conclude and how to fix this…
Any chance you could try it on a Sun JRE or another machine?

[quote]With OpenAL I got less than a second of background music
[/quote]
Hmm, yes, I have the same problem. I’m doing exactly the same thing as in the slick-util example code except that I’m loading the music from the classloader, so I’m not sure how to fix this.

Cheers,
Erik

That was Sun, almost. (OpenJDK is the GPL’d Sun implementation with the 2% or so of third party binaries removed). I should be able to test with 1.6.0_10, though.

Ok, 1.6.0_10 on a different Debian Lenny machine: JavaSound works fine, OpenAL still has the problem with the background music.

Hehe, maybe that 2% is the part that makes JavaSound work ;D
But still, I guess there must be a way to make JavaSound work on OpenJDK, so I’ll try to find a way.

Thanks again.