What's better: 4 different sprites, or one with 24 frames

Just started using Construct 2? Post your questions here

Post » Thu Feb 11, 2016 6:37 pm

I wanted to make a radial life bar and found the tutorial that shows you how to make one using 4 half-circle sprites.

Performance-wise, would it be more trouble for Construct 2 to render 1 sprite with 24 frames, or 4 sprites with just 1 frame each?

The tutorial I'm talking about: https://www.scirra.com/tutorials/1377/h ... onstruct-2
B
20
S
5
Posts: 23
Reputation: 1,273

Post » Fri Feb 12, 2016 4:05 pm

Generally speaking rendering 4 sprites at once would require more than rendering one sprite frame at a time. Of course it the 4 sprites were small and the single with frames was larger you would reverse this situation.

I don't do much mobile but what I understand is most mobile devices can handle 3x the screen resolution in sprites and backgrounds (non-tiled) at once at 60 fps... so a full resolution background plus a 25% coverage HUD would still allow quite a bit of sprite resolution not counting other drains on memory. OR I could be completely off.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
56
S
15
G
8
Posts: 610
Reputation: 8,821

Post » Sun Feb 14, 2016 9:40 pm

The example actually only uses 2 images instead of the 24 images needed for your animation..
If Image memory is not a problem and you dont want more than 24 options (rotating the sprites like in the example would ofcourse give infinite angle possibilities) you should be fine..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Mar 08, 2016 5:45 pm

What I ended up doing is use the same idea in the tutorial along with Spriter (the free version) to create a 101 frame animation, with its speed set to 0.

Frame 0 is the radial when it's empty, and frame 100 is the radial when it's full. Thus, I can just take the percentage of whatever I'm keeping track of and every tick set the frame of the radial animation to that percentage. So 50% would be frame 50, 75 percent would be frame 75, etc.
B
20
S
5
Posts: 23
Reputation: 1,273


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests