🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How should I approach my code architecture for a modifier driven content generation

Started by
1 comment, last by LorenzoGatti 3 years, 5 months ago

Hello, I am building a rogue-lite with a mechanic that gives the player some power over the generation of the dungeons and the rewards the player will get. I've been having some difficulty creating the system in order to archive this in a flexible way that I won't regret later in development that makes me rebuild the whole dungeon system again…

What I have for now is a generator without the modifiers that I want to add in, this already creates a node graph for the layout, encounters, and in runtime it creates the encounters pulling data from combat templates. All of this is (I think) as data driven as it can be fo me.

Here is a diagram of what does what right now as it might help with my question:

As mentioned before the modifiers system is meant to give players some power over the generation giving a twist with RNG to what the player chose to play against. The Contract object comes from this choice, which is then relayed to the dungeon master object in runtime before the dungeon is created. The closest to this system I can think of is the one in Hades (Super Giant Games, 2020) where they give the player a “Contract” that increases enemy density, gives shields to all enemies, more elites, more difficult boss fights etc…

With this said, how would I architect this connection between the 2 things to modify the dungeon via the data given? My question feels a bit far fetched now, but if someone could give some insight or something that can go wrong that you can catch already would be amazing, thanks and have a happy new year, just a couple of days to go!

None

Advertisement

Your diagram gives a high level overview of the data you need to describe a dungeon, but not of how you'll generate that data: doing it all in a Dungeon Master object affected by Contract objects is not wrong, but it is so abstractly generic that it is a trivial design choice.

To make more progress, I'd start from specific algorithms to generate maps and populate them:

  1. Ensure they can produce good dungeons (with specific appropriate setting)
  2. Explore their variants and parameters: how far can you bend the algorithms and still produce a fun experience for the player? For example, tougher monsters are going to be limited by expected character stats, and number of monsters by excessive crowding
  3. Given this design space, find reasonable “contracts” that can be exposed to the player. For example, in Angband you could make vaults more or less likely; in Nethack you could add extra Sokoban levels

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement