Jump to content

Recommended Posts

Here is a random maze generator for the 7800. I wrote this out of personal interest and didn't actually have a game in mind for it, but it could certainly be adapted into a game. I wrote this using the binary tree maze creation algorithm, which is fairly simple. Each block in the maze is checked for an opening in two adjacent directions (in this case south and west), and if no openings exist one is created. If an opening already exists in either direction the block is skipped. The maze is 25x25, but could be made larger. I'm going to be looking at implementing a few other maze creation algorithms as well, I'd like to try recursive backtracking next - it's really cool to watch. :)

 

There is a simple title screen that is necessary in order to properly seed the randomizer before maze creation begins. I created custom image files, you'll need to download them if you'd like to compile this yourself.

 

Edit: I haven't fully vetted this out to make sure it creates the maze as I described - but hey, it looks like it works. :)

MazeGenerator.bas

MazeGenerator.bas.a78

MazeGenerator.bas.bin

post-2143-0-91926800-1504226893_thumb.png

MazeGeneratorGraphics.zip

  • Like 4
Link to comment
https://forums.atariage.com/topic/269508-7800-random-maze-generator/
Share on other sites

I forgot to mention that if anyone would like to use this code for a project, please do. It's free for anyone to re-use, there's no need to ask me first.

  • Like 5

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...