• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Need help in picking resolution

Zuljaras

Member
Hello everyone!

Currently my game is with view (resolution) of 400x300. However I found that this "custom" resolution is not optimal. I read and read and saw that for pixel art games the perfect resolution is something very important.

I am attaching a screenshot of my game. 1scr con.png

I want to change that but I find it very difficult to pick a resolution. The reason is that I have to change my menus because they are rooms in which I navigate with views and every change in the resolution makes me to change the room layout.

I am willing to make it work but only once because changing resolutions constantly is just stupid.

I will scale the game pixel perfect depending on the monitor or device. Recently I exported the demo of the game to android and the result is nice but I still get too big black borders. I want them to be smaller.

I believe that by changing the resolution I will achieve that on every device or PC.

So could some of the more experienced people here tell me a resolution that is closer to my custom thing but able to scale (multiplied by even number) beautifully.
 

Zuljaras

Member
Bump because the thread was moved.

I have tried to find a way to cover both 720 and 1080 up scaling but the one requires 270p the other 240p I am unable to combine them :(
 

Zuljaras

Member

This might help you
Thank you I saw that and I understand it. I rescale my game to even multipliers but my concern is the resolution.
My game looks pixel perfect on all monitors but I am trying to make the black borders top and bottom smaller. I know they WILL exist in different resolutions but I want to minimize this letterbox effect as much as possible so I was thinking about 480x270 or 400x270 or 480x240 but I still have to consider other options.

Any input from people who have finished games for PC and ported them after that on android or iOS is appreciated.

BTW I use the scaling method from these forums called "How to properly scale your game!".
 

Zuljaras

Member
What about 512x360. I think this will fit better and it will only have black borders from left and right most of the time.
x1 = 512x360
x2 = 1024x720
x3 = 1536x1080
 

RangerX

Member
What's important is indeed for your game to look good in most screens without having too much deformation or black bars.
For this you need to know what are the most common resolutions your audience is using. For gamers the most common one is 1920x1080 (Full HD as they call it in the industry). You should optimise your game for that size in my opinion.
Second most common resolution is 1366x768. Here again its a 16:9 screen ration just like "Full HD". However, its hard to optimise a game for both resolutions so that's why I would optimise thinking about gamers.

Your game could be, per example, 480x270.
Not only this is extremely similar to consoles in the 80s and 90s (Nes, SNES, Megadrive, etc) but this scales perfectly to 1920x1080.
 

Zuljaras

Member
What's important is indeed for your game to look good in most screens without having too much deformation or black bars.
For this you need to know what are the most common resolutions your audience is using. For gamers the most common one is 1920x1080 (Full HD as they call it in the industry). You should optimise your game for that size in my opinion.
Second most common resolution is 1366x768. Here again its a 16:9 screen ration just like "Full HD". However, its hard to optimise a game for both resolutions so that's why I would optimise thinking about gamers.

Your game could be, per example, 480x270.
Not only this is extremely similar to consoles in the 80s and 90s (Nes, SNES, Megadrive, etc) but this scales perfectly to 1920x1080.
I agree that it scales perfectly to 1920x1080 but I still think that I am missing important resolutions like 720p.

Here is the chart:
480x270
960x540
1440x810
1920x1080

Btw what is the resolution of your game? Its native resolution?
 
Last edited:
B

bdmarvel

Guest
Simple method:

Determine your height and scale the width accordingly.

You can divide the display width by the display height to get the aspect ratio of the display. Then multiple by your already determined height to get your new width. If your width is an odd number, add 1 to make it even.

Code:
// Example
screen_h = display_get_height();
screen_w = display_get_width();
game_h = 360; // Or whatever height you want
game_w = floor((screen_w / screen_h) * game_h);
if game_w * 0.5 != floor(game_w * 0.5) game_w += 1;
This method is not pixel perfect, but it's simple and will automatically scale to any display size. If you're looking for a similar but more pixel perfect solution, you could try finding the nearest game resolution to the native display resolution and draw your game to a surface at that resolution with interpolation off, then scale that surface onto the application surface with interpolation on. I've had success with that method in the past.
 

RangerX

Member
I agree that it scales perfectly to 1920x1080 but I still think that I am missing important resolutions like 720p.

Here is the chart:
480x270
960x540
1440x810
1920x1080

Btw what is the resolution of your game? Its native resolution?

My game is a wierd dog though. I once made a "game" with the level editor of another game called Knytt Stories (excellent Metroidvania by the way). The Life Ruby is sort a full fledged remake of my ideas that were in that "game" of mine.
Also, I am re-using most graphics assets and the resolution of the old game wasn't ideal. Since I don't want to completely redo all the graphics, my game is optimised for 1600x900. The native resolution is 800x450 but my assets are scaled by 2. Long story short, the game looks like 400x225, is rendered at 800x450 and scales up perfectly to 1600x900. I don't mind it much not being optimised for 1920x1080 given my context. Having a bit of letterboxing going on sort if is giving the game a style.

 

Zuljaras

Member
My game is a wierd dog though. I once made a "game" with the level editor of another game called Knytt Stories (excellent Metroidvania by the way). The Life Ruby is sort a full fledged remake of my ideas that were in that "game" of mine.
Also, I am re-using most graphics assets and the resolution of the old game wasn't ideal. Since I don't want to completely redo all the graphics, my game is optimised for 1600x900. The native resolution is 800x450 but my assets are scaled by 2. Long story short, the game looks like 400x225, is rendered at 800x450 and scales up perfectly to 1600x900. I don't mind it much not being optimised for 1920x1080 given my context. Having a bit of letterboxing going on sort if is giving the game a style.

That is what i was wondering if people mind the black bars/borders. I am worried just by that. However i am sure that there is no way to make pixel perfect game to fit all fulscreens and not to have distorted pixels(artifacts).
 

RangerX

Member
You would never see a pro game with unnecessary pixel distortion. There has been and there still are games with some letterboxing going on at certain resolutions.
Letterboxing > Graphic damage
 

Zuljaras

Member
Simple method:

Determine your height and scale the width accordingly.

You can divide the display width by the display height to get the aspect ratio of the display. Then multiple by your already determined height to get your new width. If your width is an odd number, add 1 to make it even.

Code:
// Example
screen_h = display_get_height();
screen_w = display_get_width();
game_h = 360; // Or whatever height you want
game_w = floor((screen_w / screen_h) * game_h);
if game_w * 0.5 != floor(game_w * 0.5) game_w += 1;
This method is not pixel perfect, but it's simple and will automatically scale to any display size. If you're looking for a similar but more pixel perfect solution, you could try finding the nearest game resolution to the native display resolution and draw your game to a surface at that resolution with interpolation off, then scale that surface onto the application surface with interpolation on. I've had success with that method in the past.
That is nice but my menu in the game requires poxel perfect graphics because it is in another room and it is controlled by views go get to other sections in the menu. That means that if i toy with the resolution in runtime i might get some part of the screen cut.


You would never see a pro game with unnecessary pixel distortion. There has been and there still are games with some letterboxing going on at certain resolutions.
Letterboxing > Graphic damage
Thank you again. I will just pick a resolution close to mine that covers most resolutipns closely and leave it at that.
I have wasted too much time in stuff like that.
 

Niels

Member
I am already using it. I just wondered if the black bars are such a big issue for people since we can't avoid them if we want pixel perfect games.
Binding of Isaac has black bars, and noone seems to care/notice.
Hell, Undertale doesn't even have a fullscreen mode..

A good game is a good game, black bars is just a minor thing. (stretched graphics on the other hand can ruin your game)
 

Zuljaras

Member
Binding of Isaac has black bars, and noone seems to care/notice.
Hell, Undertale doesn't even have a fullscreen mode..

A good game is a good game, black bars is just a minor thing. (stretched graphics on the other hand can ruin your game)
Thank you!
 
S

Sake_v2

Guest
I don't know if you still need any advice, but after researching and trying a lot and worrying with the black bars size and if black bars affect people's enjoyment of the game or not, I can tell you how I'm making my game work.

For an example, one "way" of doing it (not workable in your case, just mentioning it) would be to put the view width and height the size of the player's computer screen size, as this would not need black bars and it could also be pixel perfect (kind of, in theory), depending on the person's computer screen size more objects of the room would appear, but that's it. But for a game with "not high" resolution like yours and mine (yours 400x300) this wouldn't work, as there are people with 4k monitors, or even 1920x1080, etc. The solution I have, that doesn't need black bars and is pixel perfect on (pratically) every monitor is to just check for the display aspect ratio and set a multipliable view size.

Example, the smallest computer screen size (I think) its 1024x768 (this is my screen size) which is 4:3. You can't ignore people with this resolution and have giant black bars, so I check in some object create event of my game, and if it is 4:3, set the view size to 512x384. That way, 512x384 (x2) = 1024x768. Then check if it is 16:9, full HD (most common) like 1280x720 or 1920x1080. If it is, set the view size to 640x360, so that way (x2) it can fit both 1280x720 and 1920x1080, and the difference of 512x384 and 640x360 is not that big, its a loss of 12 pixels on the top and 12 at the bottom, and add only 64 pixel at each side. No black bars, and pixel perfect. But be aware that if you do this, you need to draw stuff to the view relatively to its size, by that I mean don't draw stuff like view_yview[0]+100, it could draw off screen on certain monitor sizes, draw it like view_yview[0]+view_hview[0]-10, for an example (maybe you know that but just in case).
EDIT:
Forgot to mention, or you could use Draw GUI. But either way, you should start testing if the thing you need to draw fits on the smallest size (1024x768) and if it fits, improve from there.

This might not work at your game if those 12 pixels and 64 pixels on each side make a difference, but generally it should. Its the best solution I can find, and no black bars (I personally don't like black bars and maybe I mind it, depending on the game).
 

JackTurbo

Member
Second most common resolution is 1366x768. Here again its a 16:9 screen ration just like "Full HD". However, its hard to optimise a game for both resolutions so that's why I would optimise thinking about gamers.
Let me preface this by saying that all the info you've supplied is excellent and very informative.

However the pedant in me needs to flag that 1366x768 is actually a ratio of 683:384 and isn't 16:9.
 

RangerX

Member
Let me preface this by saying that all the info you've supplied is excellent and very informative.

However the pedant in me needs to flag that 1366x768 is actually a ratio of 683:384 and isn't 16:9.
For the sake of clarifying, yes indeed 1366x768 is not "true 16:9" ratio. Its a wierd bastard ratio that should never have existed but its generally flagged as 16:9 and I did not want to create more confusion for such a small difference:

1920/1080=1,77777777777778
1366/768 = 1,77864583333333

But yeah, if we want to be perfectly factual, its a different screen ratio. :p
 
Top