Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (511)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Long JOGL Loading Times  (Read 3094 times)
0 Members and 1 Guest are viewing this topic.
Offline superjoebob

Senior Newbie





« Posted 2011-05-16 20:14:17 »

I'm not sure if this is a JOGL specific problem, but I do know that applets seem to load up fast enough when I'm not using JOGL to avoid this problem. What happens, is the Java loader pops up, then disappears and the screen stays white for an extended period of time before the game finally loads up, which generally seems to take about 15-20 minutes. I'm on high speed internet, and the size of all the files for the game are around 3 MB, so a 15 minute load time strikes me as a bit off.

I've even had times where the applet never loads at all, and this behavior is the same on the 3 different computers I've been testing on.

I thought that maybe I needed to implement a class loader or something like that, but after doing a few more tests the problem almost seems to be more. In my applet init function, I added a message popup. When the applet launches in browser, the popup appears almost immediately. But, If I leave the popup up, after about 30 seconds the popup disappears and the Java frame goes white. I've put more popups after the first one, and none of them pop up after it turns white, which seems to signal that nothing is actually happening while the screen is white. I've also set up a threaded asset loader, and the GLCanvas is supposed to be painted black immediately when it's initialized, which doesn't happen.

What could I be doing that's causing this?

EDIT: I actually managed to fix the crash error, but now I'm back to an older problem of incredibly long loading times. I've set up popup messages, and the GLCanvas initializes fairly quick, and the first display call is called quickly, but then there are incredible amounts of time between each display call( 1-5 minutes ). Interestingly enough display is getting called whenever I change focus away from the applet (open a different tab, etc).
Offline lhkbob

JGO Knight


Medals: 32



« Reply #1 - Posted 2011-05-16 22:21:24 »

Are you using an animator to automatically call display()?  GLCanvas has repaint() hooked up to call display() so it is likely that the focus changes and other events are triggering those displays.

Offline superjoebob

Senior Newbie





« Reply #2 - Posted 2011-05-16 22:26:39 »

Yes, I do have an animator hooked up. It seems like the animator isn't updating because something is still loading. I've stripped down my applet to a simple OpenGL initialization followed by drawing a simple image, and it won't even run in browser anymore. I'm using Netbeans and I've tested it using webstart, and it works. I've also tried running the Launch.html that Netbeans creates, and it runs in browser perfectly. The second I upload the files to the internet, though, they stop working.

EDIT: I've discovered that the applet runs if I keep trying over and over and over again. The first thing I'm doing is setting the applet background color to red. 90% of the time, I open the page, and the browser locks up for 5-10 seconds, then the applet frame flashes red and disappears. BUT, If I refresh at this point and keep doing so every time it crashes, the applet will eventually stay red, and load properly.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 350
Projects: 3
Exp: 5 years


I'm the King!


« Reply #3 - Posted 2011-05-17 02:12:34 »

What version JOGL are you using?

Offline superjoebob

Senior Newbie





« Reply #4 - Posted 2011-05-17 04:21:04 »

I'm using 1.1.1a, which came in the Netbeans OpenGL pack. Is there a newer version?  Shocked

I managed to get the applet launching almost faithfully by adding these lines to the header of the HTML:

<meta http-equiv="Cache-Control" Content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

But the loading time for the applet is still fairly painful ( 3 - 4 minutes ).
Offline ra4king

JGO Kernel


Medals: 350
Projects: 3
Exp: 5 years


I'm the King!


« Reply #5 - Posted 2011-05-17 04:31:30 »

Aha yes, you are using a loooong outdated version. The current recommended version is 2.0 Release Candidate 2.

EDIT: The download page might be somewhat confusing. To find the JOGL release, scroll all the way down and look for "jogl-[versionNum]-[operatingSystem].7z"

Offline gouessej
« Reply #6 - Posted 2011-05-17 08:38:33 »

ra4king is right. The JogAmp foundation has no control on Oracle servers and JOGL is maintained by the JogAmp foundation.

Offline superjoebob

Senior Newbie





« Reply #7 - Posted 2011-05-18 00:46:32 »

I've upgraded my project to use the latest JOGL2 build, but now I can't use the Netbeans OpenGL pack, so I once again get to struggle with trying to figure out JNLP files. The game runs fine when I run it normally, but if I try and run it through Web Start, or through the browser, I get this error:

Exception in thread "Thread-12" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
   at java.lang.ClassLoader.loadLibrary(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.System.loadLibrary(Unknown Source)
   at com.jogamp.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102)
   at com.jogamp.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51)
   at com.jogamp.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.jogamp.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68)
   at com.jogamp.common.jvm.JVMUtil.<clinit>(JVMUtil.java:56)
   at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:1141)
   at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:221)
   at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:178)
   at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:169)
   at pixelgame.core.CCore.<init>(CCore.java:177)
   at pixelgame.core.CCore.Instance(CCore.java:78)
   at pixelgame.core.CGLStarterThread.run(CGLStarterThread.java:56)

How should I go about setting up the JNLP and HTML to launch my new JOGL2 app? I've tried a number of changes to the original JNLP with no success, and I've tried using the JNLP Applet launcher(described at the bottom of this page http://www.ntu.edu.sg/home/ehchua/programming/opengl/JOGL2.0.html), but of course, I got the old "Class not found" error that absolutely everyone seems to get with no solution.
Offline ra4king

JGO Kernel


Medals: 350
Projects: 3
Exp: 5 years


I'm the King!


« Reply #8 - Posted 2011-05-18 01:00:48 »

This means it can't find gluegen-rt.jar in your classpath. It is supposed to be in the "lib" folder of the JOGL zip file.

Offline superjoebob

Senior Newbie





« Reply #9 - Posted 2011-05-18 01:12:28 »

When it builds it puts that file along with nativewindow.all.jar, jogl.all.jar and newt.all.jar into the lib folder alongside the jar. I think it's issue is that it doesn't know how to find gluegen-rt.dll/.so/.yoursystemlibraryextensionhere. To fix that I imagine I have to tell the JNLP to download the library from the internet somewhere, but I'm unsure how to do that. Unless I just have the JOGL jars in the wrong place?

EDIT: Wait, am I supposed to distribute the JOGL Zip with my Jar?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #10 - Posted 2011-05-27 12:27:51 »

Hi!

I explained how to setup Netbeans without the pack here, maybe it could be useful for you:
http://tuer.sourceforge.net/download.php

Pages: [1]
  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 (67 views)
2014-10-14 00:39:48

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

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

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

BurntPizza (44 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!