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.

DarkBASIC Professional Discussion / Screen Resolutions and Pixel Aspect Ratios

Author
Message
bjadams
AGK Backer
17
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Jun 2008 18:49
I am using Set Display Mode 1024, 768, 32 on a 4:3 screen. This opens a full screen and all works as it should.

However if I run the same game on a 16:9 widescreen, all is stretched lenghtwise.

Is there a way to set Set Display Mode to use 16:9 to have a correct pixel aspect ratio?
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 9th Jun 2008 18:57
Set Camera Aspect

HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Jun 2008 18:59
on my wide screen I can do :-

1024x768
1280x768
1360x768
1366x768

whether any of those value will work only trying will find out.

Dark Physics makes any hot drink go cold.
bjadams
AGK Backer
17
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Jun 2008 20:14
thanks a lot Dark Coder, works perfectly.

Now I just need to find the real aspect ration of the user's monitor (4:3 or 16:9) so that i can set my screen mode the right way.
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 9th Jun 2008 20:50
Read the help files on it, it says screen width/height, so assuming your app is set to the user's desktop resolution or something they pick it's just a simple divide, but make sure it's a float divide and not an integer one, else you'll end up with a value of 1 all the time.

bjadams
AGK Backer
17
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Jun 2008 21:32
screen width/height will give the same result on 4:3 and 16:9 so its a bit more complicated than that!

for example my desktop pc monitor 4:3 is set to 1024x768, and my laptop 16:9 is also set to 1024x768, but obviously the pixel aspect ratio is different
=PRoF=
22
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 9th Jun 2008 21:38 Edited at: 9th Jun 2008 21:40
I default my games in 800 x 600 (a fairly "safe" resolution) and then let the user pick an appropriate resolution from inside the game by way of a list of available resolutions in the options menu of the game.

That way those who have widescreen can choose wide screen resolutions.

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Scurvy Lobster
19
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 10th Jun 2008 11:55
A lot of widescreen monitors are actually 16:10 format. A common resolution is 1440x900.
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 10th Jun 2008 12:18
Quote: "for example my desktop pc monitor 4:3 is set to 1024x768, and my laptop 16:9 is also set to 1024x768, but obviously the pixel aspect ratio is different"


If your laptop is 16:9 then your maximum resolution isn't 1024*768, it's probably 1280*720 or 1920*1080 so it's your fault for not setting it correctly, the aspect ratio is exactly width/height.

Login to post a reply

Server time is: 2025-06-20 04:56:27
Your offset time is: 2025-06-20 04:56:27