At the usual place:
http://www.mycgiserver.com/~movegaga/cosmictrip.html (click web start link there to play)
http://www.mycgiserver.com/~movegaga/ct_src.zip (sources)
Some compatibility issues should be resolved.
Erik
At the usual place:
http://www.mycgiserver.com/~movegaga/cosmictrip.html (click web start link there to play)
http://www.mycgiserver.com/~movegaga/ct_src.zip (sources)
Some compatibility issues should be resolved.
Erik
Works as advertised!
Could we get an FPS counter? - bit slowish on this crap tnt2 card
By your command
It’s there.
~ 50 FPS @ logo
~ 30 FPS @ highscore
~ 10 FPS @ ingame
using an Athlon 1 GHz, TNT2 m64
Is there something wrong with collision detection? - I almost can’t get any stars, even though I am literally flying through them…
Ya, he said it’s based on framerate somewhat in the other post. So 10 fps would be bad.
Exactly. You need a decent framerate to play it.
Hmmm… I wonder if I’m doing something wrong too, cos I suppose 10fps on a TNT2 is bad, or is a TNT2 really that slow in general? :-/
Well… Considering it crammed up a decent FPS on Halflife, it should be able to push this a bit better I guess…
/M
[quote]Considering it crammed up a decent FPS on Halflife, it should be able to push this a bit better I guess…
[/quote]
I guess so too…
But does HL also get decent framerates in 32bit? Cos CT selects 16bit or 32bit when available. Also there’s a lot of blending going on in CT which taxes your card too.
A TNT2 has tons of fillrate so it should be running pretty fast.
Time to run the profiler on it methinks.
Cas
~ 140 FPS @ logo
~ 100 FPS @ highscore
~ 80 FPS @ ingame
8)8)8)8)
using an Athlon XP 1.8 GHz, NVIDIA GeForce Ti4400 128mb, 512mb ddr
8)8)8)8)
Could you please add a linux native extension too - I would like to test it ;D
That last time I profiled it was on my P2/450/128Mb with 32Mb S3 Savage 4. I got ~60fps in-game and most of the time was spent in GL.swapBuffers (which I believe is waiting for the video card to complete rendering), IIRC >75% of the time.
I’ll profile again when I get home since neutronix’ results seem not particulary good too, considering his monsta-supa-dupa-speedy rig.
BTW, a friend had a TNT2 m64 which I think is a low budget version of a TNT2. It always struck me as quite a bit slower than the Savage 4 card I had at the time (which I think was quite a good and compatible card IMHO once the driver problems were solved).
[quote]Could you please add a linux native extension too - I would like to test it
[/quote]
Yes I will
Just tried my computer at home:
@ logo = 2200 FPS :o
@ highscore = 1100 FPS
@ game = 90 FPS :-/
This is on a p4 @ 2.7 + Radeon 9700 non pro
Makes BOOM on my system (P4@3.2Ghz, Win XP, Radeon 9700pro, Catalyst 3.4 drivers):
Edit: Reminds me of a problem i had before: http://www.java-gaming.org/cgi-bin/JGOForums/YaBB.cgi?board=LWJGL;action=display;num=1052085026, bút that was somehow related to the creation of a SWING-component and with an older set of drivers.
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x691455DF
Function=[Unknown.]
Library=F:\WINDOWS\System32\atioglxx.dll
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.BaseGL.nCreate(Native Method)
at org.lwjgl.opengl.BaseGL.doCreate(Unknown Source)
at org.lwjgl.opengl.GL.doCreate(Unknown Source)
at org.lwjgl.Window.create(Unknown Source)
at net.movegaga.BaseWindow.createGLWindow(BaseWindow.java:148)
at net.movegaga.BaseWindow.start(BaseWindow.java:173)
at net.movegaga.GameWindow.main(GameWindow.java:268)
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.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Dynamic libraries:
0x00400000 - 0x00406000 F:\Programme\Java\j2re1.4.1\bin\javaw.exe
0x77F40000 - 0x77FEE000 F:\WINDOWS\System32\ntdll.dll
0x77E40000 - 0x77F38000 F:\WINDOWS\system32\kernel32.dll
0x77DA0000 - 0x77E3C000 F:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x7807F000 F:\WINDOWS\system32\RPCRT4.dll
0x77D10000 - 0x77D96000 F:\WINDOWS\system32\USER32.dll
0x77C40000 - 0x77C80000 F:\WINDOWS\system32\GDI32.dll
0x77BE0000 - 0x77C33000 F:\WINDOWS\system32\MSVCRT.dll
0x6D330000 - 0x6D45C000 F:\Programme\Java\j2re1.4.1\bin\client\jvm.dll
0x76AF0000 - 0x76B1D000 F:\WINDOWS\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000 F:\Programme\Java\j2re1.4.1\bin\hpi.dll
0x6D300000 - 0x6D30D000 F:\Programme\Java\j2re1.4.1\bin\verify.dll
0x6D210000 - 0x6D229000 F:\Programme\Java\j2re1.4.1\bin\java.dll
0x6D320000 - 0x6D32D000 F:\Programme\Java\j2re1.4.1\bin\zip.dll
0x10000000 - 0x1000A000 F:\Programme\Java Web Start\javawspl.dll
0x77180000 - 0x772A1000 F:\WINDOWS\system32\ole32.dll
0x773A0000 - 0x77B9C000 F:\WINDOWS\system32\SHELL32.dll
0x0AC20000 - 0x0AC84000 F:\WINDOWS\system32\SHLWAPI.dll
0x78090000 - 0x78174000 F:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
0x77310000 - 0x7739B000 F:\WINDOWS\system32\comctl32.dll
0x6D000000 - 0x6D0FA000 F:\Programme\Java\j2re1.4.1\bin\awt.dll
0x72F70000 - 0x72F93000 F:\WINDOWS\System32\WINSPOOL.DRV
0x76330000 - 0x7634C000 F:\WINDOWS\System32\IMM32.dll
0x746A0000 - 0x746E4000 F:\WINDOWS\System32\MSCTF.dll
0x0B070000 - 0x0B07D000 F:\Programme\rage3dtweak\GameUtil.dll
0x6D180000 - 0x6D1D0000 F:\Programme\Java\j2re1.4.1\bin\fontmanager.dll
0x51000000 - 0x51047000 F:\WINDOWS\System32\ddraw.dll
0x73B30000 - 0x73B36000 F:\WINDOWS\System32\DCIMAN32.dll
0x6DE00000 - 0x6DE71000 F:\WINDOWS\System32\D3DIM.DLL
0x6D2D0000 - 0x6D2DE000 F:\Programme\Java\j2re1.4.1\bin\net.dll
0x71A30000 - 0x71A39000 F:\WINDOWS\System32\WSOCK32.dll
0x71A10000 - 0x71A25000 F:\WINDOWS\System32\WS2_32.dll
0x71A00000 - 0x71A08000 F:\WINDOWS\System32\WS2HELP.dll
0x719B0000 - 0x719EC000 F:\WINDOWS\System32\mswsock.dll
0x76EE0000 - 0x76F05000 F:\WINDOWS\System32\DNSAPI.dll
0x76F70000 - 0x76F77000 F:\WINDOWS\System32\winrnr.dll
0x76F20000 - 0x76F4D000 F:\WINDOWS\system32\WLDAP32.dll
0x76F80000 - 0x76F85000 F:\WINDOWS\System32\rasadhlp.dll
0x719F0000 - 0x719F8000 F:\WINDOWS\System32\wshtcpip.dll
0x0B140000 - 0x0B17B000 F:\Programme\Java\j2re1.4.1\lib\ext\lwjgl.dll
0x72210000 - 0x72239000 F:\WINDOWS\System32\DINPUT.dll
0x5F0D0000 - 0x5F196000 F:\WINDOWS\System32\OPENGL32.dll
0x68FC0000 - 0x68FDE000 F:\WINDOWS\System32\GLU32.dll
0x69000000 - 0x6950B000 F:\WINDOWS\System32\atioglxx.dll
0x0B780000 - 0x0B791000 F:\WINDOWS\System32\ctagent.dll
0x51080000 - 0x510D6000 F:\WINDOWS\System32\DSOUND.dll
0x77BD0000 - 0x77BD7000 F:\WINDOWS\system32\VERSION.dll
0x68D90000 - 0x68D99000 F:\WINDOWS\System32\HID.DLL
0x76620000 - 0x76708000 F:\WINDOWS\System32\SETUPAPI.DLL
0x76C50000 - 0x76C72000 F:\WINDOWS\system32\imagehlp.dll
0x6DA00000 - 0x6DA7D000 F:\WINDOWS\system32\DBGHELP.dll
0x76BB0000 - 0x76BBB000 F:\WINDOWS\System32\PSAPI.DLL
Local Time = Tue Jun 03 17:51:15 2003
Elapsed Time = 3
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode)
#
i get this error:
Java Web Start 1.4.2-beta Konsole, gestartet Tue Jun 03 18:59:36 CEST 2003
Java 2 Runtime Environment: Version 1.4.2-beta von Sun Microsystems Inc.
Protokolldatei: C:\java.log
Game starting.
Maybe selecting mode 800x600x32 @70
Maybe selecting mode 800x600x16 @60
Maybe selecting mode 800x600x32 @85
Maybe selecting mode 800x600x32 @60
java.lang.Exception: Problem starting loop
at net.movegaga.BaseWindow.start(BaseWindow.java:210)
at net.movegaga.GameWindow.main(GameWindow.java:268)
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.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Exception: Problem initialising GL
at net.movegaga.BaseWindow.createGLWindow(BaseWindow.java:160)
at net.movegaga.BaseWindow.start(BaseWindow.java:173)
... 12 more
Caused by: java.lang.Exception: Failed to set display mode.
at org.lwjgl.Display.setDisplayMode(Native Method)
at net.movegaga.BaseWindow.createGLWindow(BaseWindow.java:145)
... 13 more
Game Ended.
WinXP Athlon2.2 1.5G ddr Radeon 9700pro
EgonOlsen - Try running it from the cmdline. Thats how I do it, since I get the same error as you (afaik). Parse the jnlp file, get the jar files, extract lwjgl_win.jar.
[quote]EgonOlsen - Try running it from the cmdline. Thats how I do it, since I get the same error as you (afaik). Parse the jnlp file, get the jar files, extract lwjgl_win.jar.
[/quote]
Ah, that worked…got around 150 fps in game (using 2xAA and 4xAnisotropic filtering). Looks nice, but i totally suck in this game…i never collect anything. Back to GTA Vice City for now… ;D
I have no idea why it works from the commandline but not from web start. It works for me at home and at work… ???
Hmmm… :-/
Anyway, here’s some profiler output from my PC at home:
Flat profile of 141.49 secs (13102 total ticks): main
Interpreted + native Method
15.6% 0 + 2037 org.lwjgl.opengl.BaseGL.swapBuffers
0.3% 0 + 33 org.lwjgl.Display.resetDisplayMode
0.2% 0 + 26 org.lwjgl.opengl.BaseGL.nDestroyGL
0.2% 0 + 26 org.lwjgl.opengl.BaseGL.nCreate
0.1% 0 + 16 org.lwjgl.Display.setDisplayMode
0.1% 0 + 14 com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage
0.1% 8 + 0 net.movegaga.BaseWindow.start
0.1% 0 + 8 org.lwjgl.opengl.CoreGL.clear
0.1% 0 + 7 org.lwjgl.opengl.CoreGL.begin
0.0% 0 + 5 com.sun.media.sound.SimpleInputDeviceProvider.nGetNumDevices
0.0% 1 + 3 org.lwjgl.Sys.getTime
0.0% 0 + 4 java.io.WinNTFileSystem.canonicalize
0.0% 4 + 0 net.movegaga.actor.Player.behave
0.0% 2 + 2 org.lwjgl.input.Keyboard.nPoll
0.0% 0 + 3 sun.misc.Unsafe.setMemory
0.0% 3 + 0 net.movegaga.scene.levels.Level.update
0.0% 0 + 3 java.io.RandomAccessFile.setLength
0.0% 0 + 3 java.lang.ClassLoader$NativeLibrary.load
0.0% 0 + 3 org.lwjgl.opengl.GLU.sphere
0.0% 3 + 0 net.movegaga.scene.levels.Level1234.update
0.0% 0 + 3 java.io.WinNTFileSystem.getBooleanAttributes
0.0% 1 + 1 net.movegaga.actor.Actor.behave
0.0% 0 + 2 java.util.zip.Inflater.inflateBytes
0.0% 0 + 2 org.lwjgl.Window.tick
0.0% 1 + 1 net.movegaga.actor.GaGaStar.drawMesh
17.6% 59 + 2238 Total interpreted (including elided)
Compiled + native Method
1.2% 151 + 0 net.movegaga.util.Universe.sort
0.4% 46 + 0 net.movegaga.actor.Actor.draw
0.3% 36 + 0 net.movegaga.util.Universe.draw
0.3% 33 + 0 net.movegaga.util.Universe.update
0.2% 27 + 0 net.movegaga.actor.Building.drawMesh
0.2% 24 + 0 net.movegaga.actor.Actor.behave
0.1% 17 + 0 net.movegaga.util.Universe.checkCollision
0.1% 12 + 0 net.movegaga.actor.GLString.drawMesh
0.0% 6 + 0 vtable chunks
0.0% 6 + 0 net.movegaga.actor.Actor.drawMesh
0.0% 3 + 2 sun.awt.image.ByteInterleavedRaster.getByteData
0.0% 4 + 0 net.movegaga.actor.Actor.checkCollision
0.0% 3 + 0 java.lang.Math.abs
0.0% 3 + 0 java.lang.Object.equals
0.0% 2 + 0 net.movegaga.actor.Player.puff
0.0% 2 + 0 net.movegaga.actor.Floor.drawMesh
0.0% 2 + 0 net.movegaga.GameWindow.drawGLScene
0.0% 2 + 0 net.movegaga.util.Universe.addActor
0.0% 2 + 0 com.sun.imageio.plugins.png.PNGImageReader.paethPredictor
0.0% 2 + 0 net.movegaga.GameWindow.input
0.0% 2 + 0 java.net.URL.<init>
0.0% 2 + 0 net.movegaga.actor.Smoke.behave
0.0% 2 + 0 sun.awt.image.ByteInterleavedRaster.putByteData
0.0% 2 + 0 net.movegaga.actor.Player.drawMesh
0.0% 2 + 0 java.lang.Math.random
3.2% 410 + 2 Total compiled (including elided)
Stub + native Method
71.8% 0 + 9370 org.lwjgl.opengl.BaseGL.swapBuffers
1.9% 1 + 243 org.lwjgl.opengl.GLU.cylinder
1.8% 2 + 233 org.lwjgl.opengl.CoreGL.begin
0.7% 7 + 78 org.lwjgl.opengl.CoreGL.rotatef
0.4% 3 + 46 org.lwjgl.opengl.CoreGL.enable
0.4% 18 + 28 org.lwjgl.opengl.CoreGL.vertex3f
0.3% 5 + 35 org.lwjgl.opengl.CoreGL.bindTexture
0.3% 0 + 36 org.lwjgl.opengl.CoreGL.clear
0.3% 1 + 33 org.lwjgl.opengl.GLU.sphere
0.2% 11 + 21 org.lwjgl.opengl.CoreGL.texCoord2f
0.2% 3 + 20 org.lwjgl.opengl.CoreGL.translatef
0.2% 3 + 19 org.lwjgl.opengl.CoreGL.disable
0.1% 6 + 8 org.lwjgl.opengl.CoreGL.normal3f
0.1% 4 + 9 org.lwjgl.opengl.CoreGL.color4ub
0.1% 4 + 8 org.lwjgl.opengl.CoreGL.end
0.1% 0 + 8 org.lwjgl.Window.tick
0.0% 0 + 5 org.lwjgl.opengl.CoreGL.loadIdentity
0.0% 1 + 4 org.lwjgl.opengl.CoreGL.texGeni
0.0% 1 + 4 org.lwjgl.opengl.CoreGL.blendFunc
0.0% 1 + 3 org.lwjgl.opengl.CoreGL.texEnvf
0.0% 0 + 4 java.io.RandomAccessFile.setLength
0.0% 0 + 3 java.lang.StrictMath.pow
0.0% 1 + 2 java.lang.System.currentTimeMillis
0.0% 0 + 3 org.lwjgl.input.Keyboard.nPoll
0.0% 0 + 3 org.lwjgl.Sys.getDirectBufferAddress
78.9% 72 + 10228 Total stub (including elided)
Thread-local ticks:
0.4% 53 Blocked (of total)
0.0% 6 Class loader
0.0% 3 Interpreter
0.1% 10 Compilation
0.1% 8 Unknown: running frame
0.1% 13 Unknown: thread_state
Global summary of 141.49 seconds:
100.0% 13129 Received ticks
0.2% 26 Received GC ticks
0.1% 16 Compilation
0.0% 1 Other VM operations
0.0% 6 Class loader
0.0% 3 Interpreter
0.2% 27 Unknown code
As you can see, >85% in swapBuffers(), which I think is the time spent rendering in the video card/ openGL.
So I must be doing something not very efficient in the openGL code.
BTW, anybody knows what ‘Stub’ is?
[quote]Reminds me of a problem i had before: http://www.java-gaming.org/cgi-bin/JGOForums/YaBB.cgi?board=LWJGL;action= display;num=1052085026, bút that was somehow related to the creation of a SWING-component and with an older set of drivers
[/quote]
Dunno how Swing can have anything to do with it, but JWS does create a swing frame before starting the game: The JWS application manager.