Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Very slow start up  (Read 830 times)
0 Members and 2 Guests are viewing this topic.
Offline ritonda66

JGO n00b
*

Posts: 8



« on: 2012-01-21 15:41:26 »

my source
https://github.com/ritonda66/shooter/blob/master/src/ch/shooter/gamePanel.java
problem:
when im clicking on the jar. nothing happends for 5-10 secs then it opens. BUT WHY???
Offline Waterwolf

JGO n00b
*

Posts: 36
Medals: 2



« Reply #1 on: 2012-01-21 17:00:21 »

Because the images are loaded in a static initializer block before the gui is shown. You could just load them locally instead of downloading from internet  persecutioncomplex
Offline ra4king

JGO Kernel
*****

Posts: 3160
Medals: 196


I'm the King!


« Reply #2 on: 2012-01-21 17:19:05 »

@Waterwolf
They are not loaded in a static initializer block, those Image variables are instance variables.

@OP
Your internet speed isn't extremely fast. It takes 5-10 seconds to download all those images Wink

Games published by our own members! Go get 'em!
Offline Waterwolf

JGO n00b
*

Posts: 36
Medals: 2



« Reply #3 on: 2012-01-21 17:21:38 »

Ah crap, somehow misread that they are static. They're loaded in constructor then   Roll Eyes
Offline ritonda66

JGO n00b
*

Posts: 8



« Reply #4 on: 2012-01-21 17:21:56 »

tyvm works now Smiley
Offline ra4king

JGO Kernel
*****

Posts: 3160
Medals: 196


I'm the King!


« Reply #5 on: 2012-01-21 17:26:16 »

What works? The only problem you had was the long startup Tongue

Offline ritonda66

JGO n00b
*

Posts: 8



« Reply #6 on: 2012-01-22 05:34:23 »

its faster now
Offline jammas615

Jr. Member
**

Posts: 70



« Reply #7 on: 2012-01-22 17:31:18 »

when im clicking on the jar. nothing happends for 5-10 secs then it opens. BUT WHY???

But is 5-10 seconds going to kill you?

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.059 seconds with 19 queries.