Stop dupliate images in export?

0 favourites
  • 8 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • Hi, my project is bloated with about 90% unnecessary duplicated images, and so is very slow to download when it should not be.

    There seem to be 3 duplicate image problems:

    1) A number of cloned images with different names and positions. There is only one actual png file. But for each clone, C2 has a dupliate identical image in the images folder. I would much prefer to use "copy" instead of clone, but then you cant give them different names or behaviors etc.

    2) I have 5 animations. For each animations, i see one animation sheet, and one single frame of the animation for no apparent reason.

    3) I have deleted a lot of objects from all my layouts, but they are still in the exported project (and still show up in the object picker). How do I purge these old ghosts?

  • 1. Why not just use instances of the same object?

    2. Not sure what you mean here

    3. You need to go to the place where you see 'sounds', 'object types', 'families', 'layouts', in folders, etc. Then, go in the 'object type' folder and delete the 'ghosts'.

  • THanks sqiddster. I would love to use instances of the same object instead of clone, but then you cant name them (if you name one instance, it renames them all. Also, I need to pin one instance to one object, and one instance to anther, and this is not possible as you only see one instance, not two, in the object picker for pin.

    Pretty much all my duplicate images (they are just that) end up as cloned sprites. I experimented with using tiled backrounds to represent my dumb UI images, but these are limited in that you cant put them in families etc. I experimented with pining them to a 1px invisible sprite, and putting that sprite into the family, but it was just too complicated to maintain them all.

    To be honest, I have found almost no cases where I can use copied instance of the same object, you almost always have to clone them so you can give them different names, or move them to different places etc. The only place I have ever used a copy is when i used it with instance variables, and then only need to operate on them in loops. But usually, you just want to grab a specific instance without the tediousness of looping through them all to find it (especially as the parameter of a function which requires you to pick an object form a list).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 3. You need to go to the place where you see 'sounds', 'object types', 'families', 'layouts', in folders, etc. Then, go in the 'object type' folder and delete the 'ghosts'.

    I see this - thanks. Any idea how I see which ones are not used? There are literally hundreds of duplicates in there (struggle with cloning), and I don't see how I can search/see which ones are used or not.

    Is my only option to save as project files, and use something like notepad to search each XML file for each object name?

  • o be honest, I have found almost no cases where I can use copied instance of the same object, you almost always have to clone them so you can give them different names, or move them to different places etc. The only place I have ever used a copy is when i used it with instance variables, and then only need to operate on them in loops. But usually, you just want to grab a specific instance without the tediousness of looping through them all to find it (especially as the parameter of a function which requires you to pick an object form a list).

    Have you considered using an Instance Variable to give an instance a name instead of using named clones? You don't need to loop through all instances to find them, just check the variable as part of the condition.

    Condition

    MyObject -> Compare Instance Variable -> NameVar = WhateverYouNamedThisParticularInstance

    Action

    Whatever action you would have done to the clone, just apply to the object and it will only apply to the specific instance from the condition

  • OddConfection thats a pretty good tip. Ill try and use that where possible.

    Have you found a way of using PIN to object with this? I.e. I have 3 copies of a large backgroud image, and want to pin each to a different specific sprite. Currently, I have cloned the large backround image, which means huge download times. The image needs to move with the objects (I slide them in/out).

  • Here's an example capx

    dl.dropbox.com/u/90589590/PinInstance.capx

    I've got 5 instances of the Ball object, but pinned only one to a Player object based on it's instance variable. The Player object has the Platform behaviour.

  • That's pretty useful- I didn't know you could do that, thanks!

    Shame its not easier - i.e. to be able to rename copied objects would be more logical.

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