hi
i am just playing around with b4j and i created a maze generator lib that creates randomly a full maze (with animation)
the maze is stored with custom types to a list so you can easily move a character in it since you have all walls stored.
you can change the cell size either if you want. this maze lib (class) can be used in b4i,b4a,b4j
it is not finished now but i will upload the jar so you can see how it works.
after the maze is finished it will start again and create a new random maze.
you can create with this class very simple a maze game
(code size < 150 lines!!)
i am using this algorithm https://en.wikipedia.org/wiki/Maze_generation_algorithm#Recursive_backtracker
what do you think?
EDIT (02/01/2018): source code added, have fun!
i am just playing around with b4j and i created a maze generator lib that creates randomly a full maze (with animation)
the maze is stored with custom types to a list so you can easily move a character in it since you have all walls stored.
you can change the cell size either if you want. this maze lib (class) can be used in b4i,b4a,b4j
it is not finished now but i will upload the jar so you can see how it works.
after the maze is finished it will start again and create a new random maze.
you can create with this class very simple a maze game
(code size < 150 lines!!)
i am using this algorithm https://en.wikipedia.org/wiki/Maze_generation_algorithm#Recursive_backtracker
what do you think?
EDIT (02/01/2018): source code added, have fun!
Attachments
Last edited: