Asset optimization, excess tilesheets exported

  • Hello. I'm currently optimizing a little game i'm working on, and i got a few questions regarding how C2 handles graphical assets upon exporting it for web use.

    I resolved the original question, but have an updated issue:

    If i have 20 objects that are the same, and using the same tilesheet - why does it have to create 80 tilesheets? That just adds to the size of the project, when it can simply use the same 4 tilesheets that are generated.

    .capx - updated capx for reference. There are 4 trees present, they all use the same tilesheet. Upon export, they generate 16 tilesheets - even though 4 would be enough. Is there a way of using only those 4?

  • You might want to check this article about spritesheets in Construct2 as well as image compression in C2.

    This should help you optimize as much as possible.

    Also be aware optimisation is a waste of time for anything not mentioned in the performance tips manual entry.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Gah, i was one search away i guess. My apologies for that - and thank you!

    *Edit: One thing though. If i have 20 objects that are the same, and using the same tilesheet - why does it have to create 80 tilesheets? That just adds to the size of the project, when it can simply use the same 4 tilesheets that are generated.

    .capx - updated capx for reference. There are 4 trees present, they all use the same tilesheet. Upon export, they generate 16 tilesheets - even though 4 would be enough. Is there a way of using only those 4? Kyatric

  • You shouldn't have 20 objects using the same images! Just use one object type with that one set of images.

  • era This is where you need to look at instances vs. objects... that should shed some light on this as well.

  • Ashley BluePhaze Yes, sorry about that. Its not very clear in the capx provided, nor how i formulated my issue, but what if i have 20 different objects (with different behaviors, settings and events linked to each), but they all use the same tilesheet? Thats my issue.

    Lets say i have 20 tree objects in this project. Each tree rotates around seperate circular shapes, some of these trees are moving constantly (up or down), some never move, and some are moving based on triggered events or periodically. All of the objects are behaving different in some way - but they could all use the same tilesheet (ie. they look the same).

    If the tree was a static art asset i would of course just create 1 object and create instances of that object throughout the level.

    I've for sure missed something very crucial during my time with this tool, because there has to be a better way of doing it. So my apologies for these rather basic questions.

  • era You can have events or functions that use the IID or UID of the object in order to have different actions for them possibly. That way you can use instances instead of objects and react differently to them. You could also create an instance variable that gets assigned some type of keyword or name, and have the events check that instance variable when the logic needs to behave differently based on which tree it is... just some thoughts. Hope this helps...

  • Well an easy thing to do is have invisible objects with no animations that are all acting differently, then just have one "cosmetic" sprite with lots of animations that you pin to each different kind of object.

  • Clever! I'll look into it, it'll probably work. Thanks for the feedback.

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