Jump to content
  • Advertisement
Sign in to follow this  
scarypajamas

Best way to scale images?

This topic is 3274 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, so I got my game menu, and I have it so the buttons, images, and background scale accordingly to the resolution. The problem is I'm trying to find out the best way to scale my images without them looking stretched or pixelated. I assume there are some techniques for this? After all, how do all the 2d games do it?

Share this post


Link to post
Share on other sites
Advertisement
Or you can just show more of the game world at larger resolutions. That way you don't have to worry about different sized sprites. Of course, this could cause difficulty balancing issues, but that depends on the kind of game.

Share this post


Link to post
Share on other sites
What about using a higher-quality picture to begin with, and just shrinking it down for the lower resolutions?

Share this post


Link to post
Share on other sites
Scale up and it pixelates. Scale down and you lost details - sometimes important ones. Best solution is to scale w/bilinear filtering. If you're using direct3d or the likes, you can get this automatically by lettings your textures be mipmapped and having the largest size you'll need on disk. When you scale down it'll select the best calculated-mipmap and you won't lose pieces of information though the details will be slightly blurred.

Share this post


Link to post
Share on other sites
Quote:
What about using a higher-quality picture to begin with, and just shrinking it down for the lower resolutions?


I've thought about this, but I'd like to try and find a solution that won't increase the download size.

Quote:
Scale up and it pixelates. Scale down and you lost details - sometimes important ones. Best solution is to scale w/bilinear filtering. If you're using direct3d or the likes, you can get this automatically by lettings your textures be mipmapped and having the largest size you'll need on disk. When you scale down it'll select the best calculated-mipmap and you won't lose pieces of information though the details will be slightly blurred.


I'll look into filtering.

Thanks for your suggestions everyone.

Share this post


Link to post
Share on other sites

Break things like UI buttons into 9 parts. For example, never scale the corners. Only scale the sides vertically or horizontally. Only scale the center both vertically + horizontally

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!