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 / That darned black screen.....

Author
Message
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 17th Mar 2013 22:15
In iOS you can specify a default landscape and portrait image to display for your app (in fact, you are required to create at least one).

But I haven't been able to find a way to do the same thing for Android.

I am very close to done with my WIP game and am doing a lot of testing.

When I start up on an Android device, it displays a black screen for up to 4 seconds (depending on device) before my initial display appears.

I set up a 'loading' type image in the app::Begin() method. But the app just displays black for some period.

So I tried a simple AGKSplash.png screen.

But the problem is that I cannot specify one for landscape and one for portrait. So, one way or another, it looks wrong.

Especially because I force the app into one landscape mode in the app::Begin() function.

When I have an AGKSplash.png file, it might look correct if it is in the same orientation as the tablet and then it messes up when the app flips. And it assumes a Portrait orientation as the initial one, no matter what orientation the app is actually in.

While the black splash is better than the white one, it is still annoying.

Does anyone know a way to tweak the Android files to have it know that there are two images to display (one for portrait and one for landscape)?

Or can we prevail upon TGC to totally do away with even checking for the AGKSplash.png file and going straight to the app's display?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 17th Mar 2013 23:15
Just making sure here, because I could make a mistake like this, you did put a sync() after you pasted the image in the Begin method?

My hovercraft is full of eels
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 18th Mar 2013 03:59
Not in the Begin method, but it occurs in the agk::Loop() method and the logic should have it fall through fairly quickly.

But, I will try calling it in the Begin method (twice) and see if that changes the behavior. Thank you for the question.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 18th Mar 2013 08:21
I found that I had to run sync() twice, to get my spash screen to display correctrly on android.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 18th Mar 2013 16:43
Well, I know it works perfectly in Tier 1 (I used to do the double Sync() call there).

But it doesn't work so well in Tier 2.

Adding two calls to agk::Sync() after loading the image shaved about a second off the black flash. Better, but not perfect.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 09:52:26
Your offset time is: 2024-11-24 09:52:26