Dingbat Attack - first try at 2D OpenGL game

My first OpenGL (JOGL) 2D game.
The graphics are made up entirely of typographical ornaments, aka dingbats, and
some web tiles, mixed together with gratuitous blending, fading, zooming, etc.

The game is fully functional but still beta. I’ve tested it on some different computers
but still need to test more. I am much interested in any kind of feedback:
does it run smoothly enough, does it run at all,
do you like the graphical effects and the gameplay, etc.

Instructions:

Click to lay markers to blow up the dingbats.
Earn clicks by blowing up multiple dingbats in one go.
Watch out for the alarm timer, if it goes off the dingbats will come after you!

640x480: http://www.13thmonkey.org/~boris/jgame/JGame/dingbats-640x480.jnlp
800x600: http://www.13thmonkey.org/~boris/jgame/JGame/dingbats-800x600.jnlp
1024x768: http://www.13thmonkey.org/~boris/jgame/JGame/dingbats-1024x768.jnlp
fullscreen: http://www.13thmonkey.org/~boris/jgame/JGame/dingbats.jnlp

Boris van Schooten

Dingbats, ha! What a good idea.

Running a little slow here on my Mac - It’s acting like it’s software rendering, not hardware. I had the same experience with the other JGame demos.

I’m getting this exception from webstart. I’m using WinXP, Java 1.6.0_03.


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 com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no jogl in java.library.path
	at java.lang.ClassLoader.loadLibrary(Unknown Source)
	at java.lang.Runtime.loadLibrary0(Unknown Source)
	at java.lang.System.loadLibrary(Unknown Source)
	at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
	at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
	at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
	at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
	at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
	at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
	at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.<clinit>(WindowsGLDrawableFactory.java:60)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
	at javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)
	at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)
	at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)
	at jgame.platform.JGEngine$JGCanvas.<init>(JGEngine.java:977)
	at jgame.platform.JGEngine.init(JGEngine.java:1373)
	at jgame.platform.JGEngine.initEngine(JGEngine.java:1261)
	at examples.dingbats.Dingbats.<init>(Dingbats.java:35)
	at examples.dingbats.Dingbats.main(Dingbats.java:31)
	... 9 more

Runs perfectly here in 1920x1200.
One problem: you can’t see that “really want to quit?” window when already in fullscreen mode. I hit escape and the game just froze until I tabbed that window to front. He, I’m on Vista, I’m used to those screens :wink:
Nice game, btw.

Java 1.6.0_04, Vista, 8600gt, Q6600

Empty your Java Webstart cache entirely, it might solve the problem.

Thanks. That helped.

Thanks for the feedback!
I should do something about that window, and about the mouse cursor being invisible too much too. You can also exit immediately using Shift-Esc by the way.
The webstart tip also comes in useful.

Brackeen:

[quote]Running a little slow here on my Mac - It’s acting like it’s software rendering, not hardware. I had the same experience with the other JGame demos.
[/quote]
Which version of the games ran slowly on your apple:
the opengl webstart, the non-opengl webstart, or the applets?

Which resolution? What machine did you run them on?

Ah, accursed performance! >:( The engine is made to use graphics acceleration even on a 10 year old NetBSD machine running a remote X server, but, oh well, somehow, the surprises never end. Did anyone notice that a JOGL applet runs slower than a JOGL webstart?? Mine do. Any ideas why?

Boris van Schooten

I had sluggish speed with the OpenGL webstart versions.

Machine specs (about 1.5 years old):
Mac OS X 10.5.2 (with the ‘graphics update’)
2.16 GHz Intel Core 2 Duo
2GB ram
Radeon X1600 256 MB

Yeah, it’s weird, on this machine the non-OpenGL webstart versions run smoother than the OpenGL ones. I run about 1024x768, and the OpenGL webstart versions take up a lot of CPU. The smaller the window size, the less the CPU, so I’m guessing it’s somehow falling back on a software renderer. ???

I ran some LWJGL/Slick games recently and it was smooth, so it shouldn’t be a problem with the machine itself.

The progress bar at the bottom is not visible when I run the game in fullscreen with webstart. Seems like it is behind the taskbar, which is for some reason visible. See http://www.orfjackal.net/temp/2008-03-12_174320.JPG

WinXP SP2, 1920x1200, GF8800 GTS 640MB, Core 2 Q6600, 3.5GB RAM. Game runs smoothly.

Is the game supposed to have sounds? I don’t hear anything.

It would be good if there was better visual feedback when you are near the borders of the game area. Now it’s quite easy to get accidentally trapped near the edges. Also, when playing in windowed mode, the mouse cursor may be moved outside the window, which often results in losing a life.

Runs really slow (unplayable) on my (also really slow…) PC@work (P4 2.4Ghz, XP, Java5, Intel onboard crap from the stoneage), but works fine on my EEEPC, albeit it’s very hard to play it with a touchpad… :wink:

Thanks again!

[quote]Yeah, it’s weird, on this machine the non-OpenGL webstart versions run smoother than the OpenGL ones. I run about 1024x768, and the OpenGL webstart versions take up a lot of CPU. The smaller the window size, the less the CPU, so I’m guessing it’s somehow falling back on a software renderer.
[/quote]
The non-opengl version doesn’t require any 3D acceleration, so it generally runs faster.

It is possible that the OpenGL slowness is caused by the TextureRenderer class I’m using. This translates 2D drawing operations to an OpenGL texture. I’ve seen that it runs slowly on some machines. However, it should only be slow when scrolling. I tested it on an older apple and noticed it ran at erratic speeds. It was slow when scrolling but reasonably fast (using 3D acceleration) when not scrolling.

Another possibility is that there’s a software fallback problem with wrapping NPOT textures with your card/drivers. See for example this forum:

http://www.gamedev.net/community/forums/topic.asp?topic_id=457993

Here’s a version where I disabled use of NPOT altogether:

http://www.xs4all.nl/~borisvs/dingbats-nonpot/dingbats.jnlp

[quote]The progress bar at the bottom is not visible when I run the game in fullscreen with webstart.
[/quote]
I’ll try to fix that.

[quote]Is the game supposed to have sounds? I don’t hear anything.
[/quote]
No, sorry, should have mentioned this.

That no-NPOT version works great on this machine. Runs super-smooth, “feels” like OpenGL, and uses less than 10% CPU.