Making Interesting Maps – Dead Ends

One thing to be aware of when using procedural generation for levels is that the end layout must be interesting to the player. Now, “interesting” can be a vague term and a level can be interesting on several accounts, but one of the most straightforward interpretations is that exploration must be rewarding in itself.

When a map is generated by hand it is easy to scatter interesting features evenly across the level. But there are some tricks that can be used also with random generation.

Where to go?

Where to go for the exit?

A possible approach is to use a function to evaluate the “interest-level” of each cell of the map. A good way do to this is to calculate a Dijkstra map of the level from start to end. Essentially we can assign an high interest level to the shortest path between the start and end cell, then we proceed assigning decreasing interest levels the further we are from the shortest path. This application of the Dijkstra algorithm using distance as a metric will create a sort of heatmap of the interest level.

Path of Interest

Path of Interest from the beginning of a simple level to its end, first as a shortest path (red line) then as an Interest Map (where red/hot zones are more interesting than the blue/cold ones)

We can then loop over the coldest areas (the ones away from the shortest path) and place there interesting features, like loot or special events, thus guaranteeing that even if a player follows a “wrong” path he will always be rewarded with something interesting to do.

Added Points of Interest

Added two Points of Interest in the previously blue zones (bottom)

This is a simple yet effective way to ensure that the maps, especially larger ones, do not become boring and to reward players that like to fully explore all the level before moving to the next one.

In the case of Wizards’ Duel it may actually be even more simple due to the way our maps are created. We can set up some “Areas of Interest” to be generated at least once or twice per level and then make sure that they only have a single entry point. This will automatically create at least some “dead ends” with something interesting in it.

We will talk about what we plan to place in these areas at length in the future.

Also I think it should be good to note that interesting does not equate only to loot but it depends a lot on the tone of the game. Nowadays it is customary to fill games with collectibles to artificially increase the length of the game and appeal to the basic instinct of humans for gathering. While it can be the case I think that, sometimes, “interesting” could be simply that: a grand vista in a game like Skyrim or a unique character not really related to any specific quest like some in The Witcher 3.

Thanks for reading.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s