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 / Splash Screen appearing off screen at application startup

Author
Message
JonEnstrom
User Offline
Joined: 27th Apr 2020
Location:
Posted: 2nd Sep 2020 18:10 Edited at: 2nd Sep 2020 18:11
I have a problem I can't seem to solve where the splash screen and title screen appear approximately 1/4 the proper size and partially located off the screen at the launch of the application on mobile devices.

The app can be downloaded here to check this out.. To reproduce the problem simply start the game while holding the phone/device in portrait mode.

https://play.google.com/apps/testing/com.squishmobileprductions.wormholerunner

Details:

The splash screen and title screen are loaded and displayed as the first commands in the "Begin" code section right after setting the resolution/etc. The title screen displays "Loading..." text while the rest of the "Begin" function runs and then switches to "Ready to start!" at the end of the function. The problem is the title screen is displayed at about 1/4 of the proper size and located at what seems to be approximately 0, -500 (so the top half is off screen).

Once the main "Loop" section starts running the title screen magically re-sizes and appears normally (positioned at 1,1 and filling the whole screen).

When you die in the game (or press the back button and then select restart) I call the "Begin" function to start the whole game over again. The odd thing is that the splash screen and title screen appear normally in that case. The "bug" only appears on the first launch of the game.

I think the problem seems to be related to the mobile device switching into landscape mode but I can't seem to fix it, despite trying several different things like:

Calling Sync() a bunch of times
calling sleep(1000)
calling ClearScreen()
using a loop to wait until GetOrientation() returns 3 or 4 (landscape modes)

Any assistance in solving this annoyance would be greatly appreciated!
JonEnstrom
User Offline
Joined: 27th Apr 2020
Location:
Posted: 2nd Sep 2020 18:20
Looks like I posted before trying everything!

I solved the problem shortly after using the command UpdateDeviceSize(1920, 1080) before displaying anything and it works perfectly now.
Conjured Entertainment
AGK Developer
15
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 2nd Sep 2020 23:43 Edited at: 2nd Sep 2020 23:44
Quote: "Looks like I posted before trying everything!

I solved the problem shortly after... "


Its all good.

I have had to mark my own questioning posts as solved before. (Windows thread about http server response)

Just glad to hear you got it sorted out, and especially fast.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2020-10-22 01:54:42
Your offset time is: 2020-10-22 01:54:42