Posted: 6th Sep 2011 15:28
I am trying to do a loading screen with a progress bar in tier 2.

right now I have all my LoadImages in app:Begin()

does agk::Sync() work here?

or do I have to move everything inside app::Loop() ?
Posted: 7th Sep 2011 3:09
Personally I'd throw it in Loop, because I'm not sure what the app class does behind the scenes (it might check for OS messages, for instance). Blocking in Begin may cause some issues.
Posted: 7th Sep 2011 10:29
Seems like I will end having EVERYTHING in agk:Loop()

It has grown to the extent to become very hard to manage. I would like to see some real-life game example code for Tier 2 to see how people are managing loading, intro, levels, etc...
Posted: 9th Sep 2011 4:01
Your APP::LOOP function can be a very light weight function if you like. Once APP::BEGIN has finished preparing all your variables, data, media loading, e.t.c your loop code can simply be a sequence of high level function calls, i.e:

void app::Loop ( void )
{
switch ( app::m_iState )
{
case 1 : TitleLoop(); break;
case 2 : MoreLoadingLoop(); break;
case 3 : GameLoop(); break;
case 4 : GameOverLoop(); break;
case 5 : GameWinLoop(); break;
case 6 : ResetGame(); break;
}
}

As you can see, the loop becomes a very nice piece of code to read, breaking up your logic as you see fit. The switch case approach of controlling your logic is often called a 'state engine'.
Posted: 9th Sep 2011 9:23
yes right now I am using the switch case. so basically i am in the right path.

next step would be to move all loading out of app::begin and into app::loop as i would like to make some loading %

thanks a lot.