Forum rules - please read before posting.

Custom animation engine tutorial question

edited June 2017 in Engine development
Hello to all!

First of all, apologies if this is the wrong place of the forum to post this, but since it has to do with tweaking AC, I thought it kinda belonged here.

I'm a nooby programmer (recently graduated). I want to use spine for the animations of the main characters in my game, but I have found it is a non trivial matter.

My biggest problem is that I do not understand well the way the animation engine works in AC. I know that if I go and analize the code for some time I will end up understanding, but it still looks like a pretty big task. 

Is there some sort of tutorial or something in which you tackle the custom animation situation? I have searched and until now, have found none. In the wiki there is a spine integration tutorial, but the problem is that this tutorial gives you like 10 .cs files already filled with code and then it gives instructions as to how to use these .cs files, but not about what their function is (this is by no means a critique to the user that made that tutorial, kudos to him for his dedication). That means that, in order to fix the issues (several of them popped because the scripts need updating), you have to go through these 10 .cs and try to understand the logic behind them, which is also hard (I managed to fix the first errors, but then the player was not being animated correctly, and new errors popped when in game mode).

If no tutorial exists, then a question to the people that went into doing this: How much did it take for you to understand the way the anim engine works and manage to integrate a spine custom engine? Was there any issue, comment, post or tutorial which helped you?

Thanks for your help!! I feel really lost in this subject and the company I'm working in is expecting an answer from wether it is worth the effort to switch to spine.



In this same issue, another question: Is it necessary to use a custom animation engine with spine? I just read that a user managed to run some animations using one of the default anim engines.

Comments

  • edited June 2017
    As something of a disclaimer, I do need to start by stating that the Spine integration on the wiki is not official - meaning it's a case of "use at your own risk".

    Custom animation engines are covered in Section 12.5 of the Manual.  Each engine's code is limited to a single script - and Actions that reference it (e.g. Character: Animate) call override functions to actually perform the engine-specific code.  For example, the UI for that Action is actually performed by the animation engine's ActionCharAnimGUI function, rather thatn the Action's script itself.

    Such override functions are used whenever the engine is called upon, e.g:

    - When a character is moving (PlayWalk)
    - When a character is idle (PlayIdle)
    - When showing the GUI in the character's inspector (CharSettingsGUI)

    And that's basically all that's going on: when the character is moving, the PlayWalk function is called - and so you can write whatever animation code is necessary to make the character walk, using the variables and functions available in the Char script to determine things like facing direction, movement speed etc.  You can open the included AnimEngine_ script files to see this going on.

    I am currently in the middle of a re-write of the Manual, so I'll look into extending this section of it in particular.  In the meantime, however, you may be able to make progress by posting the errors themselves together with the lines they reference.

    As for the more fundamental question of "should I change?", it always depends on your own needs.  As the included Sprites Unity Complex and Mecanim work by just manipulating the parameters you allow it to, this generally allows you to use other animation systems provided that they also rely on an Animator component.

    The added complexity of having 2D spine-based characters is down to sometimes having separate rigs for the different directions - but you could also incorporate the enabling/disabling of these within the animations as well.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.