Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualslicer4ever

Posted 15 January 2013 - 11:39 PM

this can be accomplished several ways.

 

if you simply want a load screen, with no feedback, then using a state for loading is fully reasonable, however if you want a progress bar, things get a bit interesting.

 

either you:

1. use multi-threading/async loading, in which case, you need some method to post a percentage complete(for example, at specific point's in the load, pass an value to some variable that say's "i'm 10% done, 20%, etc.), or if loading multiple resources, and you only want to pass back what the file is your currently loading, then before opening a file, simply pass the filename string to some varaible to be rendered over your loading screen.

 

2. if single-threaded, post redraws at those percentage points, simply clear the screen, draw w/e your loading screen is, and flip the screen(disabling v-sync would be important here)

 

any decent content manager should incorporate such functionality for anything it's capable of loading, however if your loading the files directly yourself, it might by a bit tricker to incorporate such functionality.


#2slicer4ever

Posted 15 January 2013 - 11:38 PM

this can be accomplished several ways.

 

if you simply want a load screen, with no feedback, then using a state for loading is fully reasonable, however if you want a progress bar, things get a bit interesting.

 

either you:

1. use multi-threading/async loading, in which case, you need some method to post a percentage complete(for example, at specific point's in the load, pass an value to some variable that say's "i'm 10% done, 20%, etc.), or if loading multiple resources, and you only want to pass back what the file is your currently loading, then before opening a file, simply pass the filename string to some varaible to be rendered over your loading screen.

 

2. if single-threaded, post redraws at those percentage points, simply clear the screen, draw w/e your loading screen is, and flip the screen(disabling v-sync would be important here)

 

any decent content manager should incorporate such functionality for anything it's capable of loading.


#1slicer4ever

Posted 15 January 2013 - 11:36 PM

this can be accomplished several ways.

 

if you simply want a load screen, with no feedback, then using a state for loading is fully reasonable, however if you want a progress bar, things get a bit interesting.

 

either you:

1. use multi-threading/async loading, in which case, you need some method to post a percentage complete(for example, at specific point's in the load, pass an value to some variable that say's "i'm 10% done, 20%, etc.), or if loading multiple resources, and you only want to pass back what the file is your currently loading, then before opening a file, simply pass the filename string to some varaible to be rendered over your loading screen.

 

2. if single-threaded, post redraws at those percentage points, simply clear the screen, draw w/e your loading screen is, and flip the screen(disabling v-sync would be important here)


PARTNERS