Lately I tryed a few times to create characters for some games, but at some certain point (especially when collision detection came in) everything became messy and the interaction between chars, the world and certain items had a lot of bugs. So here is my question, how do you ussualy keep track of actions that your character is allowed to do, or more in general do you have some links / advices how to set up a char efficiantly?

I´m working on a char right now, who should at least be able to run, jump, pick items up and use different fighting animations. Most ideas I came up with until now use some kind of action.priority / action.duration system to determain whats possible and what not, or a "action-manager" which defines for every action what is possible from that action on but it all doesnt work that well together.

  • 4
    \$\begingroup\$ Look at how statemachines work. \$\endgroup\$ – Sidar Oct 2 '12 at 6:54
  • \$\begingroup\$ Looks like you need to solve this question as resolved. I'll add an answer. \$\endgroup\$ – Sidar Oct 3 '12 at 8:55

You should look at FSMs -

Here's a good description for novice programmers: http://blog.manuvra.com/modeling-a-simple-ai-behavior-using-a-finite-state-machine/

  • \$\begingroup\$ figured that out too, thx though for the input =) \$\endgroup\$ – Jery Oct 9 '12 at 17:00
  • \$\begingroup\$ The link says "Page not found" now. Please update it or the answer becomes obsolete. \$\endgroup\$ – Krekin Mar 22 '16 at 17:30

As my comment suggested: Look at how statemachines work.


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.