Use the arrow or HJKL keys to move. Try to gather all the crystals! Press the F or M keys to show a minimap. You can generate maps of different sizes by pressing numbers 1 through 7. (The generated map will be of size pow(2, 2 + N), where N is the number you pressed. That means the largest map is 512x512; be very patient to let that one load!) Or you can press 0 to enter your own dimensions (the width and height don't need to be the same).
Silly script to generate a videogame-like maze. This always generates finite mazes within a given rectangular space. This revision adds crystals to be found. (These show up on the minimap, if you're having trouble finding them.) It also adds a status bar showing how many crystals have been collected, and tweaks a few scripts to be slightly nicer (thinner corridor rendering for better minimap, C key is less immediately dangerous).