Loading screen with diddy framework
Monkey Forums/Monkey Programming/Loading screen with diddy framework
| ||
Hello all, Trying to use the diddy framework to display a loading screen and then load all my assets before moving onto my titlescreen. I thought the idea would be to straight away display the loading image in Render after loading the image in OnCreate Then activate loading the remaining assets in OnUpdate. Once all are loaded I can then move onto the titlescreen. However what seems to happen is by using OnUpdate/OnRender in the MyGame class I can't seem to move onto titlescreen and according to debug seems to sit and keep running OnUpdate/OnRender in MyGame. Probably something obvious I'm missing but any help would be appreciated. Or if anyone has an example of a loading method using the diddy screen framework? Some Pseudocode of what i'm doing before moving onto titlescreen: Class MyGame Extends DiddyApp Field fGfxLoadingScreen:GameImage Method OnCreate:Int() Super.OnCreate() SetScreenSize(640, 480) SetUpdateRate UPDATE_RATE TDeltaTimer.init() images.Load("loadingscreen.png", "", False) fGfxLoadingScreen = game.images.Find("loadingscreen") Return 0 End Method OnRender() fGfxLoadingScreen.Draw(0, 0) Return 0 End Method OnUpdate() Select(loadingstate) case 0 LoadSounds() LoadImages() gameScreen = New GameScreen() titleScreen = New TitleScreen() loadingstate = 1 case 1 titleScreen.PreStart() End End Method LoadSounds:Void() 'Load My Sounds Here End Method LoadImages:Void() 'Load My Images Here End End |
| ||
|
| ||
Thanks Amon, that's a massive help. |