RetroBASIC
Retrogamecoding(.org) => General game development => Topic started by: lelldorin on March 07, 2018, 09:47:29 PM
-
Do you have any idea how to proof if the user have a complete connection from the sztart to the end?
(https://discuss.haiku-os.org/uploads/default/original/2X/5/547206d592235ac0a60254ab8d3e2deec938b093.png)
I have no idea how to proof this. The playground is ready. This game is written in yab (yet another basic on Haiku operating system)
-
There are many ways to do this, check Wiki: https://en.wikipedia.org/wiki/Pathfinding
A* is efficient and will determine if a path between two points on your grid exists. If you're not terribly worried about speed (or memory consumption) then a simple flood fill will be more than equal to the task - if it completes and the goal position has not been visited, then no path exists.
-
Thanks a lot, i will take a look :)