Posted: 20th Aug 2011 3: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.
Posted: 20th Aug 2011 8:55
to toggle landscape mode on:

SetOrientationAllowed (0, 0, 1, 1)

This will set you app in landscape mode (both ways)
Posted: 20th Aug 2011 9: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.
Posted: 24th Aug 2011 1: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?

+ Code Snippet
	agk::SetOrientationAllowed(0,0,1,0);		//Makes it so the game can only be played in landscape mode
	int DeviceHeight = agk::GetDeviceHeight();
	int DeviceWidth = agk::GetDeviceWidth();

	if (DeviceHeight > DeviceWidth) //If given values were from portriat orientation
	{
		agk::SetVirtualResolution (DeviceWidth,DeviceHeight);
	}
	else //If given values were from landscape orientation
	{
		agk::SetVirtualResolution (DeviceHeight,DeviceWidth);
	}


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?
Posted: 24th Aug 2011 1:38
Yes, it would be.
Posted: 25th Aug 2011 4:07
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.