Author Topic: One Big Sprite for player or separated for each animation?  (Read 1524 times)

Dro

  • Member
  • **
  • Posts: 64
  • Karma: +0/-0
    • View Profile
Hi guys.
Please tell me. what do you prefer best and why..

Do you use one big sprite for all animations your player can do or making separate sprites for each animation handling their visibility ingame?

I'm asking because my  sprite already has 78 frames. and this is not all. Some animations will be added. So I'm starting to thing I need to separate it to pieces. Good thing that I can have different hit boxes for each state.

What do you think?

thanks.

AlexanderOcias

  • Active Member
  • ***
  • Posts: 110
  • Karma: +0/-0
    • View Profile
The fewer assets you have to deal with the better. A huge sprite map should have less performance impact than several small ones too.

SysOp

  • Member
  • **
  • Posts: 53
  • Karma: +0/-0
    • View Profile
    • check my kick ass half-life mod!
The fewer assets you have to deal with the better. A huge sprite map should have less performance impact than several small ones too.

Right, specially if you are doing "heavy" stuff, like rotations, scaling, color changing and such.

It's up to you, but it's always nice to try to re-use assets in smart ways. Anyways, really depends of the GFX you want to feature. Sometimes, a pre-rendered, animated explosion could just work for what you wish, if you want to do different explosions perhaps would be better to spawn different particles and do it as you wish.

Anywho, when it comes to the player, you shouldn't escatimate resources. I'd use a big sprites with all animations in. Shouldn't take time to set them all up.
"Hope is not a dream, but a way of making dreams become reality"

ywp

  • Member
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Rotation was pixelating my character in a bad way; so, I decided to go with a single sprite sheet to cover all the angles.  I've got 288 frames and performance is good (60 fps).  I'm sure that it uses up a lot more memory, though.

saintdboy

  • Member
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Damn, I want to see that project!
Maybe a demo? :P

ywp

  • Member
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
It'll be better for waiting.  :D

For anyone who isn't familiar with this sort of thing, I simply started with my character (ship, etc.) at a 90 degree angle, then I duplicated and rotated it (just like the 8bitrocket rotation tutorial).  For 32 angles, I used increments of 11.25.

Code: [Select]
addAnimation("0", [0, 1, 2, 3, 4, 5, 6, 7, 8], 27);
addAnimation("11.25", [9, 10, 11, 12, 13, 14, 15, 16, 17], 27);
addAnimation("22.5", [18, 19, 20, 21, 22, 23, 24, 25, 26], 27);

Hectate

  • Active Member
  • ***
  • Posts: 192
  • Karma: +0/-0
    • View Profile
It'll be better for waiting.  :D

For anyone who isn't familiar with this sort of thing, I simply started with my character (ship, etc.) at a 90 degree angle, then I duplicated and rotated it (just like the 8bitrocket rotation tutorial).  For 32 angles, I used increments of 11.25.

Code: [Select]
addAnimation("0", [0, 1, 2, 3, 4, 5, 6, 7, 8], 27);
addAnimation("11.25", [9, 10, 11, 12, 13, 14, 15, 16, 17], 27);
addAnimation("22.5", [18, 19, 20, 21, 22, 23, 24, 25, 26], 27);

Very similar to what was done in the Mouse-Aim Tutorial for the wiki, although I used 16 angles and 8 frames per angle. It's still a lot though, you can see the sprite sheet and animation setups for that on the tutorials' talk page.
Patience is a Virtue,
But Haste is my Life.