How to properly do resolutions in a game?

Started by Magix, September 28, 2014, 18:16:41

Previous topic - Next topic

Magix

I made one game in LWJGL so far, but it had a fixed screen size. I want to make a 2d game with changeable resolution settings.

- Does this mean that I have to run every vertex and gameplay mechanic (like speed, acceleration etc) through some sort of method that scales the amount based on the resolution? What would this method look like?
- Would I use some sort of "sample" resolution initially or use something like 0-1?
- Would I try to make all my sprites be the maximum resolution, and scale stuff down for the other resolutions?

Of course if I used some more advanced library it would do that stuff behind the scenes, but I'm interested to know as to how one would implement this on their own.

abcdef

You could use mipmap images if you wanted to have the image scaling solved for you. You would create them in the highest resolution you wanted.

In terms of movement mechanics it might make sense to build a scaling based on wither the number of tiles on the screen or the width of a specific time (depending on how you scale your game)