Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED] Resolution on wide screen monitors

Started by shaz, June 10, 2009, 10:23:20 PM

0 Members and 1 Guest are viewing this topic.

shaz

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?
Always remember you're unique.
Just like everybody else.

Crab Buster

#1
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.

Zeriab

You can use GetSystemMetrics in user32 for that.
Ref: http://msdn.microsoft.com/en-us/library/ms724385(VS.85).aspx

Illustrary code:
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*

shaz

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.

Zeriab

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*

shaz

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.

Grafikal

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. :)

shaz

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.