#gamedev #map #template #down #top #generation #room

tdlg

Generates a grid of cells that could be used to build a top-down game map. Used by me to learn Rust.

6 releases (3 stable)

3.0.0 May 2, 2023
2.0.1 Jan 18, 2023
0.1.2 Dec 16, 2021
0.1.1 Nov 30, 2021

#425 in Game dev

22 downloads per month

MIT license

55KB
1.5K SLoC

tdlg

Note: This is something I've been working on while learning Rust and attempting to learn game dev. I do not guarantee it is good at all. It is also not something that has been used in a real game.

This library generates a top down map grid based on "stamping" template rooms onto the map in random locations. The templates can be defined by using creating a Room from a string.

Template files

Templates should be looked at as defining an "empty" room. During the move to 2.0 I removed the "fill" templates as it was making it much more complicated. Eventually I am going to add more to the generation to allow for specifying generation of tables and other structures inside of the rooms before they are stamped into the grid.

You can example of the usage inside of the examples, or inside of https://github.com/derrickp/under_farm

Dependencies

~2–3MB
~56K SLoC