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 / landscape mode

Author
Message
Deion
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United States
Posted: 20th Aug 2011 03:32
tryign to start the ipad samples in landscape mode has not been the easiest, and the projects the way they are scale down when in landscape which is not ideal at all, for one apple will reject the binary you upload because it doesnt follow the human interface rules garbage they live by, any thuoghts to bypass this? i have it running normal in simulator but on device it resizes awfully.

Cheers,
Deion G.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 20th Aug 2011 08:55
to toggle landscape mode on:

SetOrientationAllowed (0, 0, 1, 1)

This will set you app in landscape mode (both ways)
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 20th Aug 2011 09:01
After evaluating all options I came to the conclusion that the best way to tackle the scaling problem on various iOs devices is to work using 960 by 640 base resolution as used by Iphone4 Retina display.

I use this code:

SetVirtualResolution (960, 640)
SetResolutionMode (1)


On Iphone4 everything will be shown at full resolution. On Iphone 3GS everything will be scaled down by 50% which will display very nicely. On Ipad it will be scaled up by around 50 pixels and have black borders on top/bottom (landscape mode) like a movie.

This is the best I could do for now, as I don't want my apps to resize without control and end up with chunky pixelled graphics.

If anyone has any better idea let me know.
aceracerff
12
Years of Service
User Offline
Joined: 21st Aug 2011
Location:
Posted: 24th Aug 2011 01:07
In my case, I would like my game to be playable only in landscape mode. However, I would obviously like it to be cross compatible. Does this logic work?



Notice that I switched height and width in the SetVirtualResolution command if height is larger than width. The big question here is, is 0,0 the top left corner still?
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 24th Aug 2011 01:38
Yes, it would be.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Aug 2011 04:07
Quote: "I would like my game to be playable only in landscape mode. However, I would obviously like it to be cross compatible."


Personally I would just use agk::SetOrientationAllowed(0,0,1,1) to force landscape mode, then choose a resolution I'm happy with, say agk::SetVirtualResolution(500,350), and then code the game assuming that screen size.

For iOS and Bada the game will always be drawn in landscape mode (since we specified landscape only) and on desktop platforms use setup.agc to create a landscape shaped window in whatever size you like. AppGameKit will fill it as much as possible with the 500x350 game.

Login to post a reply

Server time is: 2024-04-19 21:19:45
Your offset time is: 2024-04-19 21:19:45