Log In  

Cart #59148 | 2018-11-18 | Code ▽ | Embed ▽ | No License

This is much along the same lines as Gembit's remarkable game, "Eternal Tower" HERE:


and Polyphonic's random map generator HERE:


I've always wanted to write the code to a cavern maker where literally each wall is randomly placed and then checked to ensure that the areas around it can be reached.

And now you can ! Guarantees that all points can be reached despite the placement of the walls.

Change DEBUG in beginning to:
0 = Only draw completion
1 = Show the walls being drawn (default)
2 = Show the scanning process for each wall

Running into a bug, let me leave the stairs off for now. Should still run fine.
Got it fixed, should be alright now.

The randomly placed stairs leading up and down are considered FLOOR. That is, if you touch them, you can decide to take them or not. If I try to treat them as walls, they can get stuck in other walls.

Now my question is, can someone optimize this code so it runs considerably faster ?

Thanks, and enjoy !

P#59134 2018-11-18 12:37 ( Edited 2018-11-18 19:19)

Can you please don't insert spaces before the exclamation or question mark symbols?

Where did you get your English knowledge from?

P#64257 2019-05-09 12:15

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-10-16 21:36:12 | 0.008s | Q:13