Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  jPCT and Webstart  (Read 2001 times)
0 Members and 1 Guest are viewing this topic.
Offline EgonOlsen

JGO Strike Force
***

Posts: 821
Medals: 6



« on: 2004-03-02 13:27:02 »

Hi,

i'm just fiddling around with Webstart and i tried to make a little jPCT demo "webstartable". It should start in a 640*480 window using the software renderer and it should be possible to switch to OpenGL by pressing "x". OpenGL (via LWJGL) should work on Windows and Linux (no Mac yet, i'm sorry), Software should work everywhere.
ESC exits the demo. Move with the cursor-keys and look up/down with page-up/down. Please let me know if it works (especially in LWJGL-mode).
Here's the link: http://www.jpct.net/webstart/demo.php

BTW: The window of the software renderer can be resized, but the LWJGL-mode is fixed at 640*480 for now.

Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #1 on: 2004-03-02 13:44:10 »

Quote
Hi,

i'm just fiddling around with Webstart and i tried to make a little jPCT demo "webstartable". It should start in a 640*480 window using the software renderer


Works great so far (linux 1.4.2), and the software renderer looks great too (about 6-12fps judging by eye @ 1ghz).

Quote

and it should be possible to switch to OpenGL by pressing "x". OpenGL (via LWJGL) should work on Windows and Linux (no Mac yet, i'm sorry), Software should work everywhere.


I see the message about "disposing software renderer" appear in the jws console, then it crashes. The crash is clean (the console vanishes, java unloads - rest of X-Windows is fine) but the app has definitely gone bye-bye Sad ). A quick check with PS reveals it's not in memory any more.

malloc will be first against the wall when the revolution comes...
Offline swpalmer

JGO Kernel
*****

Posts: 3438
Medals: 4


Where's the Kaboom?


« Reply #2 on: 2004-03-02 13:47:04 »

Software renderer does not work on Mac (10.3.2  JRE 1.4.2_03)

...
Building octree for object229
Octree for object229 constructed with 989 nodes / 795 leafs.
Java version is: 1.4.2_03
-> support for BufferedImage
-> using BufferedImage
Software renderer (legacy mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
51-113 -> using splitted buffer access!

then I get the 640x480 window, but it's empty (aqua L&F striped background).  I waited several minutes.

Games published by our own members! Go get 'em!
Offline EgonOlsen

JGO Strike Force
***

Posts: 821
Medals: 6



« Reply #3 on: 2004-03-02 14:07:14 »

Quote
then I get the 640x480 window, but it's empty (aqua L&F striped background).  I waited several minutes.
That's strange... Huh ..it's just simple AWT stuff going on there. I updated the demo. Please try again and press '2' after the window appears. The console should now tell you if the app is waiting for a resize or not. That's the only thing i can think of at the moment that may cause this.

Quote
I see the message about "disposing software renderer" appear in the jws console, then it crashes.
Maybe you can redirect the output of the webstart console to a file and tell me if "disposing software renderer" is really the last entry there is before exiting. In addition i made two more webstarts at http://www.jpct.net/webstart/demo2.php (no trilinear, 16bit zbuffer only) and http://www.jpct.net/webstart/demo3.php (the same as 2 but in 1024*768 ). Maybe you can give them a try!?

Offline DrBizzar0

Full Member
**

Posts: 175


Raj raj!


« Reply #4 on: 2004-03-02 14:29:10 »

Runs perfect, both in software and LWJGL, on winXP with jre1.4.2_03.
Offline swpalmer

JGO Kernel
*****

Posts: 3438
Medals: 4


Where's the Kaboom?


« Reply #5 on: 2004-03-02 14:30:55 »

New version works now (didn't need to do anything different - e.g. no pressing '2' or anything).

5-8 fps.. (1GHz PPC G4).. not too bad, considering it's all java.

Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #6 on: 2004-03-02 14:33:53 »

I tried the second demo and had exactly the same results.

I eventually found the log-to-file Smiley in javaws, and got:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
Software renderer disposed
Software renderer (OpenGL mode) initialized
43-49 -> using splitted buffer access!
Java version is: 1.4.2
-> support for BufferedImage
-> using BufferedImage
Software renderer (legacy mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
Software renderer disposed
Java version is: 1.4.2
-> support for BufferedImage
-> using BufferedImage
Software renderer (legacy mode) initialized
Software renderer disposed
Can't find desired videomode (640 x 480 x 16) - searching for alternatives
[ Tue Mar 02 22:13:33 GMT 2004 ] - ERROR: Can'
t find any suitable videomode!
[ Tue Mar 02 22:13:33 GMT 2004 ] - ERROR: Can't set videomode - try different settings!


The preferred mode for this laptop is 1400x1050 (lcd resolution) but it's usually happy to change to other modes. For instance, IIRC I had late versions of AF running absolutely fine on it without any tweaking (and I don't think they use 1400x !??..nb: hard to tell, because the geforce does auto-scaling to LCD resolution with bilinear (or better?) filtering, so sometimes you can detect a slight blur, but that's the only way of knowing...)

PS: Suggest you change the JNLP file for demos 2 and 3...at the moment they all have the same title, which makes launching from within javaws very confusing! Smiley

malloc will be first against the wall when the revolution comes...
Offline EgonOlsen

JGO Strike Force
***

Posts: 821
Medals: 6



« Reply #7 on: 2004-03-02 14:34:07 »

Quote
New version works now (didn't need to do anything different - e.g. no pressing '2' or anything).
5-8 fps.. (1GHz PPC G4).. not too bad, considering it's all java.
Great...but i haven't changed anything except adding a System.out.println(); when pressing '2'  Huh
Anyway...does resizing the window works too?

Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #8 on: 2004-03-02 14:36:54 »

PS I was running AF without JWS, by dropping the lwjgl .so file in appropriate location.

PPS I finally noticed the small FPS counter in top left Smiley my guess was pretty much spot-on (you can tell an old quake-deathmatcher...Wink), varies from low of 5 up to 8+ fps if you look at a blank wall.

malloc will be first against the wall when the revolution comes...
Offline EgonOlsen

JGO Strike Force
***

Posts: 821
Medals: 6



« Reply #9 on: 2004-03-02 14:43:06 »

Quote

PS: Suggest you change the JNLP file for demos 2 and 3...at the moment they all have the same title, which makes launching from within javaws very confusing! Smiley
I changed them to demo2 and -3...thanx for the hint. About the video-mode...AF is putting a lot more work into finding a correct mode than i do ATM. I'm just trying to find a 640*480/16bpp mode (windowed, not fullscreen) and i'll take everything with a higher colordepth too. Requesting 1024*768 (via the third link) doesn't work either?

Games published by our own members! Go get 'em!
Offline Java Cool Dude

JGO Ninja
***

Posts: 680


Java forever


« Reply #10 on: 2004-03-02 15:03:40 »

Runs @ ~24 fps software
300 fps LWJGL
Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #11 on: 2004-03-02 15:49:43 »

Quote

I'm just trying to find a 640*480/16bpp mode (windowed, not fullscreen) and i'll take everything with a higher colordepth too. Requesting 1024*768 (via the third link) doesn't work either?


Exactly the same behaviour; only difference is that hte software renderer drops to 3-4 FPS Smiley.

I *know* I'm using >> 16bpp, but I'm taking a guess you don't agree with the theory that "24 > 16" Grin. So...

Scanning through the X-windows log, I found:

1  
2  
3  
4  
5  
6  
Markers: (--) probed, (**) from config file, (==) default setting,
...
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
...
(--) Depth 24 pixmap format is 32 bpp


Which is interesting, because it suggests (but it's hard to be sure without searching for random linux docs that could be anywhere, really) that the driver would like to run at 32 but I've managed to force it to 24. The last message there is particularly linux-ish (def: cryptic, confusing, totally unhelpful Wink ) <ducks and runs for cover>.

Anyway, further investigation of X settings turned up one config file (yeah, linux has "chains" of config files overriding each other, all with similar names and no obvious piority Sad) requesting a default 24 for all screen modes. The only reason I can think of for this is that there's some reason why 32 doesn't work with the nVidia drivers. I shall restart and see if I changing that line to 32 makes a difference (or even if I can still run X!).

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #12 on: 2004-03-02 15:56:16 »

Repeat after me: "nVidia write **** drivers...".

Fatal error: NVIDIA: 32bpp not supported

So, there you go Sad.

I'll have a look and see if they have an update, but it looks like 32 bpp just ain't available in linux on a GF2 on a laptop Sad

EDIT: X-Windows "depth 32" does NOT mean that the desktop is running in 32bpp, and in fact is an illegal value for all drivers. Well, that's obvious, isn't it? Who would want a 32 bpp desktop...

So, it's not nVidia's fault Smiley. For the record, they also have finally improved their linux drivers, and have added a very nifty interactive install (using ANSI menus and everything!) which is much much better than before. Big thumbs up to whoever @ nV has made this change Smiley.

Although smething went slightly wrong and I'm now running at 1280x1024, which means my desktop is kindly being bilinearly filtered for me. It looks rather nice, in a way, easy on the eyes...but I think I prefer the razor-sharpness I'm accustomed to Sad.

malloc will be first against the wall when the revolution comes...
Offline Orangy Tang

JGO Kernel
*****

Posts: 2960
Medals: 37


Monkey for a head


« Reply #13 on: 2004-03-02 16:05:17 »

Odd, Opera doesn't want to start webstart if I just open the file direct, yet does clearly show the type as being the correct x-java-whatever. Saving and renaming to .jnlp works great. I wonder if the extension is confusing Opera (or I have it set up wrong).

I get ~18fps software and 76 with OpenGL (must be v-synced). Funny I seem to remember the software one running faster when I tried it a while ago.

As an aside, the software rendering is pretty damned fast, has anyone thought about using it in Xith for occulsion queries?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline EgonOlsen

JGO Strike Force
***

Posts: 821
Medals: 6



« Reply #14 on: 2004-03-02 16:12:47 »

Quote

I'll have a look and see if they have an update, but it looks like 32 bpp just ain't available in linux on a GF2 on a laptop Sad
It works for me on a GeForce3 using the latest drivers on a kind of Debian. Anyway, i've uploaded another version that can be started here: http://www.jpct.net/webstart/demo4.php. This one won't work too, but it should at least print out the available videomodes before exiting. Would be interesting to know what your setup actually supports.

Offline EgonOlsen

JGO Strike Force
***

Posts: 821
Medals: 6



« Reply #15 on: 2004-03-02 16:15:21 »

Quote

I get ~18fps software and 76 with OpenGL (must be v-synced). Funny I seem to remember the software one running faster when I tried it a while ago.
Can't be...it's even slightly faster in the new version. But my previous demos where 512*384, this one is 640*480 and maybe you are refering to level with less polygons.


Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #16 on: 2004-03-02 16:21:31 »

Quote

It works for me on a GeForce3 using the latest drivers on a kind of Debian. Anyway, i've uploaded another version that can be started here: http://www.jpct.net/webstart/demo4.php. This one won't work too, but it should at least print out the available videomodes before exiting. Would be interesting to know what your setup actually supports.


With the latest drivers...(but note: they screwed up the config files, and I haven't yet found which one(s) they changed so I can fix them, and I'm now running in an unusual screen mode (see previous post))...

It works perfectly Smiley. FPS averages at 66ish with LWJGL, peaks at 112, and a low of about 48.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
Software renderer disposed
mode: 640/480/24/0
mode: 1024/768/24/0
mode: 700/525/24/0
mode: 320/240/24/0
mode: 512/384/24/0
mode: 1280/1024/24/0
mode: 400/300/24/0
mode: 640/512/24/0
mode: 800/600/24/0
mode: 1280/960/24/0
Can't find desired videomode (640 x 480 x 16) - searching for alternatives
Current mode:640 x 480 x 24 @0Hz
OpenGL renderer initialized


I'll try and fix my desktop, and report back once I get into 1400 again. Maybe this is a fixed driver bug...

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #17 on: 2004-03-02 16:25:28 »

PS I guess these are LWJGL bugs, but...LWJGL version only:


  • Window cannot be resized
  • Window cannot be moved (!)
  • Window cannot be closed (! - has a close button, nothing happens when you click it)
  • When the window has focus, the window manager stops responding (e.g. you can't click on the "Start" button on taskbar any more)

malloc will be first against the wall when the revolution comes...
Offline Orangy Tang

JGO Kernel
*****

Posts: 2960
Medals: 37


Monkey for a head


« Reply #18 on: 2004-03-02 16:34:22 »

Quote
and maybe you are refering to level with less polygons.

Thats probably it, last time I tried it it was a different level.

I notice its not open source as such. Is there possibly a simple (flat shaded, no textures etc.) mode that can be used for depth testing?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #19 on: 2004-03-02 16:44:20 »

(back at 1400x1050, and it doesn't work again). I get this output:
1  
2  
3  
4  
5  
Software renderer disposed
mode: 1400/1050/24/0
Can't find desired videomode (640 x 480 x 16) - searching for alternatives
[ Wed Mar 03 00:20:29 GMT 2004 ] - ERROR: Can'
t find any suitable videomode!
[ Wed Mar 03 00:20:29 GMT 2004 ] - ERROR: Can't set videomode - try different settings!


Here is what I believe is happening:

  • There is a bug in the EDID communication between NV drivers and the custom Dell LCD's in the mainstream Inspiron series, whereby the NV card comes to believe that the LCD cannot support the actual resolution it was manufactured for (!)
  • To get around this, you have to disable all the auto-detect settings in NV's driver, so that it will let you tell it "yes, actually my monitor *does* support the one resolution it was built for"
  • The latest drivers have a regression where this disabling doesn't work (an old driver had the same bug, then they fixed it, now it's broken again). But...there's another way of doing it (and because I've been trhough this pain before I recall the workaround).
  • Net result: 1400x1050 is the only availalble mode at the moment, unless I can find a custom mode spec for the LCD for each other mode (don't you just love linux?). If I allow the NV driver to auto-detect, I can't use my desktop, but it automatically creates all appropriate modes.


Hence...only 1400x1050 appears in the list reported by LWJGL. But...for windowed mode, you should just accept that anyway! (shouldn't your code pick: "the smallest resolution that is equal to or greater than the desired window size and bpp" Huh)

malloc will be first against the wall when the revolution comes...
Offline swpalmer

JGO Kernel
*****

Posts: 3438
Medals: 4


Where's the Kaboom?


« Reply #20 on: 2004-03-02 18:49:51 »

Quote

Great...but i haven't changed anything except adding a System.out.println(); when pressing '2'  Huh
Anyway...does resizing the window works too?

Weird, but I think it is related to a problem with window sizing.

Making the window smaller appears to always work.  Making a window bigger sometimes leaves the GL canvas a bit smaller than the window... though it appears that you are rendering your scene as if it is the same size of the window (e.g. the gun is mostly missing because the lower right corner is empty)

Offline EgonOlsen

JGO Strike Force
***

Posts: 821
Medals: 6



« Reply #21 on: 2004-03-02 23:23:10 »

Quote

I notice its not open source as such. Is there possibly a simple (flat shaded, no textures etc.) mode that can be used for depth testing?
No, there isn't. My rasterizer does gouraud-shaded, zbuffered and perpective corrected, filtered texture-mapping all the time. There's no way to disable it (except for the filtering). If you want to (ab)use a software rasterizer for occlusion culling, you have to write your own, because (as you mentioned) all you need is Z (or better 1/Z to get the perspective correction of Z for free)...you don't even have to have a color buffer, don't you?

Offline Abuse

JGO Kernel
*****

Posts: 1866
Medals: 5


falling into the abyss of reality


« Reply #22 on: 2004-03-03 04:03:12 »

Software I get 10-12fps on my Athlon 1.33 GF2gts 32mb.
(not the latest drivers, as they don't work with C&C Generals :/)

when switching to LWJGL, i get :-

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
Software renderer disposed
Current mode:640 x 480 x 16 @75Hz
[ Wed Mar 03 12:00:33 GMT 2004 ] - ERROR: Can't set videomode - try different settings!
java.lang.Exception: No window.
      at org.lwjgl.input.Keyboard.nCreate(Native Method)
      at org.lwjgl.input.Keyboard.create(Unknown Source)
      at JPCTDemoWS.switchOptions(Unknown Source)
      at JPCTDemoWS.gameLoop(Unknown Source)
      at JPCTDemoWS.<init>(Unknown Source)
      at JPCTDemoWS.main(Unknown Source)
      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)


Oh, and it also leaves a rogue process going, which eats all my CPU time. I have to kill that manually.
Pages: [1]
  Print  
 
 
Jump to:  


Add your game by posting it in the showcase section.

The first screenshot will be displayed as a thumbnail.

obsidian_golem 2012-05-23 10:14:50

Danny02 2012-05-21 17:10:34

Danny02 2012-05-21 17:07:10

Danny02 2012-05-21 16:56:12

davedes 2012-05-21 13:59:23

obsidian_golem 2012-05-20 20:28:41

darkjava55 2012-05-12 16:14:40

Ultroman 2012-05-12 09:36:05

Ultroman 2012-05-11 22:49:53

Ultroman 2012-05-11 22:20:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.173 seconds with 20 queries.