Weekly Update - Combat, Server Improvements

Last week I started planning and working on Antilia's combat system, including enemy detection, an AI behavior to follow/chase another creature, and made some server improvements.

Combat Progress

As a first step toward combat my goal for last week was to get the iichii back in the game and moving around. Along the way I made some needed improvements to the game engine's spacial system, server variables, and established some new AI Behaviors.

The iichii are back and looking for tails to bite!

There is quite a lot to do in order to get combat in the game again, and as I typically do I've created a list of items which I'll be crossing off in the weeks to come:

  • AI Creature and Combat Behaviors - Antilia will need some new AI behaviors related to combat including "attack enemies in range", "defend" (attack only after being attacked first), "defend target" (such as a creature nest), "flee/retreat", etc. The more interesting and flexible I make these the more diverse Antilia's critters can behave!
  • Behaviors Editor - As the AI behavior trees become more complicated I'd really like a tool to modify those and adjust their parameters (something quicker than recompiling the C++ code and restarting the server and client repeatedly). It is a case where investing a bit of time creating a basic editor will very likely save a lot of time recompiling and testing. (For now this will probably be added to the HTTP Admin tool rather than in-game, as it is faster to build that way.)
  • Combat Tool Modes - Items like weapons and tools that can be equipped in the hands can place the game in a "tool mode" when used. For example using the fishing pole places the game in a "cast fishing pole" mode. We'll need new tool modes for melee and ranged weapons.
  • Combat Collisions - There are some decisions to be made here as to how we'll determine if a hit was successful or missed. How this gets implemented will have a dramatic effect on the "feel" of the combat. (Action-RPG vs. MMO style.)
  • Projectiles - I'll also need a projectile system that tracks flying objects like arrows and detects when they hit something.
  • Creature Aggro System - I'd like to think about a more robust system for tracking which enemy a creature should prioritize attacking, something better than just "attack closest target".
  • FBX Animation Import - The FBX importer included in the Antilia Editor doesn't import animations yet. Adding support for this will allow me to use dozens of existing animations included with the commercial assets, commercial animation libraries, and potentially motion capture from my VR setup.
  • KO State - Players and enemies will need to be placed in a "KO State" when their health reaches zero, and players will need the option to respawn.
  • Drops and Rewards - A system for rewarding EXP or other drops.

There are still a lot of questions I am working through for the combat system. Will there be different damage types? How will experience be earned? Will support characters earn experience from combat? How will drops and rewards work? Will little numbers appear next to creatures when you deal damage? Will players drop their inventory and need to go fetch it when they get knocked out? I may bring up these questions and more over the next few weeks in the #development channel in our Discord server for brainstorming and feedback.

Server Improvements

A new feature I added to the server last week which deserves a small mention is the new Persistent Server Variables system. I'll spare you all the extended explanation of why we need a Server Variables system in the first place the server is multithreaded - very easy and generally bad to change a variable in one thread while another thread is reading it. The summary is that this feature provides a convenient way to save global data between sessions.

As a practical example - speaking to an NPC character might trigger an event that impacts a region or guild. Let's say for example you speak with Torliila and encourage her to host a fishing contest. That information needs to be available to other NPCs and server processes, so storing it inside the per-character "memory" system doesn't work. In this case the conversation file would want to change a Server Variable, and then other scripts and conversations can look for that variable and act on it. By setting a Persistent Server Variable the change will persist when the server is shut down and restarted later. (Or you save and reload your game in single player mode.)

Experimenting with persistent server variables in the HTTP Admin tool.

It probably seems a bit strange that they weren't persistent already, but up until this point I didn't have a scenario that called for it.

I've also started experimenting with some persistent server variables to control things such as spawn rates, experience gain multipliers, and resource drop rates. When creating a new game these will be set up based on game scenario settings, and on multiplayer servers the admin (game master?) can tune them in real-time if needed.

And one last minor feature I added - I can now view the server's log file live via the HTTP Admin tool. I don't imagine that'll be of any interest to anyone but myself for a while, but it's a feature I've needed a few times now.

Just what you've all been waiting for - a live view of the simulation log!

That's all for this week, thanks for reading!