Page 1 of 2
What is the best way to deal with resolution?
Posted: Wed Dec 31, 2014 5:37 pm
by Jeeper
I recently started working on a game that is not going to be pixel art and am now running into a minor dilemma. I am not sure what the best way to allow people to have resolution options would be.
As we are only two people, making multiple resolutions for each art asset seems like a hug effort, but maybe having 2 set or something like that would be sufficient. Down-scaling from a higher resolution could also work, but certain things like sharp lines get wonky.
Does anyone have tips or suggestions, maybe a library or such to help?
Re: What is the best way to deal with resolution?
Posted: Wed Dec 31, 2014 6:56 pm
by adrix89
If you draw for a target of 720p or 1080p I don't think anyone would complain.
Outside of scaling another option you can have is just have a bigger viewport on higher resolution with native assets, with the option to scale if they want.
Your job is to give enough options so the players can configure it for their needs.
Re: What is the best way to deal with resolution?
Posted: Wed Dec 31, 2014 7:33 pm
by Jeeper
adrix89 wrote:If you draw for a target of 720p or 1080p I don't think anyone would complain.
Outside of scaling another option you can have is just have a bigger viewport on higher resolution with native assets, with the option to scale if they want.
Your job is to give enough options so the players can configure it for their needs.
The bigger viewport option is an idea that I have considered, the obvious drawback being that people on lower resolutions are at a gameplay disadvantage compared to people with higher resolutions.
Re: What is the best way to deal with resolution?
Posted: Wed Dec 31, 2014 8:16 pm
by davisdude
You could use a method described in
this post.
Re: What is the best way to deal with resolution?
Posted: Wed Dec 31, 2014 8:26 pm
by adrix89
Jeeper wrote:adrix89 wrote:If you draw for a target of 720p or 1080p I don't think anyone would complain.
Outside of scaling another option you can have is just have a bigger viewport on higher resolution with native assets, with the option to scale if they want.
Your job is to give enough options so the players can configure it for their needs.
The bigger viewport option is an idea that I have considered, the obvious drawback being that people on lower resolutions are at a gameplay disadvantage compared to people with higher resolutions.
You can still them the option of scaling if they want. It would not be as good as having native resolution assets but scaling is not that big of a deal.
Re: What is the best way to deal with resolution?
Posted: Thu Jan 01, 2015 8:57 pm
by Evine
mipmap filter is your friend when it comes to thin sharp lines.
https://www.love2d.org/wiki/(Image):setMipmapFilter
Code: Select all
Image:setMipmapFilter( "linear", 0) -- For best thin lines
Did you see the post I just made about this. Take a look. (The code isn't that much tested, so yell at me if something doesn't work. edge blending is a bit Wonky as of now.)
viewtopic.php?f=4&t=79360
Re: What is the best way to deal with resolution?
Posted: Fri Jan 02, 2015 2:30 am
by Jeeper
Thanks! Ill have a look at that
Re: What is the best way to deal with resolution?
Posted: Wed Jan 07, 2015 6:59 am
by micha
When I started my game, I decided that I don't want to scale any images and that I don't want to change the players resolution. Therefore I went with source images in different sizes. On startup the game determines the current screen size and selects the image size such that approximately the same number of tiles fit into the screen.
All my graphics are done in Inkscape so it is not a lot of work to render them in various sizes. I am not particularly happy with solution, though. The finished game will have each image multiple times which makes the file size unnecessarily large. If you come up with a better solution, then let me know.
I decided against scaling images, because they would lose their smooth look.
Re: What is the best way to deal with resolution?
Posted: Wed Jan 07, 2015 7:43 am
by Sapper
Try drawing everything to a canvas at the native resolution.
That way at load time you could just calculate the closest int to scale the canvas to.
youll have to deal with black borders in fullscreen-mode if the users aspect ratio doesnt match up though.
Re: What is the best way to deal with resolution?
Posted: Wed Jan 07, 2015 11:14 am
by micha
I don't use pixel art. Originally I was aiming for a resolution of about 1280x800. If I determine the closest integer scaling factor, it will almost always be 1. And then I would have to accept that some people can see a larger part of the map than other, which I don't want.