Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (596)
Games in Android Showcase (169)
games submitted by our members
Games in WIP (648)
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 3465 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: 388
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: 388
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(
   at com.jogamp.gluegen.runtime.NativeLibLoader.access$000(
   at com.jogamp.gluegen.runtime.NativeLibLoader$
   at Method)
   at com.jogamp.gluegen.runtime.NativeLibLoader.loadGlueGenRT(
   at com.jogamp.common.jvm.JVMUtil.<clinit>(
   at pixelgame.core.CCore.<init>(
   at pixelgame.core.CCore.Instance(

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, 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: 388
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 »


I explained how to setup Netbeans without the pack here, maybe it could be useful for you:

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

nidaleespear (4 views)
2015-07-08 06:13:38

nidaleespear (7 views)
2015-07-08 06:07:25

KaiHH (26 views)
2015-07-07 11:39:58

deepthought (56 views)
2015-06-30 15:39:44

deepthought (58 views)
2015-06-30 15:39:09

deepthought (67 views)
2015-06-30 15:36:52

Za\'Anzabar (45 views)
2015-06-29 05:44:54

TritonDreyja (52 views)
2015-06-24 17:10:40

CopyableCougar4 (54 views)
2015-06-23 00:34:45

BurntPizza (59 views)
2015-06-21 20:36:46
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14 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‑
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!