Gems - Lwjgl test game

Since the 48-hour game programming contest looms near, its time to publically test some of my base code i’ll be using, which has quietly been adding to my test game Gems. Version, oo, lets say π / 4 :slight_smile:
http://studenti.lboro.ac.uk/~cojc5/Programs/Gems03_11_2002.zip

Mainly I’m interested in how reliable this is on various systems, since i’ve only tested it on a few myself. A few notes:
[] Everything should be nice and self contained, simply unzip and run the .jar
[
] Sorce is in the jar as well if anyones interested (although its pretty ugly in parts)
[] Please excuse my crappy text generator, i can’t draw characters :frowning: Plenty of work left to do on it…
[
] The bug with ‘random’ crashes should be fixed (GC kicking in and collecting my FloatBuffer, while I was still using the pointer…)
[*] Stencil buffer may cause hedious framerates on certain configurations (windowed and/or 16bit colour mainly) but give it a try anyway please.

System specs, framerate (counter lower right of board) and any other comments very welcome.
Thanks

java.io.FileNotFoundException: .\Concept\distort.ms3d (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:103)
at java.io.FileInputStream.(FileInputStream.java:66)
at OrangyTang.OpenGLToolkit.MilkshapeLoader.loadMesh(MilkshapeLoader.java:126)
at OrangyTang.OpenGLToolkit.MilkshapeLoader.(MilkshapeLoader.java:108)
at Gems.Gems.initialise(Gems.java:226)
at Gems.Gems.actionPerformed(Gems.java:139)
at Gems.ScreenManager$ButtonHandler.actionPerformed(ScreenManager.java:261)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1820)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:258)
at java.awt.Component.processMouseEvent(Component.java:5021)
at java.awt.Component.processEvent(Component.java:4818)
at java.awt.Container.processEvent(Container.java:1380)
at java.awt.Component.dispatchEventImpl(Component.java:3526)
at java.awt.Container.dispatchEventImpl(Container.java:1437)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
at java.awt.Container.dispatchEventImpl(Container.java:1423)
at java.awt.Window.dispatchEventImpl(Window.java:1566)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

Haha - Nice

I get the FileNotFoundException too - but the camara controls work nicely…

I am using a Celeron 366@550 with a GeForce 2 MX
Uses ~ 40 % CPU and runs fluently, except for some small skips here and there - but don’t know what is causing it - might be my system…

Btw - I was running Windowed, since whenever I go to fullscreen in any Java 2 proggy my computer crashes (nv4_disp.dll) :frowning:

uh - Not seing any FPS in windowed mode?

Nice to see some actual running programs using LWJGL!

Thanks everyone for trying it, i’m going to be working on it quite a bit this week hopefully fixing bugs and tweeking stuff.

distort.ms3d can be safely ignored, the mesh isnt used anywhere anymore, looks like I just forgot to take out the loading code :-[

FPS - I have no idea why its not displaying in windowed mode, does it display in fullscreen mode? Other than the initial setup, the rendering is all identical so it shouldnt make a difference… Failing that, www.fraps.com will work as a temporary fix :-/

Is anyone seeing the seems in the skybox? It seems that GL.CLAMP_TO_EDGE is missing from lwjgl ??? so I had to do a quick texture coord hack to try and make up for that

I’m running a P4@1.3Ghz with 640 meg ram and a 128Meg Gforce4.

The frame rate is always maxed out in all resolutions to match the refresh rate.

The CPU usage seems to hover around 20% except in very high resolutions where it bounces up and down a lot but never gets above 22%.

Didn’t notice any seams however the texture on the axis is only visible from one side.

Hello!

I can’t get it to work, but since I know jack shti (deliberate Jeff-like mispel) about OpenGL etc I’m probably doing something wrong… I get the same error with full screen on/off, different resolutions etc. My config:

XP, PIII@933MHz
Matrox G400
JDK 1.4.1_01

And (tataaa!), the actual error:
Available extensions:
GL_ARB_multitexture GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_Autodes
k_facet_normal GL_EXT_abgr GL_EXT_bgra GL_EXT_compiled_vertex_array GL_EXT_packe
d_pixels GL_EXT_separate_specular_color GL_EXT_stencil_wrap GL_EXT_texture_edge_
clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_vertex_array GL_K
TX_buffer_region GL_SGIS_multitexture GL_WIN_swap_hint WGL_EXT_swap_control
Failed to get function: wglGetExtensionsStringARB
Failed to get function: wglGetExtensionsStringEXT

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.

Current Java thread:
at org.lwjgl.opengl.GL.wglGetExtensionsStringEXT(Native Method)
at org.lwjgl.opengl.GL.determineAvailableExtensions(GL.java:1550)
at org.lwjgl.opengl.GL.init(GL.java:1655)
at org.lwjgl.opengl.BaseGL.create(BaseGL.java:113)
at Gems.ScreenManager.createDisplay(ScreenManager.java:172)
at Gems.Gems.actionPerformed(Gems.java:134)
at Gems.ScreenManager$ButtonHandler.actionPerformed(ScreenManager.java:2
61)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
64)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1817)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5093)
at java.awt.Component.processEvent(Component.java:4890)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Window.dispatchEventImpl(Window.java:1585)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh

read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

Dynamic libraries:
0x00400000 - 0x00406000 c:\jdk1.4\bin\java.exe
0x77F50000 - 0x77FF7000 C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F46000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5D000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x6D330000 - 0x6D45A000 c:\jdk1.4\jre\bin\client\jvm.dll
0x77D40000 - 0x77DCC000 C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000 c:\jdk1.4\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000 c:\jdk1.4\jre\bin\verify.dll
0x6D210000 - 0x6D229000 c:\jdk1.4\jre\bin\java.dll
0x6D320000 - 0x6D32D000 c:\jdk1.4\jre\bin\zip.dll
0x6D000000 - 0x6D0FB000 C:\jdk1.4\jre\bin\awt.dll
0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV
0x76390000 - 0x763AC000 C:\WINDOWS\System32\IMM32.dll
0x771B0000 - 0x772D1000 C:\WINDOWS\system32\ole32.dll
0x6D180000 - 0x6D1D0000 C:\jdk1.4\jre\bin\fontmanager.dll
0x73760000 - 0x737A4000 C:\WINDOWS\System32\ddraw.dll
0x73BC0000 - 0x73BC6000 C:\WINDOWS\System32\DCIMAN32.dll
0x6D910000 - 0x6D981000 C:\WINDOWS\System32\D3DIM.DLL
0x74720000 - 0x74764000 C:\WINDOWS\System32\MSCTF.dll
0x10000000 - 0x1003A000 C:\download\Gems\lwjgl.dll
0x72280000 - 0x722A8000 C:\WINDOWS\System32\DINPUT.dll
0x5ED00000 - 0x5EDC6000 C:\WINDOWS\System32\OPENGL32.dll
0x68B20000 - 0x68B3E000 C:\WINDOWS\System32\GLU32.dll
0x0CF30000 - 0x0D00F000 C:\download\Gems\OpenAL32.dll
0x688F0000 - 0x688F9000 C:\WINDOWS\System32\HID.DLL
0x76670000 - 0x76757000 C:\WINDOWS\System32\SETUPAPI.DLL
0x69000000 - 0x690EC000 C:\WINDOWS\System32\G400Icd.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL

Local Time = Mon Nov 04 10:35:39 2002
Elapsed Time = 9

The exception above was detected in native code outside the VM

Java VM: Java HotSpot™ Client VM (1.4.1_01-b01 mixed mode)

An error report file has been saved as hs_err_pid828.log.

Please refer to the file for further information.

/Micke

[quote]org.lwjgl.opengl.GL.wglGetExtensionsStringEXT(Native Method)
[/quote]
aha, I was stumpted with this one for a while on one machine - apparently a bug in Lwjgl that should be fixed in the next version (any news on that anyone?). Unfortunatly nothing you can do until then though :-/

Same error for me, cannot get it to work.

Unofficial bug fix release attached for those that need it :slight_smile:
No instructions or warranty… just built it from my local source code.

http://www.shavenpuppy.com/downloads/lwjgl.zip

Cas :slight_smile:

Cheers Cas, any word on CLAMP_TO_EDGE appearing any time soon?

Oh, I didn’t know it wasn’t in there! I’ll take a look at adding it.

It’s been implemented dodgily by a few vendors. Might be best not to rely on it.

Cas :slight_smile:

Odd, Real Time Rendering seems to suggest that GL.CLAMP has been implemented to varying degrees of sucess, and that _TO_EDGE should generally be used instead - either way, CLAMP definatly doesnt do what it says on the tin on my Geforce2 :o (despite nVidia usually being pretty compliant with their drivers…)

By the time you read this, i’ll have uploaded an updated version (kicks modem) with Cas’ bug fix in it. Text is still not perfect, but much less retina-burning than before :slight_smile:

It froze my PC right after saying that it couldn’t get ahold of the keyboard :-/

Win2k, Athalon XP 1600+, TNT2 Vanta

Hm, that hasn’t manifested itself for over a year. I wonder if it’s a DX issue.

I found that simply clicking the mouse did the trick.

Cas :slight_smile:

Still getting an error with the “latest” version - different one now, though:


An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.

Current Java thread:
at org.lwjgl.opengl.GL.wglSwapIntervalEXT(Native Method)
at Gems.ScreenManager.createDisplay(ScreenManager.java:192)
at Gems.Gems.actionPerformed(Gems.java:134)

/M - Official Gems/LGWL bug reporter

I bet that you’ve somehow got a mode that your graphics card doesn’t support in hardware, been punted back to Microsoft’s software renderer, and Orangy hasn’t checked to see if he’s got the WGL_swap_interval extension before he goes calling it. My guess, anyway :slight_smile:

Cas :slight_smile:

I get the same error no matter what mode I try… (with or without fullscreen - I even tried no fullscreen, the exact same mode that I currently have) - no disco…

Just a note, though: I’m not whining and complaining in earnest here, I just figure you actually like to know that it isn’t working :wink:

/M

Oops, Cas’ has hit the nail right on the head there, I hadn’t realised i’d need to check that was present before calling it :-[ I’ll see if i can figure out how to fix that tonight (and the weekend competition looms ever closer - time to stock up on the Red Bull…)