• 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!

Legacy GM [SOLVED] Saving memory by drawing with negative scale

Greetings everyone,

I don't know how Gamemaker handles drawing behind the scenes, and would like to confirm if the following theory has any merit with a view to saving graphics memory;

If I have a perfectly symmetrical image, I could cut that image in half, importing into Gamemaker only this one half of the image. In the draw event of an instance, I would make two draw calls;
Code:
draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
draw_sprite_ext(sprite_index, image_index, x, y, -image_xscale, -image_yscale, image_angle, image_blend, image_alpha);
Notice the negative image scale. Acknowledging that I am now making two draw calls instead of one, does the needed amount of graphics memory equal that of the one image, or, does 'flipping' the image here with negative scale ultimately result in memory use equivalent to two images?

Nathan
 

FrostyCat

Redemption Seeker
It doubles the number of drawing calls, but not memory usage. There is still only one source image and one destination image.
 
Top