The first I behavior, I call dwarves, is really two sets of behavior. the head dwarf digs long straight tunnels an occasionally changes direction. The secondary dwarves occasionally place doors when they are about to enter a larger space, and also dig away corners that are not next to doors. This builds a room and corridor like map with only local knowledge.
A second set of behaviors I call Ants. It makes sure that certain tiles ahead and to both side of it are occupied by walls. This makes it leave islands of unexcavated material behind.
Finally because it was so easy, I implemented a maze digging creature. It can only dig into tiles that do not create a new connection.
No comments:
Post a Comment