Recursive Backtracker Maze

Get help using Construct 2

Post » Thu May 17, 2012 10:40 pm

Has anyone come up with a Capx explaining how to create a grid type maze using the Reclusive Backtracker (RB) algorithm in C2? I have seen a few different methods used, but I don't remember a "perfect maze" example?   Or did I miss it?

B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Thu May 17, 2012 11:06 pm

Cubemaze uses the Recursive Backtrack algo (:

For a capx hmmm I don't have a basic one right now... Shouldn't be too hard though
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu May 17, 2012 11:28 pm

Thanks Yann. I was hoping someone had a capx handy that I could tear apart. I created a few random maze generators, but not so that they use every cell in a "perfect maze". I would like to build the maze in an array using that sort of algorithm, then display it graphically.

I know it is not a "simple" event list, but I was hoping someone could post something close that I could manipulate to what I need. Until then I will keep trying on my end.

BTW, do you think building it graphically then writing to an array would be easier?

B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Fri May 18, 2012 2:21 am

Building graphically is often heavier on the cpu because you have to handle many object instead of simple numbers in an array.
I did a cave generator some months ago, starting by covering the screen with sprites and mining with 'miner' sprites... it was waaaay slower than the array solution I built afterward.
Anyway here is the thing
mazeBackTrack.capx
Last edited by Yann on Sun Sep 14, 2014 9:15 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri May 18, 2012 3:55 am

Thanks Yann. I will use this to help me build an array version. If I do It I will post a link :)
B
192
S
6
G
7
Posts: 213
Reputation: 10,178


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests