does objects with same PNG file share resources?

Get help using Construct 2

Post » Mon Mar 18, 2013 9:07 pm

Hello there and thanks in advance to anyone who can answer, I would like to know:

- if two objects that use the same PNG spritesheet (or a cloned object) share this PNG spritesheet, in a resource point of view, or do the project duplicates the spritesheets? (making a new copy of the PNG image file for each object)

Example: I have a PNG spritesheet file I wanna use for a monster. There will be several monsters with the same image, but inside different Container Objects. So I thought about creating cloned objects, but I would need to know if the project will or will not duplicate the spritesheets (it could be heavy on file size).

Once again, thanks in advance to anyone who can answer. Best regards.
B
11
Posts: 17
Reputation: 909

Post » Mon Mar 18, 2013 10:00 pm

Nope. Each object has its own texture.
If you wish to share textures you will need to either a: use the many instancing functions, object(index), object.uid/ object.iid, an/or families, or b: change the texture via url.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Mon Mar 18, 2013 10:04 pm

Hmmm interesting, so I can preload the textures from a url and then share them for many objects. I will do some more research on this subject.

But many thanks for clarifying that objects won't share spritesheets. :)

B
11
Posts: 17
Reputation: 909

Post » Mon Mar 18, 2013 10:15 pm

Families would fit better into the b part. heh
Not a bad idea really, the sharing of resources, might even be on @Ashley's todo list.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749


Return to How do I....?

Who is online

Users browsing this forum: MarkThomas, Yahoo [Bot] and 0 guests