I'd like to make a more advanced dungeon and I wonder how it is possible to create multiple routes to a room.
As a directory structure I would create something like this:
.
└── room1
└── room2
├── room3
│ └── room4
│ └── room5
│ ├── room2 -> ../../..
│ └── room6
└── room5 -> room3/room4/room5
where room1/room2/room5 is a symbolic link to room1/room2/room3/room4/room5 and room1/room2/room3/room4/room5/room2 is a symlink to room1/room2.
I tried to define this dungeon with the following yaml:
dir:Root:
description: "A poorly lit hallway proceeds you to the north."
adjacent:
- room1
contains:
- README
dir:room1:
description: "you're in room 1"
adjacent:
- room2
dir:room2:
description: "you're in room 2"
adjacent:
- room3
- room5
dir:room3:
description: "you're in room 3"
adjacent:
- room4
dir:room4:
description: "you're in room 4"
adjacent:
- room5
dir:room5:
description: "you're in room 5"
adjacent:
- room2
- room4
- room6
dir:room6:
description: "you're in room 6!"
adjacent:
- room5
I know this creates a loop, but makes it possible to write not so linear games. I seems that a room structure like this results an infinite loop in the code as my CPU load jumped to 100% when I tried to mount this test level.
I'd like to make a more advanced dungeon and I wonder how it is possible to create multiple routes to a room.
As a directory structure I would create something like this:
where
room1/room2/room5is a symbolic link toroom1/room2/room3/room4/room5androom1/room2/room3/room4/room5/room2is a symlink toroom1/room2.I tried to define this dungeon with the following yaml:
I know this creates a loop, but makes it possible to write not so linear games. I seems that a room structure like this results an infinite loop in the code as my CPU load jumped to 100% when I tried to mount this test level.