2d Sprite Animation Tips and things to remember?

Discussion and feedback on Construct 2

Post » Tue Oct 30, 2012 2:14 pm

So I was wondering, when making 2d sprite animations like so   

what should I keep in mind?

-Should I keep the canvas size the same throughout the entire animation? or the entire character?

-Does changing the collision box every frame kill CPU?

I'm trying to make a party fighting game smash bros and jump ultimate super stars, but I'm new to this and would love some tips! I'm just not sure what would kill cpu/memory and slow down network battles
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Tue Oct 30, 2012 2:41 pm

You won't have to worry about the size of each sprite.

You can also gain more control over hit boxes and collisions if you ignore using the default collision boxes and use invisible sprites as hitboxes/collision instead. This way you can enable/disable them at different points throughout your sprites animation. With the default one assigned to your sprite its always on.

B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Tue Oct 30, 2012 4:24 pm

not necessarily the sprite, but the canvas itself. Should i keep it the same per animation to ensure a fluent animation?

I'm really looking for some "Best practice" kind of stuff.

As for collision boxes, wouldn't a sprite shaped collision box take up a lot of memory and cpu usage? I was just going to go in and morph a 4-6 point object per frame to call the collision box
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Fri Nov 02, 2012 2:33 am

Here's what I meant on the best practice stuff, in case anyone needs it!

https://www.scirra.com/manual/134/performance-tips
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Fri Nov 02, 2012 6:25 pm

Leaving space in your animation frame canvas will indeed take up more space than if you trim the frames. In runtime it's going to be counted as the nearest power of 2 when it's placed in vram. I'm not sure how much of a difference there is between frames with content and completely transparent frames of the same size, though. However, as long as you're not doing anything insane, like a 989x750 canvas for a 125x80 sprite, the difference should be negligible.

But, here's the neat thing. You can work with the frames in any size you like. But when you're done, trim them. What's important is the origin point, and that information is kept when you do the trim. So there really is no need to have large spaces in your frames, but having them is not something that's going to have too much of an impact.inkBot2012-11-02 18:26:43
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Sat Nov 03, 2012 2:51 pm

https://www.dropbox.com/s/bn57kovwol61nfb/New%20project.caproj

hopefully that works.   Use AWD to move when you press right arrow while hes moving hes supposed to do do a side kick. And if he's standing still, he's supposed to do another kick when you release right arrow. But instead he only does the kick while you hold Run
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Sat Nov 03, 2012 8:18 pm

That's a project file. To open that we'd need to have the entire folder associated with it too. Go into C2 and save your project into a .capx instead.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Sat Nov 03, 2012 9:05 pm

Ah thanks!   

https://www.dropbox.com/s/ask2ywuw904vj74/FightingGame_11032012.capx
B
32
S
4
Posts: 405
Reputation: 3,219


Return to Construct 2 General

Who is online

Users browsing this forum: Artpunk and 9 guests