About Store Forum Documentation Contact



Post Reply 
Feedback on level load status
Author Message
Pixel Perfect Offline
Member

Post: #1
Feedback on level load status
I was wondering if there is anything in the engine that provides feedback regarding the status of the initial level load.

My initial reason for wanting this was to synchronise the start of my ambient music with the appearance of the game on screen but it would also have use for displaying a status bar for the user indicating the load time progress.

My initial solution is to insert a while loop in the Init() proc and test for areaLoaded. This works but doesn't seem very elegant.

Code:
    // Set up any Music Themes
    soundManager.createMusicTheme("ambientTheme");
    soundManager.addTrackToMusicTheme("ambientTheme",
                                      UID(584940724, 1322467852, 3927789204, 3436378362));

    // Set the volume for Ambient Music Manager's playback
    SoundVolume.ambient(0.1);

    // Wait for the level to load
    while (!Game::World.areaLoaded(VecI2(0,0)))
    {
        Game::World.update(Cam.at);
    }

    // Play the initial level ambient music
    soundManager.playAmbientManagerThemeTrack("ambientTheme", 1);


I may well have missed something obvious so any pointers greatly appreciated smile
09-22-2013 09:03 AM
Find all posts by this user Quote this message in a reply
Pherael Offline
Member

Post: #2
RE: Feedback on level load status
What about tutorial "14 - Game Basics / 19 - Loading Screen"?
09-22-2013 09:19 AM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #3
RE: Feedback on level load status
That'll be the 'something obvious' I missed ... many thanks Pherael smile
09-22-2013 09:38 AM
Find all posts by this user Quote this message in a reply
Post Reply