So some time ago I made a program that controlled "water" using the flood fill algorithm. Then I discovered that said algorithm can be used as a path solver, so I decided to make it... And I did.
Note - I didn't make the maze generator! It was made by gestaltist, and I got it from here.
Instructions are written in-game.
Update 2 -
•Now solving is much more efficient and faster, because the flood fill stops when it touches the maze's end.
•The maze's start and end are in random positions in every new maze.
•After solving you get a cool animation, cause why not?
Please reply and tell me what you think!
Flood fill path solver
Flood fill path solver
- Attachments
-
- flood fill solver 2.love
- (2.27 KiB) Downloaded 259 times
Re: Flood fill path solver
This awesome!
Well done.
(I am going to read the code and steal how it works for other things)
Well done.
(I am going to read the code and steal how it works for other things)
Learning to Löve.
Re: Flood fill path solver
Thanks! I appreciate your feedback.skyHights wrote:This awesome!
Well done.
No worries, actually. You can take the code and do whatever you want with it.skyHights wrote: (I am going to read the code and steal how it works for other things)
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: Flood fill path solver
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Who is online
Users browsing this forum: No registered users and 2 guests