Pixel Perfect
Member
|
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
|
|
09-22-2013 09:03 AM |
|
Pherael
Member
|
RE: Feedback on level load status
What about tutorial "14 - Game Basics / 19 - Loading Screen"?
|
|
09-22-2013 09:19 AM |
|