Author Topic: Artifical Lifeforms Making the Dungeon Architecture  (Read 10523 times)

guest509

  • Guest
Artifical Lifeforms Making the Dungeon Architecture
« on: November 30, 2012, 01:54:06 AM »
  Has anyone done something like this? I remember reading somewhere about it, I implemented it once (poorly) in an old lost/deleted project.

  Basically you start with a Digger object. It sort of drunken walks around eating walls. It gives birth to other Diggers and occasionally Roomies.

  Diggers are defined by how likely they are to turn left or right, how likely they are to die each step and how likely they are to give birth and how likely their children will be roomies.

  Roomies are born to dig out a random room shape before they die, basically they are a sterile Digger who walks in a set path, not a random one.

  I didn't include starvation, which kills the Digger/Roomie if they go too many steps without eating a wall.

  Was this an idea I came up with after playing too much Pacman or has someone done this well?

Darren Grey

  • Rogueliker
  • ***
  • Posts: 2019
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #1 on: November 30, 2012, 01:58:51 AM »
I don't know if anyone's done it well, but my Roguelike Unstoppable had constructors bots that would create or destroy walls as they wandered around whilst you played.  They had about 70 different patterns they followed based on simple mathematical rules.

Hi

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 154
  • Karma: +0/-0
    • View Profile
    • Email
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #2 on: November 30, 2012, 03:50:29 AM »
Monsters creating the dungeon as they live, is my passion.   Here is a crapply programmed test I have of various interactions between monsters.

It runs using curses in the terminal.

Right now it randomly introduces creatures but I'm particularly proud of how different subsets lead to distinct dungeon architectures.

To answer your question, dwarf1s tunnel in straight lines until they dig out some gold, then they turn left or right, pick up the gold and spawn a dwaf2. Dwarf2s excavate exposed corners that are not next to doors and build doors at the entrances to open spaces.
This leads to a room and corridor dungeon.

Larva move in an orthogonal random walk, only excavating walls that do not change the connectivity of the dungeon (they can figure this out from local knowledge).
They lead to a maze shaped dungeon.

Ants move in a all-direction random walk, avoid digging walls too thin and dig out larger chambers when next to another ant. this leads to a really cool tunnel effect.

there are many other things that I think are cool that would take awhile to explain.
« Last Edit: November 30, 2012, 04:03:43 AM by Hi »

guest509

  • Guest
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #3 on: November 30, 2012, 05:59:31 AM »
  Wow that is neato. I didn't think about using real creatures as models. If you think about it though that is perfect. People, ants, lava, elves, dwarves and roots all create unique environments.

Hi

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 154
  • Karma: +0/-0
    • View Profile
    • Email
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #4 on: November 30, 2012, 06:22:12 AM »
yeah, the reason I like it is because it means the dungeon didn't just pop out of nowhere, it is a rational process that you can interact with.

I also programmed up some fun ecologies.

grass spreads over bare ground and eventually grows into tall grass which is flammable.
Fireweed burns very well and can only sprout soon after a fire and doesn't tolerate being next to other fireweeds.
trees crowd out grass and have trouble catching fire on their own.

This means that trees will take over a grass land unless fireweed is present; then the frequent fires slowly kill all the trees.
There are also grazers that will suppress both fire and forest by eating tall grass and saplings.  They don't eat the mature trees which means grazers cause a kind of savanna instead of grassland or forest.

There are 4 kinds of lichen that grow in walls, that by their slightly differing growth habits, come to dominate in different dungeon structures.

if there are lots of disconnected pillars lichen1 will come to predominate because it is able to spread it's spores across empty space.

If there are many tunnels with lots of surface area lichen 2 will dominate because it grows over the top of other lichens and spreads to all adjacent walls that are touching air.

if there are rooms with thick layers of rock between them lichen3 will be common because it wanders from within the solid rock until it finds air, then it divides into more copies back in the solid rock.

lichen4 grows only in the deepest depths of stone, it ceases to grow when exposed.  So you only discover it when mining new tunnels.
« Last Edit: November 30, 2012, 06:33:02 AM by Hi »

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #5 on: November 30, 2012, 07:03:22 AM »
Was this an idea I came up with after playing too much Pacman or has someone done this well?

This could be a good idea to create maze type levels. Each of the digger would stop and turn before reaching another floor area, eventually filling the level with maze.

Edit: http://roguehut.blogspot.fi/2012/11/digger.html
« Last Edit: November 30, 2012, 12:08:46 PM by Krice »

Eudoxus

  • Newcomer
  • Posts: 20
  • Karma: +0/-0
    • View Profile
    • Email
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #6 on: November 30, 2012, 02:42:34 PM »
Monsters creating the dungeon as they live, is my passion.   Here is a crapply programmed test I have of various interactions between monsters.

This is incredibly fun to watch, thank you for sharing!  It's totally fascinating to watch the critters interact and the terrain evolve.  It has by brain spinning with ideas...

guest509

  • Guest
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #7 on: December 01, 2012, 06:27:05 AM »
Was this an idea I came up with after playing too much Pacman or has someone done this well?

This could be a good idea to create maze type levels. Each of the digger would stop and turn before reaching another floor area, eventually filling the level with maze.

Edit: http://roguehut.blogspot.fi/2012/11/digger.html

That was neato Krice. Gets me wanting to make one too.

Hi

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 154
  • Karma: +0/-0
    • View Profile
    • Email
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #8 on: December 01, 2012, 05:41:55 PM »
here's what happens when I let a dwarf loose on the dungeon


next are some ant tunnels


and I edited my program so the ecology doesn't get as unbalanced. http://pastebin.com/GiARibZb

Holsety

  • Rogueliker
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #9 on: December 01, 2012, 06:12:07 PM »
The 7DRL Cogmind had this too, partially.
There's robots that expand the level you start off in untill they break down.
Quote from: AgingMinotaur
… and it won't stop until we get to the first, unknown ignorance. And after that – well, who knows?

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #10 on: December 02, 2012, 08:35:08 AM »
That dwarf is not a good dungeon designer. Looks like just another random set of rooms and corridors.

Darren Grey

  • Rogueliker
  • ***
  • Posts: 2019
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #11 on: December 02, 2012, 08:51:03 AM »
Yeah, the ants aren't good either - lots of dead ends.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #12 on: December 02, 2012, 09:56:01 AM »
Yeah, the ants aren't good either - lots of dead ends.

It's kind of cool, but those dead ends could be extended to rooms.

guest509

  • Guest
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #13 on: December 02, 2012, 10:14:44 AM »
Here is the one I cooked up. It was harder than I thought to get it to make good dungeons. I made it so that the diggers die if there are no walls to eat (orthogonally adjacent), that helped to make rooms and such. Also limiting how much can be dug was key (lower fertility when a certain number of bricks removed).

The real control over what the levels created look like is not life span or fertility of the diggers, but rather their turning activity. Like how often they'll change directions and the choice of digging over walking into the open (and starving).

In my program press 0 through 9 to see what I mean. 9 is max activity (making open caverns) and 0 is long straight corridors. It can sometimes make too small a level, if I used this in a game I could always toss those if needed.

Here is a 1 (default).



Here is a 9. A bit off center.



Here is the program if you want to play with it, it's a fun little toy.

http://www.sendspace.com/file/ekro1k

Press F9 for screen shots.

guest509

  • Guest
Re: Artifical Lifeforms Making the Dungeon Architecture
« Reply #14 on: December 02, 2012, 10:35:30 AM »
  BTW that's my first crack at real dungeon building. I think it's a good start.