Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - evildrspock

Pages: [1]
I was considering when creating a roguelike game with random map generation, and you have more than one map, room, or level that the player only occupies one of at a time (I'll focus on levels).  Using a pseudo random number generator, I see two unique, broad approaches:

  • Generate all levels and map details immediately upon starting a new game.
  • Generate new levels on-demand, only when needed.

From a gameplay perspective, the two approaches have an identical effect: each visited level is randomly generated each time the game is played.

The first option feels more "pure" for myself as a developer since the world exists based on the random seed and my game's map generation logic, and the player's decisions don't in any way effect the layout of dungeons.  However, depending on the complexity of the world I want to create, this may take a considerable amount of time to generate, and I can't create a truly unending sequence of levels, there is physical limit of storage space.

The second option at first jumps out to the software engineering side of me in that I can only create the necessary levels on demand, spreading the time cost of level generation out across the game, and the processing time for generating the next level can even be done concurrently while playing the current level.  However, if I use only one RNG for the game and in-game effects may be randomized, RNG manipulation can occur and the player's choices can change the next generated map.  Furthermore, if there are multiple exits from one level, the order in which the layer chooses where to explore further complicates the decision and dependency on the order of events.

I know I could track multiple RNGs depending on the needs of my game, so that one RNG handles the maps, and another handles NPC decisions, etc, but I am curious as to what others have done when faced with this decision.

Please note, I am new to the forum so if this question has been discussed before and I missed it, please point me in the right direction.  Thanks!

Pages: [1]