1
\$\begingroup\$

Where do you usually implement player motion when going through the state machine of a combo system?

An example, when player presses X+Y it must do an uppercut like movement (Like street fighter) where the player jumps and hits. Another example could be the Devil may cry series where you can press down+sword button and the enemy is thrown up and the player authomatically jumps to let player hit target in the air.

When creating a combo, you have 2 things to take care of. One is the media that will be played when the combo is done (sound, animation, etc...) and the other the movement of the player when doing this combo.

How do you handle the movement of the player? I have 2 posible options:

1) Include the player motion (translation, rotatio, etc...) in the animation

2) Delegate the player motion to the combo nodes while they are being linked.

First option could be the easiest but seems a bit restrictive. For example if you want to let the player do some other action while the current combo node media is playing (ej. jumping) could be tricky (Jump + hit).

Second option would need to have some many diffeernt nodes (We could use some kind of delegates here to minimize the node count(IOC)) to cover all the motion needs of every part of the combo.

What do you think. Am I thinking too much?

Cheers.

\$\endgroup\$
0
\$\begingroup\$

It sounds like it greatly depends on your game and where you want to go with it, but here's my 2 cents:

I don't think you should include translation or rotation into the animations themselves. Rotation should probably be saved for orienting the character in the proper direction (in Street Fighter this is usually left or right). Baking in the animation height is problematic for several reasons. For example, if the character has a damaged-while-airborne animation, that probably needs to start playing at the correct height i.e. wherever they got damaged.

I think what you probably want to do is to use animation events during certain parts of the animation to give the script control over their physics. For example, during a somersault of an animation you might give them an upward force, or simply make them hover during a certain timeframe in the animation.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.