Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sketch out room generation algorithm #2

Open
ezpuzz opened this issue Oct 28, 2020 · 2 comments
Open

sketch out room generation algorithm #2

ezpuzz opened this issue Oct 28, 2020 · 2 comments

Comments

@ezpuzz
Copy link
Contributor

ezpuzz commented Oct 28, 2020

so we want to generate dungeons of increasing sizes as we descend

each floor has some number of exits (depending on possible story hooks available/unlocked/by chance) and enemies should be weighted towards those on lower floor through that exit. e.g. more alien creatures en route to scifi exit.

so we need to create a tree with leaf nodes that are exits/lore/save with roughly the same distance from the root (which would be entrance). I think we don't need to have multiple entrances in to a generated floor, one should be fine. player will be unaware what they are on path towards other than changing monster composition.

nodes should carry weight associated with difficulty/size and then we can balance the branches depending on leaf. so save/lore rooms should likely have lower total weight than exit rooms. this should give a reasonable map.

so each Room node on the Level tree should have a weight calculated by difficulty and size. we can generate a bunch of freestanding Room instances and then do some sort of packing algorithm (but don't always want the biggest one at the start, so we can pack in largest first but then shuffle the order of the branch).

question: should relevant lore only be on path to that exit? (e.g. no horror lore on path to scifi exit?)

also earlier levels will have fewer total rooms.

spatial overlap is not important (doorways don't have to make spatial sense, rooms can overlap logically) -- maybe a powerup will make all rooms euclidean...

@ezpuzz
Copy link
Contributor Author

ezpuzz commented Nov 16, 2020

thought of a mechanic where when areas are at least some pythagorean distance away they can be re-collapsed in to new areas (could mean losing room or whole new area opens up). this might only be fun for like a single level of game or at high insanity as it could be annoying to players.

@ezpuzz
Copy link
Contributor Author

ezpuzz commented Nov 18, 2020

I think enemies should spawn some minimum amount based on size of map. So if max dijkstra value is X would spawn some Y of enemies on far enough away tiles. Not sure of best distribution but likely more further from player to give chance to explore without too many battles.

Most monsters would only come after player if they are in vision radius.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant