Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (512)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 3 [4] 5 6
  ignore  |  Print  
  The JWS thread *Xith3D demos only*  (Read 30923 times)
0 Members and 1 Guest are viewing this topic.
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #90 - Posted 2004-02-18 14:10:08 »

I submitted a better version to Yuri, we'll see what he can do about it Smiley
Offline Yuri Vl. Gushchin

Senior Duke




Speak Java!


« Reply #91 - Posted 2004-02-18 16:24:59 »

I confirm I got the Programmable Shaders code from JCD, and will try to integrate it nearest days.

Yuri

Yuri Vl. Gushchin
JProof Group
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #92 - Posted 2004-02-18 21:29:47 »

Phong lighting uploaded again.
I guess a lot of you will like my DemoStatus class that displays messages about events accuring before the demo starts:)

PS: Can anyone with a PS & VS capable graphic card confirm this demo is working?

PS2: w00t over 3000 views Tongue
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ramses

Senior Newbie




Java games rock!


« Reply #93 - Posted 2004-02-19 01:46:48 »

JCD, for the phong demo I get an error after picking the display resolution:

Quote
Math/FastTrig (Unsupported major.minor version 49.0)


The stack trace:
Quote
java.lang.UnsupportedClassVersionError: Math/FastTrig (Unsupported major.minor version 49.0)

     at java.lang.ClassLoader.defineClass0(Native Method)

     at java.lang.ClassLoader.defineClass(Unknown Source)

     at java.security.SecureClassLoader.defineClass(Unknown Source)

     at com.sun.jnlp.JNLPClassLoader.defineClass(Unknown Source)

     at com.sun.jnlp.JNLPClassLoader.access$100(Unknown Source)

     at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)

     at java.security.AccessController.doPrivileged(Native Method)

     at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)

     at java.lang.ClassLoader.loadClass(Unknown Source)

     at java.lang.ClassLoader.loadClass(Unknown Source)

     at java.lang.ClassLoader.loadClassInternal(Unknown Source)

     at GeoUtils.ParticlesManager.modifyVectorSpeed(ParticlesManager.java:174)

     at GeoUtils.ParticlesManager.<init>(ParticlesManager.java:88)

     at SceneCreator.loadParticleSystem(SceneCreator.java:36)

     at PhongLighting.scene(PhongLighting.java:139)

     at PhongLighting.<init>(PhongLighting.java:95)

     at PhongLighting.main(PhongLighting.java:53)

     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)

Offline Java Cool Dude

Senior Duke




Java forever


« Reply #94 - Posted 2004-02-19 01:53:58 »

Oh f that s man I forgot to recompile the math class using the 1.4 JDK
Fixed Smiley
Offline Ramses

Senior Newbie




Java games rock!


« Reply #95 - Posted 2004-02-19 01:59:46 »

Hmmm, ok, now it starts to load up displaying all the initial messages, the last one i see is "Starting ..." and then the screen turns into light grey and nothing happens.

I have a radeon 8500DV.
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #96 - Posted 2004-02-19 02:06:16 »

Greg confirmed the new upload works, try again please Smiley
Offline Ramses

Senior Newbie




Java games rock!


« Reply #97 - Posted 2004-02-19 02:22:38 »

Just tried again, and this is what i get:



How do i turn on the light?  Wink
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #98 - Posted 2004-02-19 02:30:36 »

Grin
That's exactly what I was getting when my demo failed to locate the media sometime ago.
It's bizarre how it is working on both my computer and Greg's and not yours...
I dunno man, just grab the code and files and try to run it locally...
PS: Don't forget to get my xith3d.jar from the libs directory, it has more stuff than the current official release, you won't regret the switch Smiley
Offline Ramses

Senior Newbie




Java games rock!


« Reply #99 - Posted 2004-02-19 02:37:34 »

Ok Smiley
I'll give your code a shot to see if I can track the problem.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #100 - Posted 2004-02-19 02:46:00 »

I get the same black window with particles thing when I webstart it.

Offline Java Cool Dude

Senior Duke




Java forever


« Reply #101 - Posted 2004-02-19 02:48:04 »

I uploaded a new jar that is almost half size of the previous one, and put the source in a nice package...
Still have no clue why it would work on some systems and not the others...
Offline Jani Laakso

Junior Duke




Do it with Java!


« Reply #102 - Posted 2004-02-19 06:02:20 »

Quote

Still have no clue why it would work on some systems and not the others...


I'm sure most of you know the problems relating to JWS cache, but here's my five cents..

Please try to delete your JWS cache completely, I mean on the filelevel, not through Java Plugin which can be accessed from the control panel, at least I had still problems with JWS even if I disabled caching completely, JWS was still using old jars for some reason.

In short, here's the directory that I clean up first if I have problems with JWS:
C:\Documents and Settings\Jani Laakso\.javaws\cache\*

This ensure me that I'm always using the latest versions.


Cheers, Jani!
Offline Ramses

Senior Newbie




Java games rock!


« Reply #103 - Posted 2004-02-19 11:21:00 »

I tried deleting the cache, but it's still the same problem.

I'm running it from source now and I'm still getting the black screen. I've double-checked that it's finding the data files (and it is finding them properly) so i'm still not sure what's causing the problem yet. I'll get back to it tonight when i get home (my work comp has an embedded intel gfx chip :-/ ).
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #104 - Posted 2004-02-19 15:29:41 »

Ummm I dunno exactly what's standing behind the bug you're pointing out, but I tried a new method in loading the meshes, give it a run now and tell me what comes.
I aslo introduced 50 % more performance by tweaking my loader.
Finally I cleaned up my main frame a bit, few should enjoy it more now Smiley
Get the source, it's worth the download
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #105 - Posted 2004-02-19 17:49:10 »

"New" demo up and running.
Now the application runs at ~ 1500 fps while the model in is MOTION....
It is still not fully optimized but I'm working on it Wink
Offline hawkwind

Junior Duke




Java games rock!


« Reply #106 - Posted 2004-02-19 20:06:58 »

blank gray screen, saw the various loading this and that red text on black screen then having selected a window size an empty grey screen is displayed

In you links to get source what else is needed...your implementation of the xith lib? any other mods?...for example some of the texture coordinate methods claimed not to be implemented when I tried your source yeseterday using a 64MB DDR NVidia GeForce4 MX 420
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #107 - Posted 2004-02-19 20:44:25 »

The phong, ppl vs and celshading vs won't work on your card since not only it supports two texture units whereas normally I need one more, but also it doesn't live up DX8.0 specifications meaning no support for either PS and VS...
Now the quake 3 demo should run smooth as baby's butt seing that a lot of people who tried it had it working flawlessly on their machines.
Other point is, my Xith3d.jar has been modified and imporved to support new features Smiley
Offline StefanD2

Senior Newbie




Java games rock!


« Reply #108 - Posted 2004-02-19 20:53:39 »

@JCD: At first: you are really doing a great job!
Nevertheless I do have a question regarding your minimum requirements for Phong Lighting. As far as I understand it it should require DirectX 8 features. Sadly though claiming to fullfill that my Gforce3 simply shows the same black background with only the red particles being visible - saying that something is not supported. Sad Any hints?

PS: Full error text:
Error String line 1, column 1:  error: program type not supported on this hardware

PS2: Had the chance to crosscheck it on a Radeon 9000 (ATI claims it would be DirectX 8.1 compatible).: This time it says:
Error String:line66: too many total instructions
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #109 - Posted 2004-02-19 21:16:12 »

Hmmm that's strange...
This is what graphic cards other people who's got it to work had:
Radeon 9600
Radeon 9700 Pro
GeForce FX Go5650
I have no clue on why your Geforce 3 doesn't load it up properly...
How about the Quake 3 demo? Any luck on that side?
PS: I do indeed run a little check to see if the current hardware supports the required extensions:
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  
    public static void setShaderProgramState(GL gl, ShaderProgram shaderProgram, CanvasPeer canvas){
      if(!checkedOnce){
        checkedOnce = true;
        String extensions = gl.glGetString(gl.GL_EXTENSIONS);
        if(extensions.indexOf("GL_ARB_vertex_program") !=-1)
          ARB_shader_programs_supported = true;

        if(!ARB_shader_programs_supported)
          javax.swing.JOptionPane.showMessageDialog(null,"No Vertex/Fragment shaders support, skipping",
                                                    "Error",
                                                    javax.swing.JOptionPane.ERROR_MESSAGE);

      }

      if(ARB_shader_programs_supported){
        SHADER_PROGRAM_TYPE         =  shaderProgram.getShaderProgramType();
        gl.glEnable(SHADER_PROGRAM_TYPE);
      }
      else
        return;

      if( shaderProgram == null ||
            !shaderProgram.isEnabled() ||
          shaderProgram.getShaderCode() == null){
        gl.glDisable(SHADER_PROGRAM_TYPE);
        return;
      }
      bindShaderProgram(gl, shaderProgram, canvas);
    }

/me feels miserable :-/
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #110 - Posted 2004-02-19 21:23:14 »

Ahhhhhhhhh damn now I get it:
The Radeon 8500 supports up to 22 shading instructions whereas the Geforce 3 can only get up to 12!!!!
On the other hand, Geforce Fx and Radeon 9x00 (where x > 2) do support over 65356 instructions at once.
A quick look at my phong shader
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  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
!!ARBfp1.0

#**********************************************************************#
#Authors:Matthew Williams "NitroGL"                                    #
#        Abdul Bezrati    "Java Cool Dude"                             #
# Phong lighting via I=Ka+Base*(Kd*Falloff*(N.L))+(Ks*Gloss*(R.L)^n)   #
#**********************************************************************#
 

# Light parameters
PARAM specularColor = state.light[0].specular;
PARAM ambientColor  = state.material.ambient;
PARAM diffuseColor  = state.material.diffuse;
PARAM shininess     = state.material.shininess;

TEMP textureBase, normalVector, lightVector;
TEMP reflectionVector, viewVector;
TEMP NdotL, RdotL, Falloff, temp, textureGloss;

TEX textureBase , fragment.texcoord[0], texture[0], 2D;
TEX normalVector, fragment.texcoord[0], texture[1], 2D;
TEX textureGloss, fragment.texcoord[0], texture[2], 2D;

MAD normalVector  , normalVector  , 2.0, -1.0;
DP3 normalVector.w, normalVector  , normalVector;
RSQ normalVector.w, normalVector.w;
MUL normalVector  , normalVector  , normalVector.w;

MOV lightVector, fragment.texcoord[1];
 
MUL Falloff, lightVector, state.light[0].attenuation.z;
DP3 Falloff, Falloff, Falloff;
SUB_SAT Falloff, 1.0, Falloff;

DP3 lightVector.w, lightVector, lightVector;
RSQ lightVector.w, lightVector.w;
MUL lightVector, lightVector, lightVector.w;
 
MOV viewVector, fragment.texcoord[2];
DP3 viewVector.w, viewVector, viewVector;
RSQ viewVector.w, viewVector.w;
MUL viewVector, viewVector, viewVector.w;

DP3 reflectionVector, normalVector, viewVector;
ADD reflectionVector, reflectionVector, reflectionVector;
MAD reflectionVector, reflectionVector, normalVector, -viewVector;

DP3 reflectionVector.w, reflectionVector, reflectionVector;
RSQ reflectionVector.w, reflectionVector.w;
MUL reflectionVector, reflectionVector, reflectionVector.w;

DP3_SAT RdotL, reflectionVector, lightVector;
POW RdotL, RdotL.x, shininess.x;
MUL RdotL, textureBase.a, RdotL;
MUL RdotL, specularColor, RdotL;
MUL RdotL, RdotL, textureGloss;

DP3_SAT NdotL, normalVector, lightVector;
MUL NdotL, Falloff, NdotL;
MUL RdotL, NdotL, RdotL;
MUL NdotL, diffuseColor , NdotL;

ADD textureBase, ambientColor, textureBase;
MAD result.color.rgb, textureBase, NdotL, RdotL;

END


Reveals far more instructions than what it is supported by your current hardware.
Sorry about that Sad
Offline StefanD2

Senior Newbie




Java games rock!


« Reply #111 - Posted 2004-02-19 21:29:38 »

@JCD: Do not worry! You are just facing a point where no one has gone before (as far as i know). Maybe there is something to tweak which would be fine - but if not we all may be able to find out which card supports which feature - or not.

PS: Your quake md3 demo works for me Wink
Thanks for making it work with Xith3D and sharing your knowledge!
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #112 - Posted 2004-02-19 21:34:45 »

There is no way I can tweak that phong shading code any better, as a matter of fact, I spent a lot of time on it with a friend and I think I managed to create the best to do it... But again I'm no John Carmack or anything like that (the only thing I've got in common with him is the long hair... Roll Eyes)
I'm glad to hear that my md3 demo works on your side, however I'd love to see you guys post something like the email that I received today:

Quote

I have a Inspiron 8600 Dell laptop with a GeForceFX Go5650 with 128MB,
and Debian Linux. All you demos work without any problems, and this are
the fps i get:
PerPixel Lighting, with primitive distance attenuation: 480-500 fps
NeHe's Cel-Shading Tutorial, with VS: 450-470 fps
PerPixel Lighting, with VS: 440-460 fps
Phong Lighting, with VS & PS: 55-60 fps ( all the textures/obj are
loaded)


Offline StefanD2

Senior Newbie




Java games rock!


« Reply #113 - Posted 2004-02-19 21:51:05 »

Well that is something I cannot mail (need some newer hardware ...)

Following demos do work on my GForce 3 (Java 1.4.2_03):
- Basic Framework  (okay, no demo, but the right start Wink )
- Particles Generator
- Nehe's Cel-Shading Tutorial
- Cloth Simulation
- Flag Simulation
- PerPixel Lighting
- Nehe's Cel-Shading Tutorial (Vertex Shaders Accelerated)
- PerPixel Lighting (Vertex Shaders Accelerated)
- Quake III model loader and animator

Sadly water demo still crashes right after starting ...
And as we found out before Phong Lighting partly works  (i.e. the particles are visible)...

Maybe it would be a good idea to list supported cards?
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #114 - Posted 2004-02-19 22:03:46 »

The Q3 model demo is all pink (like the cloth demo) on my Mac. Sad

Offline Java Cool Dude

Senior Duke




Java forever


« Reply #115 - Posted 2004-02-19 22:11:16 »

I think it's about time you updated your graphic card divers swpalmer, or ditch that mac and get a Win computer Grin...Ok don't shoot I'll stop the joking  Grin

@Stefan2d: Thanks for the feedback man, that's greatly appreciated (maybe machine config and fps numbers can be posted sometime Smiley )
The water demo runs on some PCs and crashes on some others, it's up to JOGL guys to look into the TexCoordGen SPHERE_MAP and fix it...
Offline StefanD2

Senior Newbie




Java games rock!


« Reply #116 - Posted 2004-02-19 22:16:57 »

Well it's an athlon running at 2 Ghz. Sadly I had vertical sync on for open gl therefore 60 fps would not be quite related to your question - only thing to say at the moment is that your demos consume damn less cpu time  Cheesy

PS. Okay - wanted to see some numbers before going to sleep Cool  - ran in windowed mode

- Nehe's Cel-Shading Tutorial (Vertex Shaders Accelerated)
600 fps (640x480x32)
440 fps (800x600x32)
300 fps (1024x768x32)

- md3:
118 fps (640x480x32)
118 fps (800x600x32)
116 fps (1024x768x32)
does not depend on resolution here ...  stopping animation will result in a large speed gain: reaches 380 - roughly 200% faster- maybe there is something to be tuned?

I also noticed that the fps stay constant even when moving the model far out shortly before it vanishes. Maybe LOD would be a nice feature for the future  Wink
Offline Ramses

Senior Newbie




Java games rock!


« Reply #117 - Posted 2004-02-19 23:29:22 »

Glad you found the reason for it not working JCD! I suppose it's almost time i upgraded that card Smiley

The info you're looking to gather:
WinXP, AMD 2500XP+, ATI 8500DV 64MB
Ran the demo's at 800x600:
Particle Gen (100 particleS) ~760FPS
NeHe's Cel-Shading ~95FPS
Cloth Sim ~280FPS
Flag Sim ~295
Water Sim ~240FPS
PerPixel Lighting ~370FPS
NeHe's Cel-Shading VS ~290FPS
PerPixel Lighting VS ~380FPS
Phong - N/A
Quake3 Model Ldr (moving) ~485FPS

And I'll chime in too to say that you've done some very cool stuff with these demos! Thumbs up mate!
Offline gregorypierce

Senior Duke




I come upon thee like the blue screen of death....


« Reply #118 - Posted 2004-02-19 23:58:19 »

Quote
I think it's about time you updated your graphic card divers swpalmer, or ditch that mac and get a Win computer Grin...Ok don't shoot I'll stop the joking  Grin


Yeah, there is a problem. They show up pinkish on all Macs. Not yet sure why. Trying to get a new release out before Monday (jogl OSX major update).

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline Java Cool Dude

Senior Duke




Java forever


« Reply #119 - Posted 2004-02-20 00:17:01 »

Ok I'll post few numbers produced by my configuration which is:

AMD Athlon XP 2.1 Ghz
NForce 2 Ultra Mobo
512 DDR @ 166 Mhz
Radeon 9700 Pro ~ default clocks

All resolutions set to 640*480

Main Frame: ~3000 FPS.

Particle System, 100 particles, physics disabled, flame effect: ~1750 FPS.

NeHe's Cel-Shading: ~1900 FPS.

Cloth Simulation: ~750 FPS.

Flag Simulation: ~750 FPS.

Water Simulation: ~750 FPS. (heh? 3 * 750 in a row?)

PerPixel Lighting: ~ 1300 FPS.

NeHe's Cel-Shading VS: ~1850 FPS.

PerPixel Lighting VS: ~ 1350 FPS.

Phong Lighting FS & VS: ~450 FPS.

Quake 3 Loader and Animator (motion): ~1400 FPS.
Pages: 1 2 3 [4] 5 6
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (50 views)
2014-10-17 03:59:02

Norakomi (39 views)
2014-10-16 15:22:06

Norakomi (31 views)
2014-10-16 15:20:20

lcass (36 views)
2014-10-15 16:18:58

TehJavaDev (66 views)
2014-10-14 00:39:48

TehJavaDev (65 views)
2014-10-14 00:35:47

TehJavaDev (55 views)
2014-10-14 00:32:37

BurntPizza (72 views)
2014-10-11 23:24:42

BurntPizza (43 views)
2014-10-11 23:10:45

BurntPizza (84 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!