How to make large covers for buildings in my platformer without using up lots of MB

0 favourites
  • 3 posts
From the Asset Store
Buildings - Isometric view - PNG transparent - multi styles, multi fonctions buildings
  • Hello,

    Yes, I know the title is terrible but I will explain the issue as best as I can.

    *ahem*

    So I have buildings which the player can walk in and out of. When they walk into the building the outside of the building becomes transparent, so the player can see the inside of the building. When the player leaves the building, the outside of it becomes visible again.

    I am using a sprite with multiple frames that are used for the various outside "covers" of buildings that the player can enter. This allowed me to just write one code for the transparency and it would apply to all of the building covers.

    Then I noticed that all of these building covers were using up a lot of MB.

    As an example on of the covers for the buildings has a width of 880 and a height of 560

    So what I'm wondering what is the best way to make large covers for the outsides of my buildings without using a ton of memory.

    I am considering using some tiled backgrounds in a family instead.

    Any advise is appreciated!

    Tagged:

  • When you have one sprite object with all the possible covers it loads everything into memory even when you might not need it. It is better to have separate objects for each cover. Cutting down the individual image the best you can is also good. As for applying to all covers at the same time, use a Family.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, that makes sense.

    also I went through the layout and looked around for any unnecessary sized sprites, (such as collision sprites) resized them and off any large transparent areas. Overall doing all of that seemed to help.

    I'll go ahead and break up the building covers animation frames into separate sprites and use a family and see if that does anything more.

    Thanks for the help Lionz!

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