INDUSTRY:
SOFTWARE ENGINEERING
CLIENT:
QUT
YEAR:
2022
EXPERIENCE:
C#, OOP, PROGRAMMING
C# A* Pathfinder Integration
about.
This project is a console-based stealth simulation game, developed using C# and .NET 6.0, that leverages the A* pathfinding algorithm to calculate safe routes through a matrix-based environment populated with security obstacles.
The user plays the role of an agent navigating a hostile environment where guards, fences, sensors, and cameras serve as dynamically placed threats. Using a menu-driven interface, the agent can customize the environment, request intelligence, and calculate secure paths to a given objective — all while avoiding detection.
challenge.
Developing the stealth pathfinding system presented several technical and design challenges, particularly in managing dynamic gameplay environments within a structured console interface.
Challenge: Dynamically Expanding the Grid
One of the most complex aspects was enabling the matrix field to scale dynamically as obstacles and coordinates beyond the initial bounds were added by the user. This required a flexible data structure that could grow while maintaining performance and compatibility with the pathfinding logic.
Solution:
Implemented a dynamic 2D list structure that expands based on the maximum X and Y values entered by the user.
Ensured that the A* pathfinding algorithm and obstacle placement logic could adapt to the new dimensions in real time without breaking traversal or map rendering.
Added boundary checks and validation layers to catch invalid inputs and maintain data integrity.
Additional Considerations:
Developed internal methods to redraw and revalidate the map after any update to field size or obstacles.
Optimized performance for larger grids by pruning unnecessary nodes from path evaluation, improving the A* search's efficiency.
code.
Here is the code snippet of my A* algorithm
Other snippets