• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Mac OSX What is contained in layer folders for sprites?

I have had trouble with files duplicating in the project folder since the release of GMS 2.3, typically due to sprites corrupting. I ended up finding a way to treat this issue and I've been quashing the corruption whenever it appears, which is no longer very much of an issue to me. However, one place where there were still a lot of duplicate files was in the layers folder of my sprites. It would be time-consuming to delete them all, since in the layer folder of a sprite, there's one folder per frame, each containing an image of the frame.

Last night, though, I took the time to delete these duplicates (after making a backup), and found that deleting all of these spare png files actually INCREASED the file size of the sprites folder, and thus, the project as a whole. Here's a quick example that I found: in my backup folder (so all duplicates are still there), for a given frame of a given sprite, the folder contains the frame png and a duplicate. The total folder size is 8 kb, and each image is 4 kb. In the normal folder (with all duplicates deleted), the image is still 4 kb, and is now the only file in the folder, but the folder is now 12 kb.

I confirmed this is a sprite layer only issue by trashing items in other folders both in and out of gamemaker, and none increased in size after removing objects. As a final test, I emptied my trash, which still contained the deleted duplicates. Still no change.

GMS and the game both run fine without these duplicates, so I'm more just curious how GMS uses the layer folders, what they're supposed to contain, and if anyone knows a possible reason for this.
 

IvanKorol

Member
Layers folder contains source images of separate editing layers of sprite.
You can control and edit layers in sprite editor:
shot.PNG
By default, when you create or import - sprite has only one layer "default" - so its normal that layers folder contains one image per sprite frame.
If you delete layer folder, open sprite in editor and aplly effect or change size - your sprite will be blanked. So its not realy good thing to delete this folder.
 
Last edited:
Yeah I tried deleting the folders in a backup and saw it didn't work, what I deleted were duplicate files caused by a bug, and I knew already that these were safe to delete.

In all honesty, at this point I suspect this may be an issue with MacOS displaying file sizes incorrectly rather than gamemaker, just that gamemaker happened to show it before anything else
 
Top