"Loading" Screens

Blitz3D Forums/Blitz3D Programming/"Loading" Screens

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If you wanting a loading screen in your game whilst things load, you'd be best to think out a structure for your game. Perhaps having a mode variable. Then the main loop could be like so:

While Not KeyHit(1)

    If mode = 0 then
        loading_screen()
    ElseIf mode = 1 then
        level1()
    ElseIf mode = 2 then
        level2()
    ElseIf mode = 3 then
        game_over_screen()
    ElseIf mode = 4 then
        high_score_screen()
    End If

Wend
End


That way, whenever you want something to happen, just set the mode variable to say 0 for the loading screen to appear, or if you finish level 1, set mode to 2. A bit simplified, but it's always good to plan it out a little. Makes it alot easier to keep track of and debug.