Included File draw limit

CloseRange

Member
I've been playing around with some pretty big images through included files, the biggest file I have so far is 16836 x 69
The image looks perfectly fine for the most part pixel perfect no blur or anything except at the very end of the image.
Past the 2^14 mark on the width the image is essentially gone and instead draws a long streak of the last pixel as if it was smeared along the image.
I used the simple solution of just not drawing past 2^14 but I was mostly curious about what was so special about 2^14 and how come every other source I found told me not to draw past 2048 pixels. It seems to run fine with a big image like this.
 

rIKmAN

Member
I've been playing around with some pretty big images through included files, the biggest file I have so far is 16836 x 69
The image looks perfectly fine for the most part pixel perfect no blur or anything except at the very end of the image.
Past the 2^14 mark on the width the image is essentially gone and instead draws a long streak of the last pixel as if it was smeared along the image.
I used the simple solution of just not drawing past 2^14 but I was mostly curious about what was so special about 2^14 and how come every other source I found told me not to draw past 2048 pixels. It seems to run fine with a big image like this.
Because that image won't fit on a single texture page GM will resize it by half over and over until it does, the default texture page size in GM is 2048x2048 but you can change this yourself in the options upto a max of 8192x8192, although this may cause problems on some hardware (especially mobile). This operation is usually logged in the console when you compile.

Not sure if this is causing your exact issue, but it usually results in lower image quality due the resizing, and I'd advise chopping up that image into smaller ones that fit within your chosen texture page size and then stitching them back together by drawing them individually at runtime.
 

TsukaYuriko

☄️
Forum Staff
Moderator
Note that this is not limited to sprites that were dynamically created from an included file - the same hardware restrictions apply to static sprites, and with images that big, you're bound to run into issues at least on lower-end devices, if not high-end devices.
 
Top