A common technique when you’re trying to squeeze as much performance as possible out of your game is to half the size of certain images then scale them back up at runtime. However there is a slight variation on this approach that could give you the saving you’re looking for without compromising the final render quality of your image so much.

Half Images Along a Single Axis

Sure it makes a lot of sense to half the size of large sprites. It’ll save bags of memory and the GPU won’t be under as much stress. While the image quality will suffer, most users won’t notice the reduction so long as the sprite isn’t something they’ll be staring at for long periods of time.

HalfHorizontalOrVerticle

Source image on left. Compressed image in centre. Final result on right.

If however you do feel the reduction in image quality is too noticeable then try only halving the sprite’s bitmap in size either horizontally or vertically. Then at runtime, scale the sprite back up along that axis.

You’ll find that each axis will give a slightly different result in terms of quality. Depending on the actual source image, one axis might give a better result than the other: you may find that one axis gives a sharper edge whereas the other may give a blurrier edge but retain more detail elsewhere. Either way, you’ll save a huge amount of memory by doing this and I guarantee you’ll be amazed at just how well these images hold up in-game.

Spend some time evaluating both results and then pick the version that best suits your needs. Oh, and if you can get away with it, half your images on both axes for optimal memory consumption and performance.

  1. Hi, I’m really enjoying the tips on your site! I have to say, i don’t usually read tips about scaling up. If anything i read comments against it, but its been my experience that it can be totally great in some cases. I have a 2012 game designed at 960×640. I simply scale it up for each new device as they come out and literally ive had zero complaints about resolution. It looks totally fine on modern QHD phones. No one knows the truth!!!

    This is a great tip, scaling on one axis. I have never seen that before

    Nick f
    • Hi Nick. Thanks for getting touch and really glad you liked the tip. I’ve found that most devices do a great job of applying anti-aliasing when scaling bitmaps, so most people never notice. I’ve managed to squeeze Dare the Monkey down onto a very small number of texture atlases thanks to some creative scaling techniques.

      Alan (Author)