Skip to content

A Rust attempt at a graph-based rogue-like/lite level generator

License

Notifications You must be signed in to change notification settings

deanfra/erebos-level-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

------------------------------------------------
███████╗██████╗░███████╗██████╗░░█████╗░░██████╗
██╔════╝██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔════╝
█████╗░░██████╔╝█████╗░░██████╦╝██║░░██║╚█████╗ 
██╔══╝░░██╔══██╗██╔══╝░░██╔══██╗██║░░██║░╚═══██╗
███████╗██║░░██║███████╗██████╦╝╚█████╔╝██████╔╝
╚══════╝╚═╝  ╚═╝╚══════╝╚═════╝  ╚════╝ ╚═════╝ 
------------- 𝓑𝓸𝓻𝓷 𝓯𝓻𝓸𝓶 𝓬𝓱𝓪𝓸𝓼 -------------

Erebos Level Generator

A Rust attempt at a graph-based rogue-like/lite level generator, heavily inspired by this blog article by Ondřej Nepožitek.

This is built to serve as a level generator for a Bevy based sidescroller project I am working on. Most roguelike dungeon generators focus on a single holistic map, but I want a more metroid-like map where paths and difficulty are based on a directed graph with precalculated connections.

Running

cargo build
cargo run --release

How does it work?

  1. Generates a random algorithmic graph
  2. Assigns weights to each graph node (for difficulty and progress)
  3. Procedurally steps through the graph and assigns a random fitting room shape
  4. Assigns connecting doors
  5. Prints out a nice map

What's left to do?

  • Graph algorithms
  • Room randomiser
  • Room shape fitting
  • Start room + Boss room
  • Unit tests
  • Making this a crate
  • Distinctive areas
  • Portals/Stairs to different areas
  • Backtracking for more optimal connections

Specs

  • rustc 1.58.0
  • cargo 1.58.0

Code & Disclaimer

This is a hobby project to learn a little about the following:

  • Graph theory
  • Level generation algorithms
  • More Rust

Quality is definitely not up to scratch because of my very limited time and a beginner's understanding of algorithms.

About

A Rust attempt at a graph-based rogue-like/lite level generator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages