Something I learned about MP3 Files

Discussion in 'Technical Discussion' started by Machine Rises, Oct 2, 2015.

  1. Machine Rises

    Machine Rises Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    591
    Likes Received:
    834
    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.
     
    Last edited: Oct 2, 2015
  2. Wings n Armor

    Wings n Armor Avid Boxer

    Joined:
    Oct 1, 2015
    Messages:
    280
    Likes Received:
    125
    Valuable!!!
     
    superjack765 likes this.
  3. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    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". ;-)
     
  4. Lee Fellows

    Lee Fellows Boxer

    Joined:
    Sep 25, 2015
    Messages:
    65
    Likes Received:
    40
    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.
     
    Wings n Armor likes this.
  5. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Yup, makes much more sense @Andy, a wise change.
     
    Wings n Armor likes this.
  6. superjack765

    superjack765 Avid Boxer

    Joined:
    Mar 19, 2016
    Messages:
    113
    Likes Received:
    41
  7. superjack765

    superjack765 Avid Boxer

    Joined:
    Mar 19, 2016
    Messages:
    113
    Likes Received:
    41
    no thank I found
     
  8. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    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).
     
  9. AppNasty

    AppNasty Miniboss Boxer

    Joined:
    Apr 14, 2016
    Messages:
    1,485
    Likes Received:
    890
    I was wondering why my games where so huge when i aint even added much yet lol
     
  10. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    @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.
     
    blufology likes this.
  11. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    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 :) )
     
  12. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    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. :)
     
    trudnai likes this.
  13. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    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/
     

Share This Page