Original Post — Direct link

How long/hard was it to make the AI for the characters in Odd Realm? Was there anything specific that was really hard to make?

External link →
about 2 years ago - /u/unknownorigingames - Direct link

Well, on the surface, the AI doesn't seem too impressive. The entities aren't writing plays (yet!) or anything. However, the job system and entity state machine was extremely challenging to write. I've had to re-write it several times over the last five years of development. The problem was that I learned a lot as I went (which meant I wanted to throw out garbage code I had written previously) and that the game got more complicated over time. It's super difficult to write something that can catch every edge case. That said, it's finally in a place that feels comfortable to work on and expand upon. Entities still have little behavior issues but it's much easier to address them now.

As for specific challenges, there are so many...

Writing a job system that could assign entities jobs based on priority was interesting. You have a lot of things to factor in for just assigning them a job. Then, what happens when something goes wrong. i.e., The entity dies, or the items it's on the way to collect get destroyed, or they all-of-a-sudden get hungry/thirsty. How does the job/entity handle that. Additionally, the individual jobs (blueprints) vary quite a lot. Building a floor under a stool is a lot different from logging a tree. So, you have your entity state machine AND a job state machine. It's a lot to keep track of, and that's not even talking about the pathfinding, animations, world rendering, UI, and optimization support needed.

about 2 years ago - /u/unknownorigingames - Direct link

Originally posted by OldApple123

Oh wow! That is a lot of issues. But I have to say, all of the re-writing that you did really worked out. You made the game super satisfying and interesting! I never thought that there would be so many bugs underneath the surface.

Thanks! Glad you are enjoying it. Still a lot to add, so it's promising that you find the fun before it's done. :)