Menu

#282 Improve random maps

open
server (84)
5
False
2022-01-15
2022-01-15
No

This ticket serves both to mention I'm planning on tackling that (to avoid duplication with other people's work :)), and gather various ideas / feedback / expose my ideas.

The goal is to rework the random map generation algorithm, adding a new map type (removing the current ones isn't yet on my to-do, but maybe they'll benefit from some side changes from this!).

Base idea: generate maps from rooms and corridors, and have a "global" view of the map.

Using the editor, base rooms and corridors would be manually designed - walls, some specific items or mechanisms (traps? sub-rooms like alchemy ones?).

Then the server would select some of those, and connect everything together.

To avoid uniformity, the maps would be rotated, mirrored, deformed (ie corridors could grow or shrink in size) before being connected.

Maps could have a "dependency", for instance one room could require a key, which would be placed in another room having a "can contain key/item" sub-object.

The generation would take care to make rooms and corridors big enough so all monsters of the map can go through them (with some exceptions maybe, but at least take that into account).

Random ideas:

  • allow to specify what parts of a map can be expanded (ie if a coridor has a wall on each side, don't want to expand the wall, but the floor letting the player do through)
  • define "constraints" for item placement, or requirements (ie a map with a locked zone "requires" a key somewhere)
  • allow "marking" maps with what they "provide" or "require"
  • allow random changes/features (ie a door to a sub-zone could be locked)
  • allow changing walls/floors from maps ; this way no need to write many versions of corridors and such ; but also allow "forbidding" such changes

Discussion


Log in to post a comment.

MongoDB Logo MongoDB