• 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] Texture pages, sprite size and cropping

Hello all,

Regarding texture pages, and the cropping of sprite images, the GM documentation provides the following:
[snip] When you add sprites into GameMaker: Studio, if they have any "space" around them (ie 100% transparency) this is automatically cropped when it is added into the texture page.
However, I am still not 100% sure what this equates to.
For the sake of example only, if I add 500 png image files each with a total width and height of say, 256x256 pixels but inside each png only a 32x32 pixel 'tree' exists (the surrounding pixels being 100% transparent), how many texture pages will I use? Enough to store 500, 32x32 sprites or 500, 256x256 sprites?

Nathan
 
A

anomalous

Guest
It depends on your texture page size doesn't it?
The manual is correct, it will remove transparency from graphics when it adds them to the texture page. It may buffer them a little, so don't calculate how big it is and assume it's OK.

Look at your texture page to answer your question directly
resouce>change global game settings>windows>graphics>preview (on right side under texture page)
 
OMG I totally didn't know these options existed! Thank you! And yes, seeing the actual texture page contents answered my initial question!
But now I have more questions!

Is there a way to prevent GM from re-writing the texture pages every time a project is closed and reopened (and run)?

I thought GM was limited to a 2048x2048 texture page. However, it goes up to 8192.
Some quick Googling turns up various discussions on 'safe', practical texture page sizes, but can we get a reasonably definitive answer here on the GM forums? (maybe difficult given the differences in people's hardware)
 
A

anomalous

Guest
Texture pages are mostly automated for you by GMS, there is not a lot of control you have over them (there is a little)
You cannot stop it from recreating the texture page, but if you have not updated sprites/backgrounds (etc) since last run, it will not regen it, it will use the current one.

Remember, when you compile your game for real, it will create the texture pages, then put those in the game...it never has to do all that compile stuff with a final .exe

2048x2048 seems the safe choice last I checked.
For windows, you may be able to get away with 4096, that's what I'm using but I have not released so I have no idea if its going to be an issue.
 
Top