It depends what your minimum specification is.
If you want your game to work on a 600MHz PC with 8mb onboard graphics, then its no good supporting a minimum of 1024x768.
My game supports up to four fixed resolutions (as many as are available on the users PC); 640x480, 800x600, 1024x768 and 1280x1024, all in fullscreen and windowed.
My default resolution is 800x600 fullscreen, as this seems to be the preferred default setting for portals.
The way I do it, is to have a tX:Float() and tY:Float() function. When I set a graphics mode, I get a ratio and store it - game logic is always based on 800x600:
Then, where I normally have:
This becomes:
As I said before, the game logic is always running at 800x600, so I don't need to include this transformation in sprite movements etc. Its just the visual representation of the game thats scaled. So, any occurences of setScale, or screen coordinates must be multiplied by xRatio or yRatio - thats what tX() and tY() do.
If you want your game to work on a 600MHz PC with 8mb onboard graphics, then its no good supporting a minimum of 1024x768.
My game supports up to four fixed resolutions (as many as are available on the users PC); 640x480, 800x600, 1024x768 and 1280x1024, all in fullscreen and windowed.
My default resolution is 800x600 fullscreen, as this seems to be the preferred default setting for portals.
The way I do it, is to have a tX:Float() and tY:Float() function. When I set a graphics mode, I get a ratio and store it - game logic is always based on 800x600:
Function initialiseScaling() xRatio:Float = GraphicsWidth()/800.0 yRatio:Float = GraphicsHeight()/600.0 End Function Function tX:Float(val:Float) Return val*xRatio End Function Function tY:Float(val:Float) Return val*yRatio End Function
Then, where I normally have:
SetScale(0.5, 0.5) DrawImage image,x,y
This becomes:
SetScale(tx(0.5), ty(0.5)) DrawImage image,tx(x),ty(y)
As I said before, the game logic is always running at 800x600, so I don't need to include this transformation in sprite movements etc. Its just the visual representation of the game thats scaled. So, any occurences of setScale, or screen coordinates must be multiplied by xRatio or yRatio - thats what tX() and tY() do.