Now that production and beta have been bumped to newer versions, as promised in a previous thread, I am releasing my mazes extension. You can use this extension to generate random mazes with a variety of algorithms. The algorithms come from Jamis Buck’s book.
Extension URL (for importing into your own projects): https://github.com/robo-technical-group/pxt-arcade-mazes.git
API documentation is available here: https://github.com/robo-technical-group/pxt-arcade-mazes/blob/master/api.md
- Blocks playground: https://makecode.com/_3tDK3ecavD2E
I made a simple game in Blocks that uses the playgrounds as a premise. At the start of the game, the duck is trapped in a cell. Press A to build a maze and to start the clock. You have 60 seconds to get the duck to its home in the swamp. Snacks appear when you have 30 seconds left to help you. If you’re running low on time and want to cheat, just press A to generate a new map.
The sample game runs fine on hardware as-is. If you move to a larger tile map, you may need to switch the game to “hardware mode,” which disables the breadcrumb sprites. (The breadcrumbs still appear; you just don’t get any points for them.) Hardware can handle tile maps up to a grid size of 15x15 when the pathway is two tiles wide. If you switch to one-tile pathways, the path gets really tight to navigate, but you should be able to use a larger grid.
Happy Monday! Have fun!