I thought I'd start up this thread as somewhat of a diary on my work on the AI for OpenKatana. Sadly the AI is one of many things that I've left kinda last minute since I've been so focused on the engine and everything else I've just never found the time, and having to write up most of it from scratch isn't exactly too easy (though some old code has been brought over to save time so that's alright). I'll probably document various bits and bobs on what we're doing here so that others may either learn from our mistakes or offer their own input. Now the AI in OpenKatana is nothing special despite how I've often spoken about it like it is, that's mainly just to get people interested with what we're doing here and there's no point showing no enthusiasm about such things! Anyway right now it's rather late so I'll just jot up a few notes here and continue writing out the rest of this tomorrow at a more reasonable time. May I also add that I'm no expert in artificial intelligence and this is actually my first go at writing up some related stuff, though I must admit it's always been a keen interest of mine which is why I'm putting so much thought into it.
Things I'll go into in the following posts are the states, waypoints, emotions and relationship stuff and I'll update all this as I do more work and share ideas or thoughts I've had (again I'm no expert here).
Also for those that don't know what OpenKatana is, OpenKatana is a remake of the infamous Daikatana with our own twists, the project is both highly ambitious and we have access to pretty much everything from Daikatana's development to help us reach our goal.
OpenKatana uses a state-based system for each monster, these states are composed of two types and those are "think" states, and standard states such as awake, asleep or dead. The current list of states is as follows...
Code: Select all
MONSTER_STATE_DEAD, // Monster is dead
MONSTER_STATE_AWAKE, // Monster is awake
MONSTER_STATE_ASLEEP // Monster is asleep
Code: Select all
MONSTER_THINK_FLEEING, // Monster is fleeing
MONSTER_THINK_ATTACKING, // Monster is attacking
MONSTER_THINK_WANDERING // Monster is just walking around
After that we have a basic like / hate relationship check for each monster, this was initially planned to be a little more complex but for the sake of time I've kept it simple. Monsters are basically either good or bad, depending on that other monsters will decide to either attack, run, hide or whatever they need to do about the other monster that may be within their sight. What I have planned in the future is to have a list of predifined relations for each entity and if a particular entity is not on that relationship list and that monster is looking at it then his interest in that will increase, he'll approach and our relationship with that entity will be based on the response we get, but this feature is somewhat pointless in something like OpenKatana due to its fast-paced nature (but it's perfect for our next project) so that's on my list of future plans.
Code: Select all
MONSTER_RELATIONSHIP_HATE,
MONSTER_RELATIONSHIP_LIKE