So if you have an MP3 file already in place and you drag one over it with out deleting the first one, you will now have two MP3 files taking up space in your game. I had many MP3 files that were dragged in over the original so many times that my project was over 50MB! The reason was I was trying out different songs. I couldn't figure out why my file was so large. I talked with support about this and I think they're the ones who told me to try deleting unused music which fixed the problem. So learn from me and be sure to delete any unused music or images since they can take up lots of space! If you ever see a large file size and you know you do't have that many assets, this could most likely be the issue.
Yep, we don't delete them because you may want to use them elsewhere and you may want to undo the change. We recently changed the "Remove All Sound Objects" option in the tools menu to the more useful "Remove Unused Sound Objects". ;-)
I noticed this change, when I was looking to remove all sounds! I think both options would be useful. Sometimes is good to strip all sounds and start again.
Any plans to do auto optimizations for exporting the game? So if I say I want to make an iOS build and therefore extract the game to an Xcode project, I might not want to see these unused objects and levels and sounds and sprites and whatnot in there, and want to automatically get same images being removed, optimize atlases and image sizes (so that a Sprite that is 10x bigger then I need and because of that I used a size 0.1 for my objects, then probably is a good idea to just automatically resize that Sprite and change the size to 1.0).
@trudnai The things you mention are a good idea and for sure we know about them. The truth of the matter is that not everything will be able to be optimized automatically or some of the things while possible are fairly complicated and would take considerable time to implement. All I can say for the moment is that more pre-optimization done in the design phase will produce a better end product. That is not to say we won't do anything about it. For sure we will continue to look for areas we can improve and hope to include some of these things in the future.
Thanks @Andy. Do you think it would be too much work to check redundant resources when adding them or when extracting the build? So you could check MD5 or SHA1 for images and MP3s and remove duplicates so no need to do the hard work manually. Also I think when exporting just to make temporary duplicates from the XMLs and do the unused object removals from there and Atlas rebuild would not break things as the original development files would be still there, what do you think? (Just trying to share couple of random ideas if we can find smallest effort from your side with big improvements on ours )
We have thought about this and may look at removing duplicates automatically in the future. It's all about incremental improvements. We've been working on loading time for large games and have been able to bring it down quite a bit. There is only so many things we can work on at one time.
Hi @Andy, I have implemented an image duplication remover tool. Although I have done it in Perl it is very fast. It does not parse the XML file, just a very simple regex to replace image IDs and it is not fool proof, just made this to prove my point and take the low hanging fruits. https://www.buildbox.com/forum/index.php?threads/bbdocantidupe-removing-duplicate-images.3539/