This project explores the fascinating world of pathfinding. It includes a built-in level editor that lets you design your own maps and watch the algorithm calculate the shortest path between two points. Like any pathfinding system, it works with passable tiles and obstacles, but I wanted to go further. To make things more interesting, I’ve added doors that can be either open or closed. Closed doors act as barriers, and the only way to open them is by using levers. But you’re not limited to simple lever–door connections. Instead, you can design complex conditions for opening doors by wiring levers through logic gates, giving you full control over how the environment behaves. At first glance, this might seem a bit complex, but don’t worry! To help you get started, I’ve included a demo level that showcases all of these features. You can load it into the editor with just one click and see everything in action.
Once you’ve loaded a demo level, just click on Run pathfinding below the canvas. The little character will appear on the starting tile and it will automatically find the shortest path to the goal by interacting with the environment along the way. By default, the solution animation plays automatically, but you can use the control buttons to pause, step forward/backward, or replay the path. When you’re done, click on Cancel to return to editor mode. One last tip before your level design journey begans: don’t forget to export your level before running the pathfinding algorithm.
The level editor is designed to be simple and intuitive. You can build maps by selecting tiles from the toolbar and placing them directly onto the grid. Instead of clicking one tile at a time, you can click and drag to draw larger areas, making map creation much faster. Objects (except walls) can be moved easily by clicking and dragging them, making repositioning quick and easy without needing to delete and replace them. Wiring is handled with the right mouse button: right-click on a lever or logic gate to start a wire, then right-click again on another element to connect them. Wires can’t contain loops, so only combinational circuits are allowed. To toggle a lever’s state, simply left-click on it. The editor also includes an automatic logic gate rotation system to assist you with cable management, and to keep your circuits clean and organized. However, if you prefer a different orientation, the rotation tool is available in the toolbar, allowing you to adjust the gate’s orientation yourself.