(just hoping for a chat, working alone looking to the wall for too long this week!)
I'm building my own game engine (for personal development/studding) in C/C++, the Character class (the player for simplicity sake) is working great and I can make unitary actions to different states with little effort now.
But when it comes to chaining actions, I'm stuck at this bit for a wile and can´t decide on a good way to attack the problem.
I'm thinking about each state having it's own set of chains.
Using a tree of trees would be the most reasonable thing to do to store the chains, but each state would have so little potential chains (if any) that I feel it would be a wast of infra structure.
The rate at which new actions are accepted and time out to receive a new actions can be defined at the Character level or on each action link bases. I tend to prefer having this values decided at the Character as I can have some “Character Sheet” somewhere that auto generates this values and creates a consistent behavior for the player afterwards.
When a chain fails, it will execute the last action received.
When it succeeds, It will trigger a new predefined state.
How do you people prefer to implement this kind of solution?