Understanding sprites

Discussion and feedback on Construct 2

Post » Thu Feb 07, 2013 11:53 am

Hello C2'ers,

This may seem like a dumb question, but I'm still quite new to all of this so my apologies if it is!

I've been thinking about performance, and have learned that it is directly affected by the number of sprites you have on your layout.

My question is a two-parter so here goes;

1. Is it better for performance to have 10 sprites with 10 different images, or 1 sprite containing 10 images. Or does it make no difference whatsoever.

&

2. When people mention the number of sprites on screen do they mean individual sprites, or does it also include separate instances of the same sprite.

My apologies again if this seems like a stupid question, but I'm still trying to understand the fundamentals, and I think a better understanding of sprites can help me.

Thanks in advance for taking a look at this or commenting.
B
10
S
2
G
1
Posts: 11
Reputation: 859

Post » Thu Feb 07, 2013 12:20 pm

1. Matter of preference. You need to put 10 different sprites in a family to be able to sort through them. If you put 10 images into 1 sprite, you need to handle displaying proper image as well as use a private variable to determine the sprite's role. Performance wise, not that much difference, I think. Others might have more to say on this topic.

2. Number of instances.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu Feb 07, 2013 12:23 pm

Thanks for the info @Mipey.
B
10
S
2
G
1
Posts: 11
Reputation: 859

Post » Thu Feb 07, 2013 2:11 pm

Obligatory link to performance tips
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests