Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Sync() calls in Tier 2 vs Tier 1

Author
Message
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th May 2013 16:24
The lesson I finally realized, while trying to get the black blank to go away in Android, is that Sync() calls only work in the app::Loop() method. They do not work at all when called within the app::Begin() method.

The way the Sync() call works in Tier 2 is almost fundamentally different from Tier 1.

In Tier 1, everything that is doable in a Sync() call (display updates, user input checks) happens every time you call it. And you can call it as the very first command in your code (although you should really put up at least one image to see anything, like your own splash screen, for instance) and it will have an affect on the display.

In Tier 2, Sync() is only affective if done during the app::Loop() call. And it only changes the display, no user input is collected.

That last bit about user input has had a big impact on how coding is done in Tier 2. Simple menus and things that display something and wait for user selection are not as simple. There is a lot of state engine type things that need to be done instead.

Anyway, the upshot is that if you want your own splash screen, you need to set your display parameters and put up your first image in app::Begin() but make sure to do a double Sync() as the first thing in the app::Loop() state engine setup before you start the actual big app initialization if you want to minimize the blank at the start in Android.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 14:01:39
Your offset time is: 2024-11-24 14:01:39