Toby's Terror is an interactive horror video game developed by Team Skynet Dev Club for the Introduction to Artificial Intelligence class at Texas Tech University. Developed using Unity, the game challenges players to outmaneuver Toby, a relentlessly adaptive, AI driven enemy NPC. Toby’s advanced behavioral logic is powered by Finite State Machines, Unity’s NavMesh, and custom raycasting systems, enabling him to patrol, chase, and react dynamically to player movement within a modular, richly detailed 3D environment. This project demonstrates both theoretical understanding and practical application of AI techniques in gaming, teamwork and project management, and a commitment to delivering polished gameplay for modern consumer hardware.
Unity: The game engine used for development.
C#: The programming language for scripting the game's logic.
- Finite State Machine (FSM): The architecture used to control Toby's AI behavior.
- Navigation Mesh (NavMesh): Used for pathfinding in the game's dynamic environment.
- Raycasting: Implemented to improve Toby's navigation and prevent getting stuck in obstacles.
- AI-Driven Enemy: Toby’s behavior is powered by a Finite State Machine (FSM), allowing for fluid transitions between patrol, chase, and search states. This creates unpredictable gameplay and elevates replay value for players.
- Real-Time Pathfinding: The NavMesh system enables Toby to traverse complex environments with O(log n) computational efficiency, reliably chasing players and reacting to changes in the map.
- Raycasting Logic: NPC maintains spatial awareness and obstacle avoidance through continuous raycasting, preventing pathfinding failures and enhancing immersion.
- Scalable Performance: The project is designed for optimal runtime efficiency and modularity, with core gameplay loops executed in C# and Unity handling asset management and rendering.
- Professional Asset Integration: Modular First Person Controller and POLYGON Dungeons assets were used for rapid development and AAA-quality visuals.
- Team Collaboration: Developed by a talented team of four, showcasing advanced planning, version control (GitHub), and distributed development practices in a real-world project.
- Complexity Stats:
- FSM decisions: O(n) per update cycle
- NavMesh lookups: O(log n) by environment size
- Game runtime optimized for smooth experience on consumer hardware
- Clone the repository:
git clone https://github.com/your-repo/tobys-terror.git
- Open the project in Unity.
- Ensure all necessary packages are installed via Unity Asset Store:
- Modular First Person Controller
- POLYGON Dungeons
- Build and run the game from Unity.
This project was a collaborative effort by the members of Team Skynet Dev Club:
- Dhruv Maniar
- Hunter King
- Taylor Dobson
- Sebastian Baglo
References:
- Sindhu, R. M., et al. "Development of a 2D Game using Artificial Intelligence in Unity." 2022 6th International Conference on Trends in Electronics and Informatics (ICOEI), 2022, pp. 1031-1037.
- Toll, Wouter G. van, et al. “A Navigation Mesh for Dynamic Environments.” Computer Animation and Virtual Worlds, vol. 23, no. 6, Wiley, June 2012, pp. 535–46.

