|
This week I worked on a new "Task" system to compliment AI Behaviors, gave the southern side of the Isle of Kasau some preliminary layout passes, and improved the sea rendering.
|
AI Tasks System
This week I implemented a new "Tasks" system to compliment AI Behaviors. One thing that's been a little awkward in the past is that when an NPC changes to a different behavior (for example, after felling trees for a few hours the character needs to switch to a "go home and rest" behavior) they will immediately abandon what they are doing and engage in the new behavior. I call it the "work bell" problem, and it looks a little creepy when all the NPCs in an area drop what they are doing and leave at precisely the same time. While there was a "deactivate" event on AI Behaviors that got raised when the behavior changed it couldn't control the character beyond a single frame, and was limited to things like stopping animations from playing.
I hope to reduce those limitations with this new tasks system, as it allows for some "lingering" control over the character after a behavior ends. Antilia's character AI now has two levels:
- Tasks - Tasks are small, specific things that the character does that can be completed in a relatively short amount of time. They are never on-going. Things like "take items from a container" or "walk over to a tree and chop it until it falls or you run out of energy."
- Behaviors - The "behavior" level is responsible for queuing up tasks, and can be ongoing. Behaviors can now issue tasks in response to being deactivated, so when a character is done with a task for the day they might do a few things (such as unequipping tools or extinguishing a campfire) when the behavior changes.
Now when the "end of day" bell rings the characters will linger a bit longer, finishing up their current task and maybe doing a few clean-up chores before going on to the next thing.
Another reason I implemented this system is to allow for group behaviors. I can now create behaviors such as "party leader" and "party member" with the "leader" issuing tasks for multiple characters, and the "followers" requesting new tasks from the leader as they complete things.
Southern Kasau Design Pass
I also spent some time this week in the World Editor roughing in some ideas I've had for the southern side for the Isle of Kasau. This includes the mushroom forest (known as "Moivalau Forest" in the MMO), the large circular feature that'll be home to a Vaulei ruin, a set of caves, and an sea-side cavern with a small harbor inside of it.
I'm still playing with the layout and flow of these areas, and may end up flattening what you see here and trying something completely different. As I experiment with the area I'm building a library in my head of features that I like or that I can imagine being more interesting if they were changed this way or that.
One thing I do like about this design is the idea that the only safe place for large ships to dock at the Isle of Kasau is inside a cavern harbor, which I can potentially create using the terrain engine's "overhangs" system. This led to the idea of a cavern passage connecting that harbor between Western and Eastern sides of Kasau, creating a defense challenge for trade and travel.
The caves are still rough of course, and lacking any detail like stalactites. I'm excited to see where that goes.
Sea Rendering Improvements
For a while now the sea reflections have at times been a bit of an eyesore whenever the water is at a height other than "zero". This week I experimented with a fix that ended up working better than I thought it would, solving the issue about 90% of the time. There is still some weirdness in places where the camera can see water at two different elevations at the same time (around waterfalls), but that's not an uncommon problem for game engines.
That's it for this week!
|