ScratchData LogoScratchData
Back to _nix's profile

Dungeon generator + Minimap

_N_nix•Created January 30, 2018
Dungeon generator + Minimap
34
24
423 views
View on Scratch

Instructions

Use the arrow or HJKL keys to move. Try to gather all the crystals! There's a minimap of the places you've visited in the bottom left corner. Press the F or M keys to show a bigger version of the map. 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).

Description

Silly script to generate a videogame-like maze. This always generates finite mazes within a given rectangular space. This revision cleans up the rendering code very, very significantly, resulting in a cleaner minimap and the ability to see rooms that are beside the room you're currently in. This could be used as item (think: a torch), or as a way to implement "dark" rooms -- rooms which can only be seen when you're immediately in them (not when you're adjacent). Also another revision, July 7th - I added a minimap in the bottom left corner, per @gtoal's suggestion. If the size of the world is really big (> 32 width or height), the minimap won't be shown, because it's a bit performance-intensive to draw, and it won't look any good that small. But pressing F/M still works just fine.

Project Details

Project ID200903024
CreatedJanuary 30, 2018
Last ModifiedJuly 8, 2018
SharedJanuary 30, 2018
Visibilityvisible
CommentsAllowed