1. character are built of many parts, you can name it, head, body(body = body + leg + foot), left hand, right hand, left weapon, right weapon.
2. you must have a list of character state, it's about 40 state as i remember, to handle such many action like diablo.
here are example:
- idle, every kind of weapon have same form if idle
- walk, no weapon
- walk, 2-handed weapon(lance, staff...)
- walk, 1-handed weapon(sword, blade, ...)
- walk, double weapon(2 sword, 2 blade at once, difference to 2-handed)
- walk, bow weapon
- run, no weapon
- run, 2-handed weapon
- run, 1-handed weapon
- run, double weapon
- run, bow weapon
.... so on, many state
each state must have difference animation, assume that a state have 40 animation, and a character formed from 6part. then we cost 40x6=240sprite to build a character. the number of sprite grow very fast as variation of equipment grow.
you must find a way to manage that huge number of sprite, dont load every sprite at once
and you know that kind of system needs many sprite, so never use HD assests. it's cost 4MB of disk space, after optimized, to store a helmet. you know? helmet are small, 1 frame 6x6 pixel average.
3. when you turn character, move up -> move left... of course you must change the animation, but it's not only thing you must do.
you must re-arrange the parts. when character move up, the order of render are -> weapon < hand < head < body. so the weapon and hand would be hide under body. but when character move down, the order reversed. basically, you must have a table to represent the order when character turning.
- up -> 1, 2, 3, 4
- down -> 4,3,2,1
- left .....
- right ....
that's all my experience, nothing hard, but it's complex, and if you haste(like me), you will get a mess instead of a awesome game.
4. here is mine