A question about images

Discussion and feedback on Construct 2

Post » Tue Mar 01, 2016 6:33 am

Hi guys

If create 10 different sprites (not instances), all using the same png image, does the image get used 1x or 10x?

I'm sure I've read somewhere that construct only uses the image 1x if it finds duplicates.

If someone could clarify this for me, that would be awesome!

Thank you in advance!
B
47
S
23
G
9
Posts: 151
Reputation: 9,253

Post » Tue Mar 01, 2016 9:06 am

Deduplication only applies to a single object.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Tue Mar 01, 2016 9:57 am

Hi @newt

I've tried looking in the C2 manual for deduplication, but found nothing.

If I understand you correctly, the final export will end up having 10 of the same images, if I choose to clone my object.

This is a shame, as it's pretty inefficient and in my case I can't really use instance variables.

Anybody know where I could find a reference/manual link for this topic?

Thank you in advance!
B
47
S
23
G
9
Posts: 151
Reputation: 9,253

Post » Tue Mar 01, 2016 10:02 am

I found the link detailing this topic, and after reading it again, I still understand it as - 2 different objects using the same images, will be de-duplicated.

https://www.scirra.com/tutorials/577/construct-2s-export-time-optimisations

Could anyone please shed some light on this?

@Ashley maybe :)

Thank you!
B
47
S
23
G
9
Posts: 151
Reputation: 9,253

Post » Tue Mar 01, 2016 10:18 am

Push the export button.
You might figure it out on you own.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Tue Mar 01, 2016 10:55 am

What more do you want to know about it? There's a whole section on image deduplication in the article you linked to.
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,145

Post » Tue Mar 01, 2016 12:00 pm

Hi @Ashley

Basically, I've read some posts on the forum claiming that the reduplication wasn't happening when cloning objects. The posts said that you were left with duplicates of the same image. After reading the article, I was a little bit confused whether I was understanding it right.

After doing the export as @newt suggested, I've looked inside the image folder, and it looks like it I understood the article correctly. De-duplication occurs on all sprites, even clones :)

Thank you for your help!
B
47
S
23
G
9
Posts: 151
Reputation: 9,253


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests