~voidraven/duncr

'dungeon creator': make random ASCII RPG dungeons
Added build files and badge
Removed TravisCI badge and .travis.yml
Moved logo into repo and updated README

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~voidraven/duncr
read/write
git@git.sr.ht:~voidraven/duncr

You can also use your local clone with git send-email.



License builds.sr.ht status

short for 'dungeon creator'

Generates random ASCII RPG dungeons.

#Motivation

I wanted a fun C project to work on, and something that I could potentially use now and expand later. Eventually I would like to include this in an ASCII roguelike game of my own creation. Make some super sweet maps!

#Project Goals

  1. Clean, safe, and portable C style
  2. Commandline interface
  3. Include portals, enemies, gold, items, etc.
  4. Customization options

#Example Dungeon

( 31x31 grid)
-- Level 1: ----------------------------------------------------------
##############################
#################       ######
################          ####
#   ###########           ####
#   ###### ####        #   ###
#   #####  h    #    ###   ###
#    ####    ##   ############
#  ^ ####    ## ########  ####
#    ##    ####  ######     ##
### ###    ## #  ########   ##
#   #       #   #########   ##
#                ##  #### # ##
#                     ##  #  #
#      ###        ###        #
#    v #          ####       #
# #    # #         #######   #
#      #           ######### #
# p         #     ############
##    ###m  # x   ############
##     ###  ####  ############
### # ########### ############
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################
##############################

#Prerequisites

  • C99 capable compiler/lib
  • POSIX make

#Build

git clone https://git.sr.ht/~voidraven/duncr
cd duncr
make && make install # will likely need root privileges

# to make a debug version
make debug

# to make an optimized version
make opt

#Usage

# note: the order of arguments does not matter
duncr                     # use defaults (one 80x80 level)
duncr -g 100              # generate one 100x100 level
duncr -g 73 -n 12         # generate twelve 73x73 levels
duncr -c 5                # generate a level with maximum handiCap
# handicap means more gold and items and less baddies..
duncr > my_dungeon.txt    # redirect the output to save the level

# Legend: 
# #: walls
#  : floor (empty space)
# h: hero
# x: enemy
# ^: stairs up
# v: stairs down
# t: trap (gas, spikes, rope, fire)
# p: portal (transport to another portal on level)
# g: gold
# m: merchant (buy items)

#TODO

  • make basic version
  • included portals
  • include stairs
  • include traps
  • include items
  • include gold
  • remove VLAs
  • improve map creation algorithm (better number of walkers)
  • proper argument input
  • check user input
  • pass structs into functions (for cleanliness)
  • add capability to create multiple maps in one call (-n flag)
  • add handicap scaling
  • improve tile placement probability code

#License

BSD 3-clause License (see LICENSE.md)