- Modifié
Best way to do character with 4 movement directions
I'm planning on making games that will have a "top-front" type of view (similar to the one from Nimble Quest) in the future.
What would be the best approach to doing animation for characters in such view? Left/right is simple - I just flip the character. How about walking top/down - a different versions of each animation for such movements? (so I would have to have "walk-leftright", "walk-up", "walk-down", "fight-leftright", "fight-up" and "fight-down") Or maybe there is a simpler version (skins?).
Sounds right to me. I don't think there's a way around that. I don't think you should be trying to cheat your way around animating extra stuff especially if it's basic stuff.
- Modifié
Thanks. I just wanted to make sure before I start, so I won't have to change too much later.
Good luck! 4-direction is actually pretty okay.
The diagonals in 8-direction stuff are the really challenging ones.
As Pharan has said, don't try and cut corners and planning beforehand will make the process much smoother.
I am working on 8-direction characters, which I basically only have to work with 5 directions
Up
Up Right
Right
Down Right
Down
...and then I can flip the 3 'Right' directions at runtime to go left.
I have each direction as a separate skeleton, and have written a character class in my game which takes care of managing the 8 skeletons and which to display, their position, direction, movement, animation etc which after the initial phase all went pretty smoothly.
As I said plan plan plan, and good luck!
Hm, separate skeletons? Is that really necessary?
Separate skeletons is easier to work with in the editor and only slightly more complicated in code (but nothing you can't abstract away into a view/avatar class' functionality) but in some ways also much cleaner too.
The disadvantage though is that you can't make fluid transformation from one direction to the other (although left/right flip also doesn't allow it).
With only 4 directions, you wouldn't have fluid transitions either way.
A transition system on top of this skeletal system is a bit more challenging to make but it can be done. But really, even if they were all in one skeleton, it would be just as difficult to make.
You'll have a much bigger problem animating with 3 different skeleton setups in one skeleton.
Magnesus a écritThe disadvantage though is that you can't make fluid transformation from one direction to the other (although left/right flip also doesn't allow it).
Maybe I'm misunderstanding what you mean, but I don;t see any reason why you can't do fluid transformations between directions in an 4 way or 8 way setup, it just takes planning and the correct code to manage it at runtime.
Could you give an example to make sure I am understanding you correctly?
Well, it would be much harder. While simple mixing makes quite a nice effect already (at least in some cases) - I use it in my platformer - when a character is climbing a ladder he looks as if he walks in top direction, I use mix for all animations and you can see for a short while how his arms/hands/legs move into new position (from "walk" animation to "climb" animation) when he starts climbing a ladder. It's of course far from perfect, because swapping textures is obviously not fluid and some movements are awkward but with separate skeletons you would have to make additional animation for the transition.