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 / Orientation Settings Problem

Author
Message
JORGEMAL
15
Years of Service
User Offline
Joined: 2nd Aug 2009
Location:
Posted: 24th Feb 2013 23:11
I am setting the screen for my game to always appear in landscape orientation. When my tablet is in landscape orientation and my game starts running, it appears in portrait orientation and only in a small area of the screen (see figure 1). If my game starts running when the tablet is in portrait orientation, it is shown correctly; it changes automatically to landscape orientation (see figure 2).
Below, I included the code with the orientation settings.
I will very much appreciate any comment.

Attachments

Login to view attachments
Juande
13
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 25th Feb 2013 12:41 Edited at: 25th Feb 2013 12:42
I don't know if the problem is this error in your code... you can try it.



greetings!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Feb 2013 19:14
You need to make sure that your Xcode project is set for only LandscapeLeft (the landscape mode you have indicated), otherwise it assumes the orientation that the device is opened in.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
JORGEMAL
15
Years of Service
User Offline
Joined: 2nd Aug 2009
Location:
Posted: 28th May 2013 04:05
Quote: "
I don't know if the problem is this error in your code... you can try it.
width=getdevicewidth() //you are using float variable and the function return an integer
height=getdeviceheight() //the same
SetDisplayAspect(width/height) //you have used height/width and it's wrong
"


I did what you suggested and the orientation problem got fixed, but now the game is displayed in a small squared area instead of the whole screen.

Regards
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th May 2013 04:46
What version of AppGameKit are you using?

Something that has popped up for a while is that assigning GetDeviceWidth/Height to a variable, in Tier 1, and using that variable doesn't always work.


You could also try this (maybe it is an ordering thing):


Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 13:48:17
Your offset time is: 2024-11-24 13:48:17