An extremely important technique used in modern games is path-finding. In second year of university I implemented a number of pathfinding techniques such as Dijkstra’s Algorithm, Lee algorithm and the A* algorithm.
Below is a demonstration of my implementation of the Lee Algorithm, using C++ and the SFML library for graphics:
The program works by initially placing a start and end point on a grid, and drawing a maze between the points. Once a maze is created, the spacebar is pressed and a path is drawn between the two points.