Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  Java Applet Download Progress Bar - Web Start, JOGL  (Read 4021 times)
0 Members and 1 Guest are viewing this topic.
Offline superjoebob

Senior Newbie





« Posted 2011-06-07 06: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?
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #1 - Posted 2011-06-07 06:45:32 »

Yes that progress bar is for all your jars and native code. The only reason you would want a progress bar is for loading resources such as images and sound.

Offline superjoebob

Senior Newbie





« Reply #2 - Posted 2011-06-07 07:38:47 »

So then the download bar is covered, I only need a bar for the physical loading of my assets into memory?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #3 - Posted 2011-06-07 08:12:48 »

You don't necessarily need one but yes. You shouldn't be worrying about actual jar files and native code to be loaded.

Offline superjoebob

Senior Newbie





« Reply #4 - Posted 2011-06-07 09:46:43 »

Thanks, that's an absolute relief. Without the provided Java loading bar it would have been incredibly painful.
Offline superjoebob

Senior Newbie





« Reply #5 - Posted 2011-06-08 06: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?
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #6 - Posted 2011-06-08 07:06:54 »

Well maybe you have a ton of resources that are being downloaded on a slow internet.

Offline superjoebob

Senior Newbie





« Reply #7 - Posted 2011-06-08 07: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.
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #8 - Posted 2011-06-08 08:11:19 »

How big are all your jars and folders?

Offline superjoebob

Senior Newbie





« Reply #9 - Posted 2011-06-08 10:33:11 »

All the Jars and folders come out to around 4 megs.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #10 - Posted 2011-06-08 19:01:32 »

Depending on your web server's bandwidth and internet speeds, that is a lot.

Offline superjoebob

Senior Newbie





« Reply #11 - Posted 2011-06-08 21:15:39 »

Which is why I'm curious about how to make a download progress bar for my game Grin.
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #12 - Posted 2011-06-09 00:27:35 »

Well as I said, the loading of jars and native code is already taken care of by that Java icon with the rotating blue squares. If it takes 1 minute to load audio, images, and other resources then so be it, you can't really boost their download speeds Tongue But when the Java logo and JOGL loading gears are done, that means they've finished loading all vital code and have started executing your code.

Offline zoto

Senior Member


Medals: 4



« Reply #13 - Posted 2011-06-09 00:40:15 »

Is this what your looking for?
http://download.oracle.com/javase/tutorial/deployment/applet/customProgressIndicatorForApplet.html
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #14 - Posted 2011-06-09 01:18:19 »

@zoto
Oh wow! I didn't you could replace Java's loading screen!

Offline superjoebob

Senior Newbie





« Reply #15 - Posted 2011-06-10 19: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.
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.

BurntPizza (22 views)
2014-09-19 03:14:18

Dwinin (35 views)
2014-09-12 09:08:26

Norakomi (63 views)
2014-09-10 13:57:51

TehJavaDev (90 views)
2014-09-10 06:39:09

Tekkerue (44 views)
2014-09-09 02:24:56

mitcheeb (65 views)
2014-09-08 06:06:29

BurntPizza (48 views)
2014-09-07 01:13:42

Longarmx (35 views)
2014-09-07 01:12:14

Longarmx (40 views)
2014-09-07 01:11:22

Longarmx (37 views)
2014-09-07 01:10:19
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!