This project is a visualization tool that demonstrates how Breadth-First Search (BFS) can be applied in 2D games for NPC pathfinding. Built with C++ and SFML, it simulates how a non-player character (NPC) navigates through a grid-based environment to reach a target point (usually the player).
- BFS Algorithm – step-by-step expansion of the search frontier to find the shortest path.
- Path Visualization – displays visited nodes, frontier expansion, and the final optimal path(since each action has uniform cost).
- Interactive Simulation – lets you observe how NPCs decide their movement toward a target in real time.
- Game AI Relevance – mimics the decision-making process used in actual 2D games for enemy or ally navigation.
This project is intended as both an educational tool for learning graph search algorithms and a foundation for implementing AI pathfinding in games.