Add a "Nethack Level Generation" series page and move a bunch of basic content there.

This commit is contained in:
Eryn Wells 2023-02-05 10:00:29 -08:00
parent 7c0ee2b021
commit b5768770de
2 changed files with 77 additions and 1 deletions

View file

@ -1,6 +1,43 @@
---
title: "Nethack Level Generator"
title: "Nethack's Rooms & Corridors Generator"
date: 2023-02-05T09:08:07-08:00
draft: true
series: "Nethack Level Generation"
categories: Tech
tags: [Nethack, Programming]
---
## Rectangles
## Placing Rooms
[`makerooms`][makerooms_func] uses a "random rect" algorithm to create up to `MAXNROFROOMS` rooms. It iteratively
generates a random rectancle
`create_room`
`sort_rooms`
## Digging Corridors
[`makecorridors`][makecorridors_func]
[`join`][join_func]
`dig_corridor`
## Special Features
`make_niches`
`do_vault`
`create_vault`
## Special Rooms
[nh36]: https://github.com/NetHack/NetHack/tree/NetHack-3.6
[mklevc_file]: https://github.com/NetHack/NetHack/blob/NetHack-3.6/src/mklev.c
[makerooms_func]: https://github.com/NetHack/NetHack/blob/59b117c655731bdf1f8b92c57bdb786119927f3a/src/mklev.c#L223
[makecorridors_func]: https://github.com/NetHack/NetHack/blob/59b117c655731bdf1f8b92c57bdb786119927f3a/src/mklev.c#L319
[join_func]: https://github.com/NetHack/NetHack/blob/59b117c655731bdf1f8b92c57bdb786119927f3a/src/mklev.c#L244