• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Graphics Best way to decrease image size?

Aaron Craig

Member
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?
 

Attachments

W

Widget

Guest
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.
 

Aaron Craig

Member
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.
 

Rayek

Member
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:

Aaron Craig

Member
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.
 

Rayek

Member
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.
 
S

Sabrina Stoakes

Guest
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.
 
D

Deleted member 13992

Guest
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.
 
Top