Libra

Game Features:

Tile Heat Maps and Distance Fields for AI Pathing

For all dynamically moving AI, their movement behaviors are guided by tile heat maps and distance fields. If an AI does not know the direction of a player they will pick a random point on the map based on the heat map of the entire level. From here the AIs calculate a distance field to that point and move down the distance field until the point is reached. If the AI sees the player, then it continuously calculates a distance field to the player’s current location. If the player goes out of the AIs view, they will follow their last calculated distance field to the last seen player location and then if the player is still not visible, they will return to their random patrol pathing.


4 Unique AI Enemies

  • Leo:
    • Dynamically moving AI that fires a single medium-damage bullet when the player is in sight
  • Aries:
    • Dynamically moving AI that has a shield on the front of its body that reflects player bullets
  • Scorpio:
    • Static AI that is continuously raycasting for the player and once in sight, rapidly fires low-damage bullets
  • Capricorn:
    • Dynamically moving AI that fires tracking, high-damage bullets and can traverse over water

Corrective and Preventative Collisions

As the player and AI move throughout the level, they are continuously using corrective collisions (discs and AABBs) to keep themselves out of walls and each other. For the bullets, they use preventative collisions to keep the chances of tunneling through tiles low.


XML Data-Driven Gameplay

All gameplay constants were transitioned from hard-coded C++ values into an organized XML definition system. There are definition files for the overall game configuration, map definitions, and tile definitions. By transitioning to XML data driving, this allowed for gameplay variables to be more easily editable in any text editor while also providing an increase in human readability which is very helpful for level designers when creating and defining maps.