Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Scaled sprite size  (Read 1715 times)

0 Members and 1 Guest are viewing this topic.

Masaru

  • Newbie
  • *
  • Posts: 8
    • View Profile
Scaled sprite size
« on: October 05, 2014, 11:42:09 am »
Hey,

I am planning to develop a 2D Arcade game. Since I am the only one in my team, I need to manage the programming as well as the designing. I think I will stay with little pixel sprites. Now I have the problem that I don't know how I should scale them for each screen resolution. I have a 1920x1080px screen and the character is for example 64x128px big. What factor would be optimal? Any tips?

I hope my english is understandable :)

Xornand

  • Jr. Member
  • **
  • Posts: 78
  • C++ / Python
    • View Profile
Re: Scaled sprite size
« Reply #1 on: October 05, 2014, 01:06:14 pm »
I wonder why would you want to scale raster graphics. Scaling up will always make your images look more pixelated, while scaling down will lose some detail.

If you care about not screwing up the quality of your images, you should either settle on one fixed resolution or make it resizable in a way, that you'll simply draw more stuff on the screen (to fill up the empty space).

However, if you really insist on scaling up/down the images, then using vector graphics will be a much better approach.

Masaru

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Scaled sprite size
« Reply #2 on: October 05, 2014, 01:24:04 pm »
Thanks for the reply. I do not insist on scaling the images. I just wondered how it would be fair for every screen resolution. But this way only a fixed window size would solve the problem I think

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Scaled sprite size
« Reply #3 on: October 05, 2014, 06:47:05 pm »
There are many ways to go about it. The most simple one would be to simply adjust the view to keep the aspect ratio. Working correctly with the view will upscale your images automatically.
As pointed out scaling pixel images will make things look quite pixelated.

One way would be to use higher resolution images and in some cases having multiple resolutions/quality of details will allow you to control the details of a multiple window resolution ranges.

The question you basically have to ask yourself is: What am I going to do with the amount of new pixels for higher resolutions?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything