Does drawing a transparent tile 'cost' memory

W

whale_cancer

Guest
Optimization is my weakness.

The question is as it says on the tin. If I add a tile to a room, but that tile is just 16x16 of transparency, does this take up memory? If it does, does it take up as much memory as a normal 16x16 tile?
 

TheouAegis

Member
You mean a tile that is just the "background" of the background with 0 alpha?

Yes it still takes up memory. GM has to loop through every pixel in the tile and test its opacity. It has no way of knowing if the tile is entirely transparent or not.

With that said, leaving out the tile wouldn't hurt your performance too much. 900 tiles vs. 1000 tiles isn't that significant in scale.
 
W

whale_cancer

Guest
You mean a tile that is just the "background" of the background with 0 alpha?

Yes it still takes up memory. GM has to loop through every pixel in the tile and test its opacity. It has no way of knowing if the tile is entirely transparent or not.

With that said, leaving out the tile wouldn't hurt your performance too much. 900 tiles vs. 1000 tiles isn't that significant in scale.
Thanks! That's what I wanted to know. Sloppy editing in my map editor can sometimes leave stray blank tiles.
 
Top