Memory and Resource usage on sprites

Discussion and feedback on Construct 2

Post » Thu Jan 23, 2014 9:12 am

Hi.

What is a lower cost on system resources.

Lets say you have 40 variations of ground. The surface your player walks on.

What would consume less?
Combing all 40 variations into an animation, duplicating the object and setting the frame according to the object you want.

Or

Have 40 separate sprite objects?
B
8
S
2
Posts: 163
Reputation: 1,115

Post » Thu Jan 23, 2014 9:54 am

If it fits into the texture atlas, ie. its pixels is close to ^2 dimensions, then an animation would use less since its all crammed into a nice big texture and fits well.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Thu Jan 23, 2014 11:57 am

It makes no difference - either way you have the same number of images. For the things that are actually important to memory use, see the blog post: remember not to waste your memory
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,681

Post » Thu Jan 23, 2014 12:15 pm

[QUOTE=Ashley] It makes no difference - either way you have the same number of images. For the things that are actually important to memory use, see the blog post: remember not to waste your memory[/QUOTE]

I thought if you had a individual 55px sprite, it will be thrown into a 64 x 64 texture on its into the ram.. whereas if you had multiple 55px sprites, it gets put into a sprite sheet that may fit more/better into texture ^2, no?
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Thu Jan 23, 2014 12:58 pm

At runtime it makes no difference, it has to go into VRam as a texture to be displayed...The sprite sheet cropping is to reduce the download time...
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260


Return to Construct 2 General

Who is online

Users browsing this forum: technofou and 19 guests