Skip to content
← Back to projects

CS4303 P3

A mining game with agent AI & procedural content

AI

COURSEWORK

GAMES

JAVA

April 2024

Source: https://github.com/lixitrixi/cs4303-p2

Report: https://www.overleaf.com/read/rrcvdfrnbkmf#b72078

This project was developed as part of the Video Games module and combines two core areas of game development: AI for game agents and procedural content generation (PCG). The result is a complete and replayable tile-based strategy game, inspired by Dungeon Keeper (1997), in which the player commands autonomous creatures to excavate terrain, gather gold, and defend against enemies hidden in a fog-shrouded world.

The first phase of development focused on implementing agent-based AI. Using a combination of decision trees, pathfinding via A*, and environment-aware behaviour, different creature types were given distinct roles and intelligent behaviours. Friendly creatures perform tasks such as mining and defending, while hostile creatures react to proximity and player activity. Game state is maintained in a dynamic tile-based map system with destructible terrain and animated fog-of-war revealing.

Building on this foundation, the second phase introduced a constraint-based procedural level generation system. Using Perlin noise, morphological image transforms, and reachability analysis, terrain features like bedrock borders, rivers, caves, and gold deposits are algorithmically created to ensure both variety and fairness. The generation pipeline balances randomisation with constraints to ensure all levels remain winnable and engaging. Difficulty settings affect level size and enemy density, enhancing replayability.

Together, these phases demonstrate a cohesive integration of gameplay logic and automated world-building. This project was a rewarding exercise in designing emergent systems, implementing intelligent agent behaviour, and transforming raw data into meaningful game environments—all essential skills for modern game development.

A full report is available here.

Felix Leitner • Source