GameZero - my first game

Hello all,

I have a WIP going on here:
http://blissfulthinking.nl/gamezero

I feel its coming along nicely. Some of the technicalities are discussed here: http://www.box2d.org/forum/viewtopic.php?f=9&t=3411

The setup is this:
JNLPAppletLauncher to enable JOGL support
Processing for graphics (its a PApplet.class superclass)
Uses JBox2D for physics
Levels are parsed from Inkscape SVG files
Minim is used for sound but a bug is making want to ditch it

I might request some help finding a solution to my sound problem at some later point. Right now I’m considering using JOrbis.

ATM I am trying to import graphics from Inkscape more WYSIWYG

Can’t start it:

Reading certificates from 11321 http://download.java.net/media/applet-launcher/applet-launcher.jar | C:\Documents and Settings\cwnl-mlundstr\Application Data\Sun\Java\Deployment\cache\6.0\41\4e6fb429-14413c9a.idx
JNLPAppletLauncher: static initializer
os.name = windows xp
nativePrefix =   nativeSuffix = .dll
tmpRootDir = C:\DOCUME~1\CWNL-M~1\LOCALS~1\Temp\jnlp-applet\jln1241908716672601823
Applet.init
subapplet.classname = nl.blissfulthinking.java.gamezero.Main
subapplet.displayname = GameZero
Applet.start
os.name = windows xp
os.arch = x86
processNativeJar: http://download.java.net/media/jogl/builds/archive/jsr-231-1.x-webstart-current/jogl-natives-windows-i586.jar --> C:\Documents and Settings\cwnl-mlundstr\.jnlp-applet\cache\blissfulthinking_nl\928eeb060fe53f7a9b03aca313f51f35f25ca4cf\jogl-natives-windows-i586.jar : 61249 bytes written
validateCertificates:
VALIDATE: jogl.dll
VALIDATE: jogl_awt.dll
VALIDATE: jogl_cg.dll
extractNativeLibs:
EXTRACT: jogl.dll(jogl)
EXTRACT: jogl_awt.dll(jogl_awt)
EXTRACT: jogl_cg.dll(jogl_cg)
processNativeJar: http://download.java.net/media/gluegen/webstart/gluegen-rt-natives-windows-i586.jar --> C:\Documents and Settings\cwnl-mlundstr\.jnlp-applet\cache\blissfulthinking_nl\928eeb060fe53f7a9b03aca313f51f35f25ca4cf\gluegen-rt-natives-windows-i586.jar : 5597 bytes written
validateCertificates:
VALIDATE: gluegen-rt.dll
extractNativeLibs:
EXTRACT: gluegen-rt.dll(gluegen-rt)
Reading certificates from 11185 http://download.java.net/media/gluegen/webstart/gluegen-rt.jar | C:\Documents and Settings\cwnl-mlundstr\Application Data\Sun\Java\Deployment\cache\6.0\9\3b95f209-19cbf95b.idx
JNLPAppletLauncher.loadLibrary("jogl")
    loading: C:\DOCUME~1\CWNL-M~1\LOCALS~1\Temp\jnlp-applet\jln1241908716672601823\jln5071805970490801377\jogl.dll
JNLPAppletLauncher.loadLibrary("jogl_awt")
    loading: C:\DOCUME~1\CWNL-M~1\LOCALS~1\Temp\jnlp-applet\jln1241908716672601823\jln5071805970490801377\jogl_awt.dll
Exception in thread "Animation Thread" java.lang.ExceptionInInitializerError
	at nl.blissfulthinking.java.gamezero.Main.setup(Main.java:99)
	at processing.core.PApplet.handleDraw(PApplet.java:1400)
	at processing.core.PApplet.run(PApplet.java:1328)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at ddf.mimin.javasound.JSMinim.getAudioInputStream(JSMinim.java:543)
	at ddf.mimin.javasound.JSMinim.getAudioSample(JSMinim.java:285)
	at ddf.minim.Minim.loadSample(Minim.java:210)
	at ddf.minim.Minim.loadSample(Minim.java:196)
	at nl.blissfulthinking.java.gamezero.tools.SoundTool.<clinit>(SoundTool.java:21)
	... 4 more

Are you wielding Java 6 update 10? I think that is the main requisite for the game.

EDIT: although it crashes on some part of the sound engine… could you tell me which OS/browser combination you are using and which version of Java you have?

I’m using J6U14, Windows XP SP2 (english version) and Firefox 3.5.

PS. 100 posts, full member, wohooo! DS.

Cool game, particularly the breaking of objects into smaller ones. Having relative controls is awkward though, I think it would play better if wasd was always up/left/down/right relative to the screen, regardless of your facing direction.

I get the following in Internet Explorer 7.

Looks the same. The class not found is from me clearing the cache and reloading the page to try again.

java.lang.NoClassDefFoundError: Could not initialize class nl.blissfulthinking.java.gamezero.tools.SoundTool
	at nl.blissfulthinking.java.gamezero.Main.destroy(Main.java:284)
	at org.jdesktop.applet.util.JNLPAppletLauncher.destroy(JNLPAppletLauncher.java:934)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Reading certificates from 11321 http://download.java.net/media/applet-launcher/applet-launcher.jar | C:\Documents and Settings\cwnl-mlundstr\Application Data\Sun\Java\Deployment\cache\6.0\41\4e6fb429-14413c9a.idx
JNLPAppletLauncher: static initializer
os.name = windows xp
nativePrefix =   nativeSuffix = .dll
tmpRootDir = C:\DOCUME~1\CWNL-M~1\LOCALS~1\Temp\jnlp-applet\jln2387490026474362153
Applet.init
subapplet.classname = nl.blissfulthinking.java.gamezero.Main
subapplet.displayname = GameZero
Applet.start
os.name = windows xp
os.arch = x86
processNativeJar: using previously cached: C:\Documents and Settings\cwnl-mlundstr\.jnlp-applet\cache\blissfulthinking_nl\928eeb060fe53f7a9b03aca313f51f35f25ca4cf\jogl-natives-windows-i586.jar
validateCertificates:
VALIDATE: jogl.dll
VALIDATE: jogl_awt.dll
VALIDATE: jogl_cg.dll
extractNativeLibs:
EXTRACT: jogl.dll(jogl)
EXTRACT: jogl_awt.dll(jogl_awt)
EXTRACT: jogl_cg.dll(jogl_cg)
processNativeJar: using previously cached: C:\Documents and Settings\cwnl-mlundstr\.jnlp-applet\cache\blissfulthinking_nl\928eeb060fe53f7a9b03aca313f51f35f25ca4cf\gluegen-rt-natives-windows-i586.jar
validateCertificates:
VALIDATE: gluegen-rt.dll
extractNativeLibs:
EXTRACT: gluegen-rt.dll(gluegen-rt)
Reading certificates from 11 http://blissfulthinking.nl/gamezero/GameZero.jar | C:\Documents and Settings\cwnl-mlundstr\Application Data\Sun\Java\Deployment\cache\6.0\50\6b838532-67d683a1.idx
Reading certificates from 59165 http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar | C:\Documents and Settings\cwnl-mlundstr\Application Data\Sun\Java\Deployment\cache\6.0\15\32767fcf-72d5d86f.idx
Reading certificates from 11185 http://download.java.net/media/gluegen/webstart/gluegen-rt.jar | C:\Documents and Settings\cwnl-mlundstr\Application Data\Sun\Java\Deployment\cache\6.0\9\3b95f209-19cbf95b.idx
JNLPAppletLauncher.loadLibrary("jogl")
    loading: C:\DOCUME~1\CWNL-M~1\LOCALS~1\Temp\jnlp-applet\jln2387490026474362153\jln3314326592490027771\jogl.dll
JNLPAppletLauncher.loadLibrary("jogl_awt")
    loading: C:\DOCUME~1\CWNL-M~1\LOCALS~1\Temp\jnlp-applet\jln2387490026474362153\jln3314326592490027771\jogl_awt.dll
Exception in thread "Animation Thread" java.lang.ExceptionInInitializerError
	at nl.blissfulthinking.java.gamezero.Main.setup(Main.java:99)
	at processing.core.PApplet.handleDraw(PApplet.java:1400)
	at processing.core.PApplet.run(PApplet.java:1328)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at ddf.mimin.javasound.JSMinim.getAudioInputStream(JSMinim.java:543)
	at ddf.mimin.javasound.JSMinim.getAudioSample(JSMinim.java:285)
	at ddf.minim.Minim.loadSample(Minim.java:210)
	at ddf.minim.Minim.loadSample(Minim.java:196)
	at nl.blissfulthinking.java.gamezero.tools.SoundTool.<clinit>(SoundTool.java:21)
	... 4 more

You can! Press § in-game and then press (A) to have that control scheme.

Really weird error you are reporting… I haven’t seen it before. I will upload a new version in the coming hours, hope that magicly fixes it :stuck_out_tongue:

To be more clear; Java 6 Update 10 or higher is required, so I can’t figure why people with Java 6 Update 14 are having the error :frowning:

plays and works very nice, I’m on java6_u14.

As mentioned above, the controls are a bit flimsy, it would be better if the ship moved in the diction of the key pressed and not the direction it is facing, this will make the game much easier to pick up for new players.

I googled the error and got a couple of hits. This one seems to be the best one:

http://processing.org/discourse/yabb2/YaBB.pl?board=Sound%3Baction=display%3Bnum=1221707542

Allow me to mention for the second time that this control mechanic is allready in the game. Press ‘P’ to go into the menu screen and press ‘A’ there.

Personally I believe the standard control mechanic gives you more freedom albeit that the learnign curve is steeper.

Thanks, I will look into it!

Yeah, the second control scheme is much nicer IMHO. Perhaps make it the default? Or I assume you’ll eventually have a tutorial that demonstrates the two and lets you pick in a more obvious manner?