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!