TinyKeep is an upcoming action roguelike game with procedurally generated dungeons, emergent monsters, deadly traps and mysterious secrets.

Report article RSS Feed TinyKeep's AI System (Part 2 of 5)

Learn how TinyKeep's AI handles monster retreat and defensive behaviours! Also a brief mention on the minor improvements over Part 1 - thanks to community feedback.

Posted by phi6 on May 19th, 2013

Before I crack on to Part 2 (Retreat and defense) I would like to quickly cover the minor improvements we made since Part 1 of this AI series. Thanks to community feedback we've added a few more features, removed others and hopefully will have created more realistic behaviour.

In short, the changes are:

1. If the Skeleton loses sight (raycasting towards hero) and smell (raycasting towards dropped breadcrumbs), he will still continue to head towards the location where the hero was last detected and investigate further.

2. If the Skeleton still cannot find the hero, it will make a best guess where it thinks he has gone and will set a patrol route to the nearest waypoint. Given these changes, we've removed the alert level as we've found this feature has become redundant and offers no extra intelligence. The "smell trails" have been reduced to balance the extra added behaviour - this also seems to help limit cheating in the AI.

Ok, let's bring on the fun stuff!

AI Explained - Part 2 of 5: Retreating and Defense, featuring TinyKeep's Fire Imp Monster!

Fire Imps (and other monsters marked with the "Shy" personality flag) will run away from the player if he gets too close. Put him in this level of distress for too long, and he'll breathe fire on you.

The interactive demo is here on the TinyKeep website along with all of the previous demos:

As with all of these AI behaviours, what you see on the video and demo are the default settings for each of the personality flags (Aggressive, Cautious, Shy, Lumbering etc...). However we've designed our AI editor to be a lot more flexible than that - so our game designer Ben can choose from a multitude of variables to customize his monsters:

  • Enable/disable line of sight (blind monsters)
  • Smell/sound sensitivity (monsters with amazing sense of smell)
  • Roaming speed, chasing speed, fleeing speed
  • Enable/disable wall avoidance (in case some monsters can walk through walls!)
  • Distance threshold before alerted
  • Require line of sight before alerted
  • ...and many more!

We know that this will give us the ability to create really unique and varied monsters, and part of the fun of the game is figuring out the behaviours of each one.

Hope you enjoyed the post, and let us know if you have any questions about the AI!

Post comment Comments
Arkanium May 23 2013, 7:35pm says:

Interesting. Have you considered adding flocking behaviour to the fire imps so that a group which are friends will tend to flee in a similar direction? Or would this make catching them too hard if they are all breathing fire?

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Windows, Mac, Linux
Developed By
Send Message
Official Page
Release Date
Released Sep 28, 2014
Game Watch
Track this game
Report Abuse
Report article
Related Games
TinyKeep Single Player Roguelike
Related Engines
Adobe Flash Professional
Adobe Flash Professional Commercial Released May 5, 2010