Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Dingbat Attack - first try at 2D OpenGL game  (Read 2931 times)
0 Members and 1 Guest are viewing this topic.
Offline bwvschooten

Senior Newbie


Projects: 1



« Posted 2008-03-11 22:54:42 »

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
Offline brackeen

Junior Member





« Reply #1 - Posted 2008-03-11 23:04:47 »

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.

Offline Jackal von ÖRF

Junior Member





« Reply #2 - Posted 2008-03-11 23:10:09 »

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

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
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

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Hansdampf

Senior Member


Projects: 3


too offending?


« Reply #3 - Posted 2008-03-11 23:32:53 »

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

lots of sillystupid games: http://www.emaggame.com
Offline gouessej

« In padded room »



TUER


« Reply #4 - Posted 2008-03-12 07:03:16 »

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

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
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


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

Offline Jackal von ÖRF

Junior Member





« Reply #5 - Posted 2008-03-12 12:07:15 »

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

Thanks. That helped.

Offline bwvschooten

Senior Newbie


Projects: 1



« Reply #6 - Posted 2008-03-12 15:08:09 »

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.

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!  Angry   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
Offline brackeen

Junior Member





« Reply #7 - Posted 2008-03-12 15:52:35 »

Brackeen:
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?
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. Huh

I ran some LWJGL/Slick games recently and it was smooth, so it shouldn't be a problem with the machine itself.
Offline Jackal von ÖRF

Junior Member





« Reply #8 - Posted 2008-03-12 16:50:23 »

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.

Offline EgonOlsen
« Reply #9 - Posted 2008-03-12 23:31:58 »

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

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bwvschooten

Senior Newbie


Projects: 1



« Reply #10 - Posted 2008-03-15 10:56:26 »

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.

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.

I'll try to fix that.

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

No, sorry, should have mentioned this.

Offline brackeen

Junior Member





« Reply #11 - Posted 2008-03-15 17:35:59 »

That no-NPOT version works great on this machine. Runs super-smooth, "feels" like OpenGL, and uses less than 10% CPU.
Pages: [1]
  ignore  |  Print  
 
 

 
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!