Skip to content

Dungeon generator for roguelikes written in pure C99!

License

Notifications You must be signed in to change notification settings

Ztry8/DungeonGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DungeonGen

Dungeon generator for roguelikes written in pure C99!

screenshot

About generator

The programmer's part

The program generates .pbm images (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

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

Input data

Before running the generation, you need to provide the program scale argument.
For example:

Scale = 20 or 60x40 size: (text mode) screenshot

Scale = 35 or 105x70 size: (image mode) screenshot

Time

The time to generate a map with a scale of 100 (300x200 tiles) is range from 0.008 to 0.011 seconds. If the program was built by the command in the Building section.

TODO

  • Fixed the bug with generating a map outside the boundary.
  • Added the input for scale.
  • Replaced stack with the heap.
  • Added corridors and rooms.
  • Added <; E; *; tiles.
  • Added image support

About

Dungeon generator for roguelikes written in pure C99!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages