Just a more simple question that'll lead to a longer separate post?

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
Easy SiteLock
$11.99 USD
Protect your game from being stolen and posted on another site with Easy SiteLock!
  • On average, in terms of storage space, is it REALLY that much more storage efficient to use different sprites on the same object as apposed to a bunch of separate objects? (I'm making something for a card game that'll probably end up having like 15k sprites, everyone keeps telling me I should be using one object for the card and just a ton of different sprite frames for the different card as I'm currently using like hundreds of objects and it'll only go up as I get closer to completion)

    Tagged:

  • An object type per card vs one object with a bunch of frames is more about being able to do things in less events. It’s personal preference really, if you already have 100 objects and you’re fine with writing logic with that then carry on.

    Storage wise what do you mean? The overhead of one object vs many is likely negligible. Memory wise you still end up with the same amount of images and vram usage either way.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would not recommend having a single object type with thousands of frames in it. Instead I would recommend using multiple object types each with a reasonable number of frames (ideally at most hundreds). For example in a card game if you can have 100 different styles of deck, and each deck has 52 cards, then 100 object types each with 52 animation frames is better than one object type with 5200 frames. You can add multiple object types to a Family to avoid having to make separate events for them.

    The reason for this is as described in Memory usage in the manual, Construct's memory management only loads or unloads entire objects with all their animations and frames. If you put everything in one object type, your only option is to have absolutely everything loaded in to memory, or nothing at all. With different object types, it can load only the things you use. Continuing the previous example, if you only use up four styles of deck at a time, then with separate object types Construct can ensure only 52 x 4 = 208 animation frames are loaded at a time. If you put everything in a single object type, it must load all 5200 frames, which will use 25x as much memory.

    There won't be a significant difference in download size though, if that's what you meant by storage space.

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)