Graphics Best way to decrease image size?

Discussion in 'Game Design, Development And Publishing' started by Aaron Craig, Dec 30, 2018.

  1. Aaron Craig

    Aaron Craig Member

    Joined:
    Jun 20, 2016
    Posts:
    30
    I've got fairly large sprites that I don't want to be so big. The original size is around 150x230, and I want them half that for the tileset I'm using.
    I've tried exporting them from the PS file at half size, but they look bad. I've tried halving the size in GMS, but it looks pretty awful, too. Then I halved the size using image_x and y scale and they look great (attached are comparison images).
    This isn't ideal, because then I have to change every sprite to be half the size with of the original. Is there a better way to do it in GMS or PS that I don't know about? Why does it look so much better using image_scales?
     

    Attached Files:

  2. Widget

    Widget Member

    Joined:
    Jun 21, 2016
    Posts:
    72
    Are you saving your image files in JPEG? You probably shouldn't do that as there's always a loss in quality, save it in PNG.

    You could just try MS Paint, since the image is rectangle shaped and doesn't need to be transparent.
     
  3. Aaron Craig

    Aaron Craig Member

    Joined:
    Jun 20, 2016
    Posts:
    30
    The actual sprites I'm using in game are PNGs, these photos are JPGs as they're small in size, allowing me to upload here.
     
  4. Rayek

    Rayek Member

    Joined:
    Jun 27, 2017
    Posts:
    158
    I am confused. Is "half sized sprites" the one you scaled down in Photoshop, or the other one? The "half sized sprites" version is pretty bad indeed. What settings are you using in Photoshop to downscale? Would you be able to share one of sprites for testing?

    *edit* Photoshop is notorious for applying sharpening after a scale-down, btw. And from you screenshots is seems the half sized sprites versions are scaled up by GM?
     
    Last edited: Dec 30, 2018
  5. Aaron Craig

    Aaron Craig Member

    Joined:
    Jun 20, 2016
    Posts:
    30
    Rayek, sorry I wasn't very clear in the names of the photos.
    The "half sized sprites" is when their physical size is reduced by half, either by export or inside of GMS. The "program down sized" is using image_xscale and image_yscale at .5 to achieve the same size, but with better quality.
    Here's the link to the PS files I'm using: https://opengameart.org/content/top-down-sci-fi-shooter-characters-20 - The first link, Top-Down_Shooter_v2_1.psd 3.5 Mb [3513 download(s)].
    I choose the assault layer, right click export as, and then use the default settings. I've tried scaling to 50% there, but the export result looks terrible if I do.
     
  6. Rayek

    Rayek Member

    Joined:
    Jun 27, 2017
    Posts:
    158
    Those screenshots you posted: is that the actual size and resolution of the game? I think it is, because the energy level indicator seems higher resolution in the half sized sprites screenshot. If that is indeed the case, you are up-scaling low-resolution sprites, which would naturally result in those rather fuzzy and low-quality sprites.
     
  7. Sabrina Stoakes

    Sabrina Stoakes Member

    Joined:
    Jul 9, 2018
    Posts:
    75
    You could try creating a script containing the down sizing code and call it in the create event of your objects using the script name and (). So basically if you named your script, "downsize_script" you'd call it in the create event or something like, "downsize_script()" and that's all the code you'd have to put in it. Might not be ideal, but it'd be less work and less cluttered.
     
  8. muki

    muki Member

    Joined:
    Mar 5, 2017
    Posts:
    212
    If you're scaling-up your view in gamemaker, there's no way to scale sprites down in an image editor that would make them look at clean as they do when you scale them down with image_xscale. How to put it.... pixels just don't work that way.

    When you scale down a sprite in an external editor, that detail information is lost. It's gone forever. But image_xscale is a cheat. Say you're scaling up your view by double, but you're halving sprites using image_xscale. Your environment may look blocky if that's the base resolution of the background data, but the sprites still look sharp because (having upscaled your view), there's still enough pixels on screen to resolve that detail.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice