Animal AI & Non humanoid fights

Woody

Well-known member
Apr 4, 2021
370
317
63
tl;dr: Non humanoid NPCs (no swingable weapons) combat should revolve around leaps, lunges, charges, swipes that have to be dodged but are telegraphed in a way that you have time to move and indicate to the server you've moved in time (some kind of lag compensation).

So I'm well aware that AI is currently placeholder in game for many animals and non humanoids however, I'd like to put on paper an approach for how AI could be implemented moving forward. The challenge that comes from server-side AI, is the issue of physics and synchronization. This limits the developers in how engaging this kind of content will end up being as typically, servers aren't very good at physics based mechanics because it takes the player-clients connected to the server, to translate and simulate to a degree, the interaction with the AI and its physics. There's a good reason why in other games like Rust, that the animals with melee attacks are still one-dimensional to this day. Furthermore, when it comes to synchronization, well this is obvious, we're playing on a world server with a variety of pings so perhaps some of the work done on ping normalization is portable to AI however, this leads me onto the main idea which is telegraphed attacks.

For each animal different characteristics of how they attack you should be clear and telegraphed. For example, a wolf pack should look to circle the player target and then periodically each animal would stop, briefly prepare to pounce (telegraph) then lunge forward dealing damage to anyone in it's short path. On this note, it wouldn't make sense for blocking to be the way to counter this mechanic or at least blocking shouldn't protect against all damage from the attack but instead, moving/dodging/sidestepping (however you want to call it) should come into play. If the attacks that do happen from animals are telegraphed and fixed in position to a point where moving out of the way is viable, then the server can evaluate across all pings (due to SV's ping normalization techniques) whether or not the movement or action is valid in time and subsequently no damage is taken. This template could then be applied to multiple types of attacking animals in the game to the point whereas:

a) Every animal must do damage via some kind of telegraphed attack that allows the player ample time to move and dodge rather than parry (they don't have swords people)
b) Each animal must have a unique mechanic which telegraphs the attack e.g.
  • Bear swipe that causes a bleed.
  • Wolf pounce/lunge over a short line that damages all players struck.
  • Razorback charge in a line over a long distance and a knockdown effect when struck.
c) blocking where it makes sense, e.g bears swipe (with a shield?) should only mitigate some damage and not 'parry'.
d) Look into brief scripted immobilization/knockdown mechanics that stun/lock the player down for a moment (think a Deathclaw in fallout when it picks you up). Have mitigation through stats e.g dex gives quicker recovery time, const less damage taken from knock, strength immunity to certain knocks?
e) animals should fear/run away after taking a certain amount of damage or after their pack is killed.

Note: Telegraph doesn't mean displaying colours or areas on the ground. Telegraph meaning that we can determine when the animal is attacking and when to move.

Hopefully what this approach may do is make it somewhat more engaging and remove the feeling that both humanoid AI and animal AI are two separate games.
 
Last edited:
  • Like
Reactions: Skydancer