Do too much empty sprites cause performance issues?

Discussion and feedback on Construct 2

Post » Sun Aug 09, 2015 10:23 pm

Uh, yeah probably a really stupid question. In general though, do empty sprites even do anything to performance? There just empty, no image is inputted into them.
Risk Rocket now available on Google Play
Image
B
36
S
15
G
6
Posts: 337
Reputation: 6,300

Post » Sun Aug 09, 2015 10:41 pm

Usman Haq wrote:Uh, yeah probably a really stupid question. In general though, do empty sprites even do anything to performance? There just empty, no image is inputted into them.

Whether its a stupid question or not, I guess depends on what you think the answer should be ;)
But yeah all sprites take of memory regardless of there being a image loaded or not. Also each frame counts as an individual image so a sprite with 2 frames will be seen as being 2 images. So having two sprites vs 1 sprite with 2 frames are the same memory wise.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Mon Aug 10, 2015 12:13 am

good explanation and performance tips

https://www.scirra.com/manual/134/performance-tips
Image
B
28
S
11
G
2
Posts: 139
Reputation: 3,299

Post » Mon Aug 10, 2015 12:44 am

Thanks guys! I guess making these empty sprite EXTREMELY small sized will make their presence not really matter all that much.
Risk Rocket now available on Google Play
Image
B
36
S
15
G
6
Posts: 337
Reputation: 6,300

Post » Mon Aug 10, 2015 4:09 am

well, there would be a variety of ways it could cause a performance hit: in addition to memory, they could reduce your FPS if they are being moved around, or have behaviors that eat up CPU time, or are triggering collision checks.

Why would you need a lot of empty sprites? to hold data? You could store data other ways.
I know there are plenty of good reasons to use invisible sprites (I use them to track touch points in a multi-touch interface, or make larger targets around small objects that are otherwise difficult to touch on a small screen), but just make sure you use as few as necessary and keep them as simple as possible (no behaviors, disable collisions, etc.)
B
98
S
34
G
20
Posts: 438
Reputation: 17,825


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests