Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: Java Applet Download Progress Bar - Web Start, JOGL on: 2011-06-10 21:29:17
Me neither(obviously XD), that may very well be just what I'm looking for! I'll give it a try, thanks zoto.
2  Game Development / Newbie & Debugging Questions / Re: Java Applet Download Progress Bar - Web Start, JOGL on: 2011-06-08 23:15:39
Which is why I'm curious about how to make a download progress bar for my game Grin.
3  Game Development / Newbie & Debugging Questions / Re: Java Applet Download Progress Bar - Web Start, JOGL on: 2011-06-08 12:33:11
All the Jars and folders come out to around 4 megs.
4  Game Development / Newbie & Debugging Questions / Re: Java Applet Download Progress Bar - Web Start, JOGL on: 2011-06-08 09:13:21
I believe that is the case, but the animation I've got playing right when the applet starts is a small rotating gear, which changes to a larger rotating gear with a progress bar for loading the assets into memory after JOGL loads up. The java logo loader appears first, stays up for about 5 seconds, then immediately goes to the small rotating gear which stays on for about a minute when online, about 0.5 seconds offline. That's why I've been led to believe that once my little animated gear pops up, downloading continues to happen.

For my applet structure I pretty much have a Jar with all the game code and resources in it. Then, I have a lib folder alongside the jar which contains all the libraries I'm using including MySQL, an Audio library, etc.
5  Game Development / Newbie & Debugging Questions / Re: Java Applet Download Progress Bar - Web Start, JOGL on: 2011-06-08 08:47:58
I am curious though, my applet loads up almost instantly when run through the IDE and when run in a web page offline, but as soon as I run the applet in a browser online, my loading animation for the applet plays much longer. The loading animation I created plays for about 0.5 seconds offline, and it plays for about a minute online. What could be causing something like this, is something downloading after the java logo loader?
6  Game Development / Newbie & Debugging Questions / Re: Java Applet Download Progress Bar - Web Start, JOGL on: 2011-06-07 11:46:43
Thanks, that's an absolute relief. Without the provided Java loading bar it would have been incredibly painful.
7  Game Development / Newbie & Debugging Questions / Re: Java Applet Download Progress Bar - Web Start, JOGL on: 2011-06-07 09:38:47
So then the download bar is covered, I only need a bar for the physical loading of my assets into memory?
8  Game Development / Newbie & Debugging Questions / Java Applet Download Progress Bar - Web Start, JOGL on: 2011-06-07 08:08:02
I've been incredibly curious about how to display the download progress of an applet. I'm using Java Web Start, JOGL, and a few other libraries right now, and when I load up my applet it displays a progress bar and the Java logo. What does this progress bar represent, is it the download progress of all my libraries and Jars?

If not, how would I go about setting up a download progress bar for my applet? I've looked into class loaders but that seems to cover only the loading of my main applet, and not any libraries it's using. There doesn't seem to be a whole lot of documentation on this issue and I'm really not sure where to start.

Any tips?
9  Java Game APIs & Engines / JOGL Development / Re: Long JOGL Loading Times on: 2011-05-18 03: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?
10  Java Game APIs & Engines / JOGL Development / Re: Long JOGL Loading Times on: 2011-05-18 02: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.
11  Java Game APIs & Engines / JOGL Development / Re: Long JOGL Loading Times on: 2011-05-17 06: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 ).
12  Java Game APIs & Engines / JOGL Development / Re: Long JOGL Loading Times on: 2011-05-17 00: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.
13  Java Game APIs & Engines / JOGL Development / Long JOGL Loading Times on: 2011-05-16 22: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).
14  Java Game APIs & Engines / JOGL Development / Re: Trying to load textures on seperate thread, cannot bind context. on: 2011-05-14 06:30:37
Alright Orangy Tang, I'm convinced. If it's really that unsafe then I suppose I don't want it in my applet. I managed to get some pretty decent load times using your method.

Thanks  Grin!
15  Java Game APIs & Engines / JOGL Development / Trying to load textures on seperate thread, cannot bind context. on: 2011-05-14 02:11:03
I've been trying non stop for 2 days now and I'm about ready go insane over this problem. I'm trying to load textures on an alternate thread, allowing the main thread to display an animated loader to display progress. I'm aware of the issues this can lead to, but I've been reading around a lot (on this forum, mostly) and it sounds like it's possible.

The problem I'm having, is that no matter what I do, when I call GLContext.makeCurrent() in my loader thread with my shared context, I get one of 2 errors.

Here's a few things I've tried:
GLPbuffer buf = GLDrawableFactory.getFactory().createGLPbuffer( new GLCapabilities(), null, 1, 1, mContext);
mLoaderThread.context = buf.getContext();
mLoaderThread.start();

(mLoaderThread run())
mContext.makeCurrent(); -Error

Exception in thread "Thread-4" javax.media.opengl.GLException: wglShareLists(0x10000, 0x30001) failed: error code 0
   at com.sun.opengl.impl.windows.WindowsGLContext.create(WindowsGLContext.java:136)
   at com.sun.opengl.impl.windows.WindowsGLContext.makeCurrentImpl(WindowsGLContext.java:150)
   at com.sun.opengl.impl.windows.WindowsPbufferGLContext.makeCurrentImpl(WindowsPbufferGLContext.java:102)
   at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
   at pixelgame.core.CLoaderThread.run(CLoaderThread.java:55)

GLContext context = canvas.createContext( canvas.getContext() );
mLoaderThread.context = buf.getContext();
mLoaderThread.start();

(mLoaderThread run())
mContext.makeCurrent();-Error

Exception in thread "Thread-4" javax.media.opengl.GLException: Surface already locked
   at com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable.lockSurface(WindowsOnscreenGLDrawable.java:157)
   at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.makeCurrentImpl(WindowsOnscreenGLContext.java:57)
   at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
   at pixelgame.core.CLoaderThread.run(CLoaderThread.java:51)

I've also tried making my loading thread a GLCanvas object, and giving it an animator the same way my main thread is created. Without Threading.disableSingleThreading(), this would work, but the loader would block the main thread. When I tried using Threading.disableSingleThreading(), it started throwing the first error again. I've also tried creating the shared context in my constructor directly after creating the canvas, but this led to the same errors.

Obviously I don't know how to properly set up a shared GLContext and make it current on a thread. Any ideas what I could be doing wrong?





Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (11 views)
2014-04-15 18:08:23

BurntPizza (10 views)
2014-04-15 03:46:01

UprightPath (23 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (107 views)
2014-04-08 23:06:04

tom_mai78101 (207 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!