RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED] Resolution on wide screen monitors

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 87
Does anyone know if it's possible, via script, to check the resolution of a monitor and change the game resolution accordingly?

If the game runs in a window, it's fine.  If it runs in widescreen on a monitor with an aspect ratio of 4:3, it's fine.  But on a widescreen monitor in full screen, the game is stretched and the characters look squashed and flat.

Is it possible to detect this, and if the aspect ratio is not 4:3, add black bars at the side so the image isn't stretched?
« Last Edit: June 13, 2009, 11:28:53 PM by shaz »
Always remember you're unique.
Just like everybody else.

**
Rep: +0/-0Level 87
I've been making a game using a widescreen monitor for a while now and have a script that automatically runs the game on full screen when you playtest it. I took some screenshots the other day to post on a website and saw my game in the normal resolution and now everything looks squashed the other way. I had got so used to the widescreen monitor that my game doesn't look right in the correct resolution. Some rooms and the text are too thin, etc.
Saying that, I too, would be interested to know if this is possible.
« Last Edit: June 11, 2009, 05:54:55 AM by Crab Buster »

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
You can use GetSystemMetrics in user32 for that.
Ref: http://msdn.microsoft.com/en-us/library/ms724385(VS.85).aspx

Illustrary code:
Code: [Select]
SM_CXSCREEN = 0
SM_CYSCREEN = 1

user32 = Win32API.new('user32', 'GetSystemMetrics', ['I'], 'I')

w = user32.call(SM_CXSCREEN)
h = user32.call(SM_CYSCREEN)

p w,h

I hope you can figure out the rest ^_^

*hugs*

*
Rep:
Level 87
ah, you're so helpful but so mean :D

ok - I know what you're getting by doing that, but what do you do with it?  Is it another call to the API to resize the "window" or do I have to do something to the viewport or something?
Always remember you're unique.
Just like everybody else.

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
You know I cannot simple give you the full answer.
There are resolution scripts out there. I suggest you take a look them.
You can calculate the size of the black borders from the information of the resolution.

Good luck.

*hugs*

*
Rep:
Level 87
Well, you COULD simply give me the answer, but you're right - I should know you better than that :D

Thanks Zeriab.

I'm going to mark this one as resolved, even though I don't have the full solution yet.
Always remember you're unique.
Just like everybody else.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
You should keep it open and let us know when ya do find your solution then you can post it here so that if other members have the same question they can refer to this topic. :)

*
Rep:
Level 87
lol - I thought about that, but figured if Zeriab's making me work for it, other people can too :D

In truth, what I've found so far on the subject of changing resolution is script-invasive enough that I am unlikely to attempt to add it to the game at this stage.  I will put it on hold for another month or more.
Always remember you're unique.
Just like everybody else.