Share this project


Share this project

Master the frantic physics-based combat, lure enemies into traps or make them fight each other for dominance in this procedurally generated dungeon escape game.
Master the frantic physics-based combat, lure enemies into traps or make them fight each other for dominance in this procedurally generated dungeon escape game.
Created by
802 backers pledged £25,675 to help bring this project to life.

TinyKeep's AI system (Part 1 or 5)

Posted by Phi Dinh (Creator)

--> Part 1: Roaming and Chasing <--

Part 2: Retreating and Defense

Part 3: Foraging

Part 4: Group Tactics and Luring

Part 5: Monster Rivarly!

Welcome to the first of the multi-part series of updates about TinyKeep's AI! Over the next few days I will be posting a series of videos about the monster intelligence system that we've developed for the game. Today I'm going to talk about simple roaming and chasing behaviours for a single monster. For the later parts, I'll progress to more sophisticated concepts such as Group Tactics and Rivalry.

I've already written at length about the plans we have for the AI on our main Kickstarter page, so I won't bore you anymore here. Instead, I feel that the AI is best explained visually and interactively so here's a playable AI demo for Part 1:

Try it here:

Note that I'm not using the 3D graphics you've seen on the video and screenshots. For testing and debugging purposes it is often best to use simple 2D graphics so I can easily annotate and visualize what is going on.

Here's the accompanying video explaining the major aspects of roaming and chasing!

For the next update I'll talk about Retreating and Defense. Unlike the Skeleton shown here some monsters are less aggressive and will flee at the sight of you. Stay tuned...


Only backers can post comments. Log In
    1. Dean Thrasher

      Nice! You're way ahead of me. That should make for lots of great variations in monster behavior.

    2. Phi Dinh Creator on

      Hey Dean, yes absolutely all of this is customizable in our flexible AI editor. We have variables for sight, sound, smell, and enabling/disabling raycasting for all of these. Similarly our giant Rock Monster was born blind and so can't see you either ;)

    3. Dean Thrasher

      Love the interactive demo! It'd be great to see more Kickstarter game projects do this. It's a great way to get the feel for certain mechanics in the game.

      I noticed in your video that the monster can't hear you if you sneak up from the rear. Have you thought about separating the line of sight and the sound/smell mechanics? I imagine some of the monsters would have keen enough ears to hear the heavy tread of a mailed boot behind them...

    4. Phi Dinh Creator on

      Hey again! All of these things are currently variables that can be customized for each monster type. Obviously we don't want every monster to behave exactly the same, but the demo you see here shows the foundation behaviour.

      I'm currently working on a monster AI editor for Ben to use when creating his monsters, it's very flexible and allows for what you are suggesting, you can change smell distance threshold, max alert levels and such. There is an option for a monster to detect smells even if they are not in alert mode. You can even disable line of sight completely and just chase after nearest things, in case we want to do a ghost type character that can move through walls. But I'll be sure to point him to your ideas and make sure they are considered!

      Ultimately it will be the playtesting phase of the game that will decide what behaviours are the most fun for the game and should be kept in. Behaviours that aren't noticed by the player, too clever for its own good should be discarded for the sake of gameplay.

      As for leaving smells - these are all customizable as well, so we might one day decide to have the character more smelly if he's using a certain kind of weapon - or has a smelly pet for example.

      Thanks again for your suggestions!

    5. Missing avatar

      Stephen McGowan on

      Another point I'd make is that if the player is making detectable sound/smell then shouldn't a monster pick this up even if the monster isn't in alert mode? Perhaps some kind of ray from the monster to find nearby smell circles would be good even when not in alert mode.
      Obviously a stealthy player would leave less, smaller or no circles?

    6. Phi Dinh Creator on

      That's very true! We can add this feature to the smarter monsters, maybe even use the waypoints as a reference to the hero as well. Each monster will have varied level of AI depending on their "perceived intelligence".

      Thanks for the comment!

    7. Missing avatar

      Stephen McGowan on

      Looks good but when an intelligent monster loses the trail I think it would be more realistic for it to make a best guess to where the player went, or at least keep moving forward in the direction the trail had been going to try and pick up the trail again rather than just switching straight back to random roaming.