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 / Tier2: Can AGK run apps in 640x960 and 720x1280 properly when using SetDisplayAspect?

Author
Message
ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 29th Nov 2012 08:18 Edited at: 29th Nov 2012 08:28
I'm having two issues:
I'm working in Tier 2, Template 1.076, and I'm working with the percentage based system.

First issue,
In Visual Studio 2008, I set the device width and height in the core.cpp file and the DEVICE_HEIGHT function is not returning the correct number. Please see attached screenshot of different resolutions. And eventhough 640x960 is not listed doesn't have the correct height value neither.

Will this affect the functionality of the SetDisplayRatio function?

However, it does show the correct height value when ran on the Galaxy S3 which has a resolution of 720x1280, but it doesn't fill the screen.

Second issue:
I'm trying to get the entire screen to be filled using the percentage based system and it works in Tier 1, vs 1.07, and in Windows as long as the resolutions are 320x480 and 480x640.

But when I get to higher resolutions like 640x960, it runs but the entire screen is not filled and the ratio I have set to .66.

Now when setting the resolution to 720x1280 it doesn't work at all. The screen doesn't even popup to show the program running, and I have the ratio set to .56.

Here are my examples:

The background is 640x960.
Here is the code I'm using:

//Tier 1 (320x480) - works fine


//Tier 1 (480x640) - works fine


//Tier 1 (640x960) - doesn't work



Tier 2 example

The width and height is 640x960, it runs in windows but doesn't fill the screen.



And by using the percentage system, I get none of it to fill the screen in Tier 2 on the Galaxy S3. It has black borders on the top and the bottom.

Attachments

Login to view attachments
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 29th Nov 2012 08:50
All is working on this end however I'm using VS2010 and so using different .libs.

When setting the display aspect, try this agk::SetDisplayAspect(-1). This sets the aspect appropriately to the ratio of the screen's width and height.

Rickynzx
12
Years of Service
User Offline
Joined: 19th Dec 2011
Location: Troon, Scotland
Posted: 29th Nov 2012 12:47
Hi

I had the same problem when trying to find out the device height and width.

If you use the command getvirtualheight() and getvirtualwidth() it should solve the problem.

not sure if that works in tier 2 as i use tier 1, but it worked for me.

Rickynzx
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 29th Nov 2012 15:54
Quote: "If you use the command getvirtualheight() and getvirtualwidth() it should solve the problem."

This works when using the virtual resolution setup. ThrOtherJoJo is using percentage.

@ThrOtherJoJo, this might be a dumb question, but what resolution is your Windows display set to?

Cheers,
Ancient Lady
AGK Community Tester
ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 29th Nov 2012 16:35
@AncientLady
The Windows display is 1280x800.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 29th Nov 2012 17:25
Quote: "The Windows display is 1280x800."

This explains why your app has difficulty setting and reporting a height of 960.

Unfortunately, trying to force it to use a height greater than 800 by setting the value in the Core.cpp won't work. The AppGameKit engine tries to accommodate you with as much as possible, allowing for borders and such. But it cannot display more pixels than are available.

Unfortunately, the Windows setup for AppGameKit cannot actually get the real resolution of the display.

Even if you try to use Virtual Resolution and set the height to more than the device actually supports, it won't work (I just tried).

Cheers,
Ancient Lady
AGK Community Tester
ThrOtherJoJo
12
Years of Service
User Offline
Joined: 24th Mar 2012
Location: California
Posted: 29th Nov 2012 17:59
@Ancient Lady

Ah. Should have realize that. I was thinking totally wrong. Geez.

Thanks, Ancient Lady.

Login to post a reply

Server time is: 2024-05-02 05:40:07
Your offset time is: 2024-05-02 05:40:07