Sign in to follow this  
deadlydog

How to adjust for screen resolution?

Recommended Posts

deadlydog    170
I'm sure this question has probably been asked before, so if you wanna just point me to other threads that've answered it that's fine, or you can just give me answers yourself. I wasn't able to find too much doing a quick search: When you want to give the user the option of specifying the screen resolution, how do you specify movement amounts, and the size of textures/graphics? What I mean by this is currently I have my game set to 640 x 480, and when the user presses the left arrow their character walk 10 pixels to the left. Now if I was to change the screen resolution to 800 x 600, if I still move have the character move only 10 pixels when they press left, they won't be walking "as far" as before, relative to the world around them. How do you avoid this problem? Use percentages of the screen height/width instead of pixel values? or just multpily the movement velocity by some ratio value? For example, when running at 640 x 480 multiply the XYZ movement values by 1, when running at 800 x 600 multiply the XYZ movement values by 1.25 (800/640 = 1.25 and 600/480 = 1.25) and so on? And the same thing goes for applying the graphics. If I draw a 100 x 100 character on 640 x 480, it is going to appear much "larger" on the screen than if I was to draw it on 800 x 600, but I believe you want everything to still stay the same size on the screen, it should just be more detailed on the larger resolution (because it's using a higher resolution). How do you avoid this? Scale all the graphics according to the screen height/width by some factor (1 for 640x480, 1.25 for 800x600)? So I guess what I'm asking is do you just render everything in terms of a percentage of the screen size from the get go, or do you just code the game specifically for one screen size first, then scale it according to some other value if need be (such as 1.25 for 800 x 600). Or is there another way to do it that I'm not thinking of? Thanks!

Share this post


Link to post
Share on other sites
Facehat    696
Either way would work fine, I can't imagine one being inherently better than the other.

However, if you choose one resolution to be the "base" resolution, I would go for a higher resolution than 640x480. The primary reason being that if you design all your artwork to look good at 640x480, it's going to look pretty ugly at 1600x1200 since you'll have to stretch it. On the other hand, if you design all your artwork for a high resolution screen, it should scale down to 640x480 reasonably well. (In other words, it's always better to scale images down than it is to scale up).

Share this post


Link to post
Share on other sites
yckx    1298
Distance is often defined in world units instead of screen units. That way it doesn't matter in what resolution it's displayed. If your world is larger than the window in which it is displayed, you can simply show more of the world, and keep distances and sizes at the same pixel amounts. I think that's what older, sprite-based RTSs did.

Share this post


Link to post
Share on other sites
PcChip    122
look at starcraft, one resolution only, they didn't want to re-draw all the sprites for different resolution, and they didn't want some players to have an advantage by being able to see more of the map at higher resolutions.

Modern games can use higher resoultion because they're mainly 3D, and higher res just means sharper 3D images

if you feel like drawing all your artwork twice, do like an 800 x 600 version and an 1024 x 768 version, or something like that.

if you don't re-draw your artwork for higher resolutions, but just have your game 'scale' up your artwork, then what's the point of the higher resoultion? you won't be getting more detail out of "scaled" artwork

Share this post


Link to post
Share on other sites
deadlydog    170
Quote:
if you don't re-draw your artwork for higher resolutions, but just have your game 'scale' up your artwork, then what's the point of the higher resoultion? you won't be getting more detail out of "scaled" artwork


Like The Senshi said, you should draw your artwork for the higher resolution, then scale it down if you need. In this case, there would be a 'point' to it as the higher resolutions would look better.

The reason I was wondering is I was taking a look at some of the Windowed games in the GD Showcase, and some were very small because they ran at a set resolution. In these cases it would be nice if you could adjust it to a higher resolution. But for full screen games 2D games your right, there wouldn't be much of a noticable difference.

Share this post


Link to post
Share on other sites
nife    235
Quote:
Original post by deadlydog
These were just my guesses on how it could be done. Is this the technique they use in commercial games?


The menu screen in Quake 3 is scaled up to the current from 640x480, so yes some games are using this technique.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this