Skip to content

A procedural ASCII dungeon generator that creates random dungeons with rooms, hallways, doors, and an entrance. Configurable grid size and room count via command-line arguments.

Notifications You must be signed in to change notification settings

harispdev/ascii-dungeon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII Dungeon

A simple ASCII dungeon generator that creates procedurally generated dungeons with rooms, hallways, and an entrance.

Usage

node index.js

Configuration

You can customize the dungeon by passing command-line arguments:

node index.js width=50 height=30 roomCount=8

Available options:

  • width - Dungeon width (default: 40)
  • height - Dungeon height (default: 20)
  • roomCount - Number of rooms to generate (default: 5)
  • wallsChar - Character for walls (default: "#")
  • emptyChar - Character for empty spaces (default: " ")
  • doorChar - Character for doors (default: "+")
  • entranceChar - Character for entrance (default: "E")

How it works

The generator creates a grid filled with walls, then:

  1. Randomly places rooms of varying sizes
  2. Creates a main horizontal hallway connecting all rooms
  3. Connects each room to the hallway with corridors and doors
  4. Places an entrance on the left side of the hallway

About

A procedural ASCII dungeon generator that creates random dungeons with rooms, hallways, doors, and an entrance. Configurable grid size and room count via command-line arguments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published