Yeah, as the topic says, I am having trouble finding the best way to implement a "Loading screen" within my game - my first thought:
To use boolean logic to test whether the game was in Loading state or not, test the condition by returning the appropiate value and performing the correct action, now this actually worked, I tested this By printing out "Loading..." and "Finished Loading" in the console, however, when I try it using some kind of graphical implementation on the canvas, it's a whole different story :/
I tried to do the same thing by adding static text to the window and always set it on top, however, Everytime something else is rendered it "overwrites" it, which I guess is what is should do; but not my desired effect
So, I've tried to implement different ways around this but currently to no avail - the only thing I can think of is a function that "loads the resources" without rendering them on the canvas, then, and only when everything is loaded, remove the loading static text and render everything else but I have had no look thus far finding such a function, any thoughts?
Best way to create a "loading Screen"?
-
- Posts: 98
- Joined: Fri Oct 03, 2008 1:25 pm
- Location: UK
- Contact:
Best way to create a "loading Screen"?
-System error
I had a similar issue at one stage. I would load my menu screen, then when i clicked on "option", it would lag for a second while it loaded the resources then display it. I fixed this by putting all the images for the entire into an init() method which i ran first. once it was done, i then loaded the menu. all was sorted.