• Register

DENIZEN is a story driven FPS set in a grim science-fantasy world with a heavy focus on mystery, character interaction and dialogue.

Post news Report RSS DENIZEN DevBlog #5 - "Skrall" AI Breakdown

A quick breakdown with footage of one of DENIZEN's enemy characters: the Skrall.

Posted by on

Hello, I'm Ian from Skunkape. Today I'm going to talk about the AI (Artificial Intelligence) for one of our enemies in DENIZEN, the "Skrall".



For some context here is an early draft Codex entry:

"According to reports from veteran forest dwellers Skralla are creatures that originated here in the cursed forest. They were once just trees, but now they have been given life by some unknown power. They are unreasoning monsters and act purely on instinct exhibiting no conciouss thought or intelligence. They have no physiological need to eat, but regardless kill indescrimatately. This makes them more frightening than ordinary monsters that kill for a reason. They have a propensity for hiding among undergrowth or stalking prey from above among the branches. Skralla are moderately dangerous and capable of attacking from long range and melee. One Skrall could easily kill a novice, but experianced forest dwellers regularly survive encounters with groups of three to eight Skralla."


My aim with the Skrall AI was to convey a sense of ferocity and danger but still maintain balance suited to combat against groups and mixed enemy rosters. The Skrall's AI consists of two major elements: Moveset and Pathfinding.

Moveset

An enemy's moveset is a lot of fun to work on because it is where most of their character can be defined. I'll go over the Skrall's attacks from least to most dangerous.

"Fireball"

Skralla can attack the player from range by throwing magic projectiles. These projectiles travel at a slow speed and have a small but not dangerous amount of splash damage. If you see them coming strafing out of the way is easy, but if one sneaks up on you you will have to use the dodge function to get out of the way safely. In situations where the AI cannot find a path to the player (e.g. you are standing on a narrow tree branch or ledge outside of the AI navigation bounds) they will try to find a good line of sight to the player and lob these projectiles until the player re-enters navigable space. You can see some footage of the behaviour below, but please note that the visual effects are placeholder. The final effect will resemble a flurry of leaves and blue magic energy.

Bash

Another common attack is a simple bash. When the player is within range the Skrall will charge forward and "throw a shoulder" into you like a football player. This attack incurrs a camera based stagger for the player making aiming difficult in a critical moment. To balance difficulty this attack is usually followed by a quick jump back so that the player is not constantly attacked and overwhelmed. To counter the bash attack the player can utilise his lateral or backwards dodge. Jumping up and backwards can also be effective.

Leap

Perhaps the most dangerous move in the roster so far is the leap attack. This attack is very effective against players who favor backpedalling. As seen in the footage below a backwards dodge will not always get you safely out of leaping range, therefore the most effective counterplay is a lateral dodge. This is an intentional design and is intended to keep the fight moving forward.



This represents an early draft of the Skrall's moveset, animations are not final and more will be added to round it out as DENIZEN continues development.

Navigation

Navigation may not be as exciting to work on as movesets but is nevertheless important. A great deal of work has gone into making sure that the Skrall AI can handle complex level geometry and vertical envioronments.

Corner AI

The most basic building block of navigation AI is corner navigation. There is not too much to say about it, other than we would really miss it if it wasn't there!

Ledge Jump AI

This is the interesting part about the navigation AI. You may recall from devblog #3 that DENIZEN has a somewhat complex climbing / "parkour" mechanic. This means that the player has the ability to rather quickly change his vertical position, so the Skrall has to be able to as well. To this end the AI monitors where the player is and when he enters a different vertical level the AI scans through an array of nodes (placed in the world by the level designer) and selects the most appropriate one. With this information the Skrall can reliably jump up to where the player is. If no nodes are available, either because the level design is not complete or because the player managed to get someplace unexpected the AI falls back to lobbing fireballs until the player comes back into an expected position.

Conclusion

Well that concludes our quick look at the Skrall AI! Thanks for taking the time to read it and I hope you found it interesting and enjoyable. Ah, and of course there is one more state the AI can be in, perhaps the most satisfying one...



Remember to check back here for DENIZEN updates, and if you find the project interesting then Sign up to be notified when the official demo is available. Thanks for reading!

Post comment Comments
Judicat0r
Judicat0r - - 507 comments

Godd job, all anims and AI look well done.

Reply Good karma Bad karma+1 vote
SKUNKAPE_INTERACTIVE Author
SKUNKAPE_INTERACTIVE - - 11 comments

Thank you!

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: