GO BACK

About

This project started as a class assignment, but I pushed it further to deepen my Unity skills and apply code architecture principles from other courses. It served as a hands-on learning experience, refining AI behavior and game structure beyond the initial scope

Project Info

  • Role  :  Gameplay Programmer

  • Team Size   :  1  Programmer .>>>>>>...

  • Time Frame  :  5 Days

  • Engine  :   Unity | Using C#

Introduction

This project was an exciting challenge that started as a class assignment but quickly evolved into a deeper exploration of AI and code architecture. Developed over several days, it became a key learning tool for refining Unity skills, design patterns, and SOLID principles. I focused on AI behavior, game structure, and optimizing workflows while ensuring minimal reliance on singletons to maintain flexibility and avoid tight coupling

Pushing beyond the initial scope allowed me to experiment further, solidifying my knowledge of
AI decision-making, modular design, and scalable systems in game development

What I learned/Worked On

Github - Source Code

This project was a deep dive into AI programming, code architecture, and game system design in Unity. I focused heavily on structuring the AI using Minimax with Alpha-Beta Pruning, optimizing its decision-making process while ensuring efficient performance. Debugging AI behavior required me to implement visual debugging tools, helping me track decision paths and validate AI logic in real-time

MinMax AlgoAlpha beta Pruning
Debug helper Editor

One of the biggest challenges was structuring the project while strictly limiting the use of Singletons. I applied Singletons only for state management and ensured that only one manager controlled the game state. This approach reinforced my understanding of SOLID principles, making the codebase scalable and maintainable. I also explored composition over inheritance, breaking down game mechanics into independent, reusable components instead of relying on deep inheritance chains

Beyond AI, I worked on game state management, designing a turn-based system that dynamically handles AI and player actions. Implementing different game modes (PvP, PvAI, and AI vs AI) challenged me to build a flexible game loop capable of handling various input types while maintaining consistency

Github - AI Source Code

Additionally, I refined my shader programming skills, creating an animated procedural background for the menu using Shader Graph. Debugging shader issues and adjusting parameters for dynamic color variation helped me gain more confidence in working with Unity's rendering pipeline

Shader Graphj 1Shader Graph2

Another key lesson was balancing abstraction and practicality. Initially, I aimed for highly flexible and abstract code, anticipating future modifications. However, as the project progressed, I realized the importance of keeping things simple and refactoring when needed, rather than overengineering from the start. This shift in mindset improved my workflow and allowed for faster iterations

Overall, this project was a
technical and creative challenge that pushed me to refine AI logic, improve game architecture, and optimize Unity workflows, all while keeping the design modular, performant, and easy to expand