8000 GitHub - MuthulakshmiD/Miniproject · GitHub
[go: up one dir, main page]

Skip to content
Public template

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

 
 

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Dungeon Generator

Overview

The Dungeon Generator is a web-based application developed using JavaScript, HTML, CSS, and SVG that procedurally generates Dungeon & Dragons dungeon maps. The application creates interconnected rooms, doorways, room descriptions, traps, treasures, and other dungeon elements based on user-selected parameters.

This project is inspired by and uses the functionality available in the Mystic Waffle Dungeon Generator:

The generated dungeon is rendered dynamically as SVG graphics without the use of third-party JavaScript libraries.


Features

  • Procedural dungeon generation
  • Random room placement
  • Automatic doorway generation
  • Connected dungeon layout
  • Random room types and descriptions
  • Trap and treasure generation
  • Item generation using probability-based rules
  • Dynamic SVG map rendering
  • User-configurable dungeon parameters
  • Custom unit testing for dungeon generation logic

Technologies Used

  • HTML5
  • CSS3
  • JavaScript (ES6)
  • SVG

Algorithm

  1. Load the application.
  2. Initialize dungeon parameters such as map size, room count, and complexity.
  3. Create a multi-dimensional grid to represent the dungeon.
  4. Place the initial room at a random position.
  5. Generate additional rooms while preventing overlap.
  6. Validate room placement within the map boundaries.
  7. Connect adjacent rooms using doorways.
  8. Assign random room properties, traps, and difficulty levels.
  9. Generate random items and treasures.
  10. Create descriptive information for every room.
  11. Convert dungeon data into SVG elements.
  12. Render the dungeon map dynamically.
  13. Execute unit tests to verify generation and rendering.
  14. Display the generated dungeon and room information.

Installation

  1. Download or clone the project.
  2. Open the project folder.
  3. Open index.html in a web browser.
  4. Configure the dungeon parameters.
  5. Generate the dungeon.

Usage

  1. Enter the required dungeon settings.
  2. Generate the dungeon map.
  3. View the SVG dungeon layout.
  4. Read the generated room descriptions.
  5. Regenerate the dungeon to create a new random layout.

Output

The application generates:

  • Procedural dungeon map
  • Connected rooms and doorways
  • SVG-based dungeon layout
  • Random room descriptions
  • Traps and treasures
  • Random items
  • Difficulty information

The generated dungeon and all associated details are displayed dynamically within the web page.

image image image image

Result

The Dungeon Generator successfully implements procedural dungeon generation using JavaScript. It creates random Dungeon & Dragons dungeon layouts with interconnected rooms, doorways, traps, treasures, and descriptive room information. The dungeon is rendered as scalable SVG graphics, and the generation logic is validated using a custom unit testing framework without relying on third-party JavaScript libraries.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

0