…to be drawn by the GPU before the rest of the start_game() event handler loads very asset and starts the game. Basically, on my computer, it hangs for 1 second which is not that bad, but for an older computer, the loading process may take up to 5 seconds, so I’d like this LOADING message to be shown on the screen while the user waits, but I can’t find any way of forcing the buffers to update on the GPU. Any idea?
Is there like a: sleep(20f) function or something so that I can insert this line between the nifty text update and the rest of the loading process?
Yeah that’s what I was afraid I’d end up doing. So basically, all the asset loading and level generation will have to happen after the first update loop. The first one will just be used to refresh the Nifty text label. Is that right?
Quit trolling. I was saying that because I find it unclean to perform an IF branch on every update loop. What I ended up doing is create a 10ms timer and upon timeout, proceed with loading assets and start the game, therefore 10ms is plenty enough for at least a redraw and my loading message is displaying correctly. I’m not comfortable settling to have the whole game update loop in a IF branch, unless that wasn’t what you were talking about…? Anyhow, I +1’ed you. Thx
@.Ben. said:
Quit trolling. I was saying that because I find it unclean to perform an IF branch on every update loop. What I ended up doing is create a 10ms timer and upon timeout, proceed with loading assets and start the game, therefore 10ms is plenty enough for at least a redraw and my loading message is displaying correctly. I'm not comfortable settling to have the whole game update loop in a IF branch, unless that wasn't what you were talking about...? Anyhow, I +1'ed you. Thx
Thats a bad idea and nobody suggested that, you better go with what Empire said or make your own class that detaches itself from the update after it did its work.