Click the green flag to generate a new cave. Press the 1 to show sliders and 2 to hide them. Also, press 3 to reset the sliders. The variables a and b deal with the way the map generation works. ----------------------------------------------------------------------------Can now detect rooms and the edges of those rooms. Use arrow keys to move.
Credits go to Sebastian Lague https://www.youtube.com/watch?v=yOgIncKp0BE The collisions work without using the if touching blocks so it's not laggy at all!