Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Loading logic

Name: Anonymous 2011-10-18 17:37

Hi there /prog/

Let's discuss the logic for handling the loading of files, as well as displaying the "loading" image to user while the content is loading.  Currently I have a boolean, g_Loading.  After all of the assets have finished loading, I set the value of the boolean to false.

Every single iteration I check if g_Loading is true, if so display the loading graphic and nothing else.  Else, we should display everything but the loading graphic.  Currently this works well, however I'm sure there might be a slight performance decrease if we're still comparing the g_Loading boolean every single frame, even if we're already done loading.

Bow do you like to achieve this, /prog/?
Thanks for any help!

Name: Anonymous 2011-10-19 1:24

You code is wrong: You should not compared anything or have such booleans. You just display whatever has loaded. If it doesn't loads instantly or stalls for a "loading screen" you have problems.
Loading screens are symptom of very low performance or very sloppy code.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List