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 / PC stuck in portrait mode?

Author
Message
ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 18th Nov 2011 21:04
I'm running on PC, 1024x768 window, however, the game has bars on the sides, and it appears to be in portrait mode, instead of landscape mode. I used the agk command to tell me what mode it is in, and the function returned the value that corresponds with portrait mode. So how do I get the game to go into landscape mode on PC?
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 18th Nov 2011 21:31
What does the Setup.agc file show for your resolution?
ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 18th Nov 2011 21:40 Edited at: 18th Nov 2011 21:41
I'm using Tier 2, not Tier 1, so I don't think I'm referencing the agc file, am I?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 18th Nov 2011 21:44
Go in Core.cpp and adjust lines 16 and 17
ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 18th Nov 2011 21:47
That's what I thought too. However, if I change it to 1024x768, I get bars on both sides (I colored them a dark red so you can see the issue...)

Attachments

Login to view attachments
ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 18th Nov 2011 21:49
On the other hand, if I make it square (768x768), the vertical lines are gone...but I have a square, which isn't going to work so well with iOS-like devices.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 18th Nov 2011 22:26 Edited at: 18th Nov 2011 22:27
In Tier 1 you need to use SetDisplayAspect() in your source, should be something similar in Tier 2.

In your case: SetDisplayAspect( 1024.0/768.0 )

ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 18th Nov 2011 22:33
I have mine set at 4/3...should it be something else?
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 18th Nov 2011 23:41
Nope, 4/3 should work. But just check with my example just in case.

Do you have problems with other AppGameKit programs?

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 19th Nov 2011 00:04 Edited at: 19th Nov 2011 00:06
Be careful of integer math, 4/3 equals 1 which produces a square, 4.0/3.0 is 1.33333 which is what you want.

You can also use SetVirtualResolution( 1024, 768 ) which does away with the need for setting the aspect ratio manually.
ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 19th Nov 2011 00:11
ugh...integer math vs. float math...what I was doing was turning the resulting 4/3 value into a float.

What's 4/3 using integer division? 1!

So I have been passing 1.0 this entire time.

Now to re-sizing/re-placing all of my assets!

Login to post a reply

Server time is: 2024-04-23 18:37:54
Your offset time is: 2024-04-23 18:37:54