How Buildbox treats multiple copies of object?

Discussion in 'Technical Discussion' started by defonten, Nov 29, 2015.

  1. defonten

    defonten Avid Boxer

    Joined:
    Nov 21, 2015
    Messages:
    251
    Likes Received:
    29
    Sorry for stupid question.. Just wanted to understand what might possibly give hard times to Buildbox. Let's say I have picture of a stone "weighing" 1mb imported as Object. So I duplicate it hundred of times here and there, what I want to know does it mean that 100 stone pictures would take 100 mb of memory or BB treats them as instances and just assigns to clones different transform values?

    Or would it be more effective to have fewer stones by making a piles of stones (collages) in photoshop? The reason I don't want to go this way (making collages) because collages are too repeatitive by nature, it's more convenient to tweak position/rotation/scale values of single objects and have completely original pattern variations.

    Thanks!
     
  2. eyal

    eyal Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    642
    Likes Received:
    121
    @defonten - good question and didn't see it answered anywhere. @Andy ?
     
  3. wesam_badr

    wesam_badr Miniboss Boxer

    Joined:
    Oct 10, 2015
    Messages:
    1,065
    Likes Received:
    479
    i think if you have image with big size and duplicate it, it won't affect the size of the whole game (like if you have a image have a size of 1 bm and duplicate 100 times your game would be 100 mb and i don't think that it's right / that will happen if you dropped the image multiple time into buildbox) * ( what i think is like what happened in any computer there is the original file that can have as many as you want shortcut parent and child i think that kind of relation) there is many factors that affect the size of the whole game there is the size of the original file in this case bbdoc and the size of the original images etc... .

    there is something on buildbox called back del threshold and side del threshold in the gameplay settings and its role is to delete what i call it trash or cache images that its going to be removed when the character pass by whiten certain numbers of pixels that is 300 to 550 by default so the game not exceed memory and crash.
     
  4. defonten

    defonten Avid Boxer

    Joined:
    Nov 21, 2015
    Messages:
    251
    Likes Received:
    29
    Ok, I'll just give it a try and make a level with lots of clones to see if it has an impact on performance. Thanks!
     
  5. netkomm

    netkomm Avid Boxer

    Joined:
    Nov 23, 2015
    Messages:
    274
    Likes Received:
    143
    it depends very much what you mean with "duplication".

    If you have 1 object loaded (the graphic file of 1MB you refer to) and then you create 100 instances on-screen (of that same image) then your load would be of 1MB + the little space used to have an object that is instantiated and that will then "point to" that image.

    If, instead, for duplication you mean having (example) 100 objects with 100 different images then your memory load will increase since you have unique objects "living" in your app independently (each one carrying its own "weight")
     
  6. sysads

    sysads Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    885
    Likes Received:
    353
    I think the impact of the number of times the object is used in a game is per scene. So if you have an object used 200 times in one scene, the memory usage will be more than another scene with just 20 of the same object.

    This also applies to animated objects or characters.
     

Share This Page