Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (589)
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
  ignore  |  Print  
  Java Cool Dude webstart demos need updating  (Read 5407 times)
0 Members and 1 Guest are viewing this topic.
Offline gregorypierce

Senior Devvie




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


« Posted 2004-02-12 00:30:36 »

All of the Webstart demos work without a hitch on OSX EXCEPT for the JavaCoolDemos. None of those work, all having problems with loading the jni library.

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 William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #1 - Posted 2004-02-12 00:44:49 »

Excellent!

I assume JavaCoolDude will update his libraries sometime soon Smiley

Will.

Offline Java Cool Dude

Senior Devvie




Java forever


« Reply #2 - Posted 2004-02-12 01:35:59 »

Oooooooops sorry :p
/me goes and updates his stuff :p
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Java Cool Dude

Senior Devvie




Java forever


« Reply #3 - Posted 2004-02-12 01:47:35 »

Done!!!
Check em out and lemmie know if they work now.
PS: Anything that is pixel and vertex shaders accelerated won't work with sub Geforce 3 cards such as the GF 2 PRO-ULTRA-MX, GF4 MX, Radeon 7500-7200-7000 etc...
Just a heads up Roll Eyes
Offline gregorypierce

Senior Devvie




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


« Reply #4 - Posted 2004-02-12 01:58:22 »

Particles works just fine. The others crash with

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
Java Web Start 1.4.2_03 Console, started Wed Feb 11 23:55:28 EST 2004
Java 2 Runtime Environment: Version 1.4.2_03 by Apple Computer, Inc.
net.java.games.jogl.GLException: Error creating nsContext
      at net.java.games.jogl.impl.macosx.MacOSXGLContext.create(MacOSXGLContext.java:127)
      at net.java.games.jogl.impl.macosx.MacOSXGLContext.makeCurrent(MacOSXGLContext.java:136)
      at net.java.games.jogl.impl.macosx.MacOSXOnscreenGLContext.makeCurrent(MacOSXOnscreenGLContext.java:131)
      at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:199)
      at net.java.games.jogl.impl.macosx.MacOSXOnscreenGLContext.invokeGL(MacOSXOnscreenGLContext.java:79)
      at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
      at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
      at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:963)
      at com.xith3d.scenegraph.View.renderOnce(View.java:735)
      at com.xith3d.scenegraph.View.renderOnce(View.java:668)
      at Xith3DFrame.run(Xith3DFrame.java:140)
      at java.lang.Thread.run(Thread.java:552)


I'm just going to guess that you're requesting something special in your pixel buffer format Smiley

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 Devvie




Java forever


« Reply #5 - Posted 2004-02-12 02:03:17 »

Here try this simple demo
Basic Framework


Keys: Escape
Source
It has a wicked short code that you can read through in matter of seconds.
Also if I follow what you're saying only the particles demo works on your machine which points to the way I set up my canvas as, unlike all other demos, the particles one is set up differntly
Offline gregorypierce

Senior Devvie




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


« Reply #6 - Posted 2004-02-12 02:21:13 »

The webstart version definitely doesn't work, and there are some things in the source (like the Display class) that I don't have access to.

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 Devvie




Java forever


« Reply #7 - Posted 2004-02-12 02:23:33 »

My bad, here's the link to displayOptions
Offline gregorypierce

Senior Devvie




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


« Reply #8 - Posted 2004-02-12 02:27:51 »

Alrighty, definitely something wacky in the native code. I left the option at 640x480 and clicked okay and got:

Quote

Error: empty view at "src/native/jogl/MacOSXWindowSystemInterface.m:createContext:29"
net.java.games.jogl.GLException: Error creating nsContext
     at net.java.games.jogl.impl.macosx.MacOSXGLContext.create(MacOSXGLContext.java:127)
     at net.java.games.jogl.impl.macosx.MacOSXGLContext.makeCurrent(MacOSXGLContext.java:136)
     at net.java.games.jogl.impl.macosx.MacOSXOnscreenGLContext.makeCurrent(MacOSXOnscreenGLContext.java:131)
     at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:199)
     at net.java.games.jogl.impl.macosx.MacOSXOnscreenGLContext.invokeGL(MacOSXOnscreenGLContext.java:79)
     at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
     at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
     at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:950)
     at com.xith3d.scenegraph.View.renderOnce(View.java:732)
     at com.xith3d.scenegraph.View.renderOnce(View.java:665)
     at Xith3DFrame.run(Xith3DFrame.java:141)
     at java.lang.Thread.run(Thread.java:552)


If you can give me some idea what your code is doing, I will try to trace down and fix the bug in the OSX native code.

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 Devvie




Java forever


« Reply #9 - Posted 2004-02-12 03:15:42 »

Man there really is nothing to explain as the code does the strict minimum to load a Xith3D canvas onto a JFrame.
Hmm try to replace the stuff in the class contructor with this code
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
 

    VirtualUniverse virtualUniverse   = new VirtualUniverse();
    RenderPeer      renderPeer        = new RenderPeerImpl();
    CanvasPeer      canvasPeer        = null;
    Canvas3D        canvas            = new Canvas3D();
    Locale          locale            = new Locale();

    view.setFieldOfView((float)Math.toRadians(22.5));
    virtualUniverse.addLocale(locale);
    locale.addBranchGraph(scene());
    virtualUniverse.addView(view);

    canvasPeer   = renderPeer.makeCanvas(parentFrame.getContentPane(),
                                         640,480,16,false);

    canvas.set3DPeer(canvasPeer);
    view.addCanvas3D(canvas);
    parentFrame.pack();
    parentFrame.setVisible(true);
    (loopThread = new Thread(this)).start();


I suspect my displayOption class to return a non-valid parameter on a mac...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gregorypierce

Senior Devvie




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


« Reply #10 - Posted 2004-02-12 23:02:52 »

Yeah, the odd part is that I can get Xith3D to work just fine now on my own and even get the other demos to work without any issues - I just can't put my finger on what you're doing specifically that is making the OpenGL context creation fail on OSX.

There seems to be some funkiness with the NSRect not having a valid size - some sort of 'drawing too early' error.

1  
2  
3  
4  
5  
6  
7  
            NSRect frame = [nsView frame];
            if ((frame.size.width == 0) || (frame.size.height == 0))
            {
                fprintf(stderr, "Error: empty view at \"%s:%s:%d\"\n", __FILE__, __FUNCTION__, __LINE__);
                // the view is not ready yet
                return NULL;
            }


This is where things blow up right here. So somewhere there is a difference in when things are getting drawn.

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 Devvie




Java forever


« Reply #11 - Posted 2004-02-12 23:17:15 »

try omitting pack() from the last chunk of code I provided you with
Offline gregorypierce

Senior Devvie




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


« Reply #12 - Posted 2004-02-12 23:39:35 »

Yep, that does it. Once the pack is gone the content renders. I do have to set the size of the parentFrame manually in order to get it to not be a 5x5 pixel box Smiley

I changed that pack section into

1  
2  
      parentFrame.setSize(parameters[2],parameters[3]);
      //parentFrame.pack();


It works just fine now. Didn't see where the parentFrame's size was being set so I had it set based on the options chosen by the user.

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 Devvie




Java forever


« Reply #13 - Posted 2004-02-12 23:48:36 »

/me takes notice and goes updating his demos
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #14 - Posted 2004-02-13 00:09:29 »

is pack() evil with JOGL/MacOSX for some reason?  Should we not use it or will this problem be fixed?

Will.

Offline gregorypierce

Senior Devvie




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


« Reply #15 - Posted 2004-02-13 00:27:52 »

Can't answer that question for you yet. I can tell how to get around it, but I'm not yet sure why it behaves as it does.

The problem is that at the time pack is called, the JOGL/OSX component isn't ready to be drawn.

Quote

public void pack()

Causes this Window to be sized to fit the preferred size  and layouts of its subcomponents. If the window and/or its owner  are not yet displayable, both are made displayable before calculating the preferred size. The Window will be validated  after the preferredSize is calcula


So essentially what is happening is that when pack() is being called everything is told to get into a drawable state - but the OSX component isn't ready and as such the size of its component is still 0,0 so it reaches that piece of the GLContext creation, fails - and returns null which causes these demos to fail. I'm sure if we check, isDisplayable() would return false - so we're just rushing things along and the OSX component throws its exception "I told you I wasn't ready to draw damnit" and things splode on OSX.

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 gregorypierce

Senior Devvie




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


« Reply #16 - Posted 2004-02-13 16:10:31 »

Let me know when you're done and webstart deployed and I will run them through and make sure they're all happy.

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 Devvie




Java forever


« Reply #17 - Posted 2004-02-15 17:28:12 »

Done, can you check em out now?
Offline gregorypierce

Senior Devvie




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


« Reply #18 - Posted 2004-02-16 00:10:00 »

Quote
Done, can you check em out now?


I'm getting a funky Class versioning error:

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  
java.lang.UnsupportedClassVersionError: display/DisplayOptions (Unsupported major.minor version 49.0)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      at com.sun.jnlp.JNLPClassLoader.defineClass(JNLPClassLoader.java:309)
      at com.sun.jnlp.JNLPClassLoader.access$100(JNLPClassLoader.java:51)
      at com.sun.jnlp.JNLPClassLoader$1.run(JNLPClassLoader.java:256)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:249)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      at ClothSimulation.<init>(ClothSimulation.java:66)
      at ClothSimulation.main(ClothSimulation.java:48)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.javaws.Launcher.executeApplication(Launcher.java:844)
      at com.sun.javaws.Launcher.executeMainClass(Launcher.java:804)
      at com.sun.javaws.Launcher.continueLaunch(Launcher.java:682)
      at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:397)
      at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:199)
      at com.sun.javaws.Launcher.run(Launcher.java:167)
      at java.lang.Thread.run(Thread.java:552)

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 Devvie




Java forever


« Reply #19 - Posted 2004-02-16 01:40:31 »

Try again please Cry
Offline gregorypierce

Senior Devvie




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


« Reply #20 - Posted 2004-02-16 01:45:07 »

Getting closer. Its a new set of files that don't work this time Smiley

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  
java.lang.UnsupportedClassVersionError: CelShadingFactory (Unsupported major.minor version 49.0)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      at com.sun.jnlp.JNLPClassLoader.defineClass(JNLPClassLoader.java:309)
      at com.sun.jnlp.JNLPClassLoader.access$100(JNLPClassLoader.java:51)
      at com.sun.jnlp.JNLPClassLoader$1.run(JNLPClassLoader.java:256)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:249)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      at Lesson37.scene(Lesson37.java:128)
      at Lesson37.<init>(Lesson37.java:89)
      at Lesson37.main(Lesson37.java:60)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.javaws.Launcher.executeApplication(Launcher.java:844)
      at com.sun.javaws.Launcher.executeMainClass(Launcher.java:804)
      at com.sun.javaws.Launcher.continueLaunch(Launcher.java:682)
      at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:397)
      at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:199)
      at com.sun.javaws.Launcher.run(Launcher.java:167)
      at java.lang.Thread.run(Thread.java:552)

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 gregorypierce

Senior Devvie




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


« Reply #21 - Posted 2004-02-16 01:48:24 »

Flag works. It starts off painfully slow( i.e. 2FPS) and then once it gets rolling doing whatever - it maintains a relatively speedy  130-180 fps

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 gregorypierce

Senior Devvie




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


« Reply #22 - Posted 2004-02-16 01:55:40 »

Cloth comes in with a very scarily slow 20-25 FPS Smiley

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 gregorypierce

Senior Devvie




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


« Reply #23 - Posted 2004-02-16 01:57:16 »

I'll wait for the rebuild of the shader stuff and then run lesson 37.

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 Devvie




Java forever


« Reply #24 - Posted 2004-02-16 02:01:01 »

Ok now we got the flag and cloth to work properly on a Mac (they run at ~1000 fps on my 2.1 Ghz, Radeon 9700 Pro pc).
What else needs to get fixed?
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #25 - Posted 2004-02-16 02:21:15 »

Quote
Flag works. It starts off painfully slow( i.e. 2FPS) and then once it gets rolling doing whatever - it maintains a relatively speedy  130-180 fps

How long do you have to wait..

For me is SAYS "FPS 2"  but the actual rate is much SLOWER (1 frame every MINUTE or so)... and I've been waiting several minutes now for it to speed up.  Something is horribly wrong.

*edit* Cloth simulation does the same. and looks all red. (The collision between cloth and sphere is also offset vertically - the cloth appears to float above the sphere - not coming close enough to touch.)

Offline gregorypierce

Senior Devvie




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


« Reply #26 - Posted 2004-02-16 02:29:34 »

I want maybe 10 seconds. Seems to be even less time now. What's the specs on your machine? I'm a 1.25 Ghz PB with a 9600 Mobility Radeon.

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 Devvie




Java forever


« Reply #27 - Posted 2004-02-16 02:34:38 »

Uploaded new version, I think I tracked down the problem and fixed it.
Any feedback on the cloth demo?
Offline gregorypierce

Senior Devvie




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


« Reply #28 - Posted 2004-02-16 02:35:34 »

Cell shading demo runs at 450-475.

JCD, what are you using for your timer?

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 Devvie




Java forever


« Reply #29 - Posted 2004-02-16 02:38:06 »

System.currentTimeMillies()  Cry
Pages: [1] 2
  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.

trollwarrior1 (23 views)
2014-11-22 12:13:56

xFryIx (69 views)
2014-11-13 12:34:49

digdugdiggy (48 views)
2014-11-12 21:11:50

digdugdiggy (42 views)
2014-11-12 21:10:15

digdugdiggy (36 views)
2014-11-12 21:09:33

kovacsa (60 views)
2014-11-07 19:57:14

TehJavaDev (63 views)
2014-11-03 22:04:50

BurntPizza (61 views)
2014-11-03 18:54:52

moogie (76 views)
2014-11-03 06:22:04

CopyableCougar4 (77 views)
2014-11-01 23:36:41
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!