https://github.com/ztry8/dungeongen
Dungeon generator for roguelikes written in pure C99!
https://github.com/ztry8/dungeongen
dungeon generator roguelike
Last synced: about 1 year ago
JSON representation
Dungeon generator for roguelikes written in pure C99!
- Host: GitHub
- URL: https://github.com/ztry8/dungeongen
- Owner: Ztry8
- License: gpl-3.0
- Created: 2024-08-02T08:53:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-29T15:02:01.000Z (about 1 year ago)
- Last Synced: 2025-03-29T15:32:20.578Z (about 1 year ago)
- Topics: dungeon, generator, roguelike
- Language: C
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DungeonGen
## Fast and simple level generator for roguelikes written in pure C99/Rust!

### About generator
#### The programmer's part
The program generates [.pbm images](https://en.wikipedia.org/wiki/Netpbm) (or display in console) of the dungeon map for visual perception,
but the basic generator algorithm simply manipulates a vector of tiles.
Algorithm based on [this](https://www.roguebasin.com/index.php/Random_Walk_Cave_Generation)
#### The player's part
This program creates cave-like rooms with corridors.
Could be a cave with mining tunnels!
### Designation
#### Text mode
`<` - exit
`Z` - enemy
`!` - chest
#### Image mode
`blue` - exit
`red` - enemy
`yellow` - chest
### Building
The project has only one file, so you can build it with a single command:
```clang -std=c99 -Wall -Wextra -pedantic main.c -o generator``` (For Rust: ```cargo run```)
### Time
The time to generate a map with a scale of 100 (300x200 tiles) is range from 0.002 to 0.003 seconds.
If the program was built by the command in the `Building` section.
### TODO
- [x] Fixed the bug with generating a map outside the boundary.
- [x] Added the input for scale.
- [x] Replaced stack with the heap.
- [x] Added corridors and rooms.
- [x] Added ```<; E; *;``` tiles.
- [x] Added image support
- [x] Add Rust version
### Results



