Size issues.

Discussion in 'Technical Discussion' started by adtn64, Nov 17, 2015.

  1. adtn64

    adtn64 Boxer

    Joined:
    Sep 25, 2015
    Messages:
    93
    Likes Received:
    21
    Hi,

    My entire art folder is 32 mb, but in some scenes Im using a particular object which might be around 50 kb close to 200 times and Im also using the light feature ive overall used it around 40-50 times, my project file has gone up to 74 mb and Im really concerned about this as its taking time to load and I dont want the game to become so big. Is there any solution ?

    I deleted the the unused objects and removed the unused level objects from the tools section.

    Once i did that it became 45 mb, that was on an extra copy of the project file, but when i did that for the second time it didnt happen.
     
    Last edited: Nov 17, 2015
  2. sysads

    sysads Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    885
    Likes Received:
    353
    How big are your images files used in the entire project? Try compressing them first using
    tinypng.com

    Under view > atlasses > click on optimize

    upload_2015-11-17_14-33-16.png
     
    tomwhite3d and Jamie like this.
  3. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    Correct me if I'm wrong, but the project size is always bigger than the game itself. Once you export your game the size will be smaller.
     
  4. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    That's true. The game itself will be smaller.

    Use a compressing tool for your pngs and use your graphics in a ratio of 1:1. 50KB is a lot for a particular object. This should come in at 100 bytes or less. Then also check all the audio files. Delete all unused sound objects. If you have a lot of sound FX then don't import them twice. Choose them in the dropdown menu instead. That's about it and all you can do.
     
  5. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Most likely you are including assets that are too large and you are scaling them down inside Buildbox. Also you may be dropping the same graphics into Buildbox multiple times instead of reusing them.
     
  6. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Also wanted to add that any PNG compression done to your files before dropping in Buildbox won't make any difference in your final game size. It may make the BBDOC smaller, but that is all.
     
    Jamie and Christoph like this.
  7. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Interesting. Why is that @Andy? No benefit of using a compression tool then?
     
  8. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Mostly because they are combined into Atlases. The individual graphics do not exist in the exported project.
     
    Christoph likes this.
  9. adtn64

    adtn64 Boxer

    Joined:
    Sep 25, 2015
    Messages:
    93
    Likes Received:
    21
    @Andy Thanks for the tips, compressing the graphics would have a been a major delay as I would have to re insert all the graphics once again and there are many physics based objects in each scene in my game.

    I deleted the all unused objects and optimized the altlasses, the size has come down to 45 mb, Im not dropping the graphics a second time into buildbox.

    But my main question is, Is using a particular object too many times say 200 times in a scene going to increase the size of the game ?

    Correction : The object size is 346 bytes not 50kb, dont know what I was thinking there :p
     
  10. Taimoor Javaid

    Taimoor Javaid Avid Boxer

    Joined:
    Oct 5, 2015
    Messages:
    274
    Likes Received:
    211
    Also Sound object make a lot difference in your game size use the Audacity Software and compress your sound files than use them in your game.
     
    Taimoormalik8 and ruhm64 like this.
  11. duslicrest

    duslicrest Boxer

    Joined:
    Nov 24, 2015
    Messages:
    35
    Likes Received:
    1
    I compressed my sounds to be much smaller, then when I exported my game into an APK, it was 10 mbs bigger. Do you know how to fix this?
     
  12. Taimoor Javaid

    Taimoor Javaid Avid Boxer

    Joined:
    Oct 5, 2015
    Messages:
    274
    Likes Received:
    211
    @duslicrest Send me your mp3 file and also first remove all sound objects from the game and then start adding them again(compressed).
     
    Taimoormalik8 likes this.
  13. sysads

    sysads Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    885
    Likes Received:
    353
    @duslicrest also note that when you want to use for instance same background music in Main Menu, Game Field, Game Over Screen etc, DON'T drop the same mp3 file on all.

    Just drop it on ONLY one and map the rest to it

    - In my main menu, I dropped a sound there - about 2mb

    upload_2016-1-16_6-50-2.png

    - But in the game field, click the edit button and select the sound added in main menu. but as you can see, instead of me doing that, I dropped the same sound file on it hence I have 2 copies of the same music which if not mistaken takes the size to 4mb rather than 2mb :(

    upload_2016-1-16_6-52-43.png
     
    todro likes this.
  14. todro

    todro Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    151
    Likes Received:
    69
    Sadly that's true, even in BB2. A check to identify and "normalize" identical soundfiles in large projects would be a nice option for the tools menu;)
     
    sysads likes this.
  15. sysads

    sysads Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    885
    Likes Received:
    353
    That's why we need you here - Raise a request ticket for this :D
     
  16. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    @todro and @sysads, this is not an issue, simply use - Tools > Remove Unused Sound Objects.
    If you've accidentally added the same file more than once, this will remove any duplicates that are not in use. BB cleverly works out which one is not used, very cool :) I use this a lot when I tweak level for sound fx and background music and it works fine in both BB1 and BB2.
     
  17. todro

    todro Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    151
    Likes Received:
    69
    This is what I thought but it doesn't work. New project, the same file added to main menu and game field, edit list shows both and "Remove unused objects" says 0 removed.

    Actually we are talking about 2 different situations: imported but unused sound files and 2 or more identical soundfiles which need only one source to be referenced
     
  18. sysads

    sysads Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    885
    Likes Received:
    353
    Hi
    Not sure that works because buildbox should have flagged duplicate music file names when one drops the same music file in another scene. So I would assume what happens is when you drop 1.mp3 it tags with a unique ID and when you drop same file in another scene, it tags it with a different unique ID so treating it as 2 separate files irrespective of their filenames
     
  19. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    That's really interesting, I have not experienced that. Sorry for giving you guys a bum steer.
     

Share This Page