O'Reilly logo

Procedural Content Generation for Unity Game Development by Ryan Watkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data structures

Now that we know the instruction set of our dungeon creation, we need to figure out how we plan to store the dungeon board. We are building the Dungeon Board in a similar manner that we built the world board, so we might be able to use similar data structures. There are enough differences though, that we will need to evaluate what works best.

Back to the map

We are using a dictionary to store our world board because it has an easy and fast lookup method, plus it can be added to dynamically. For all those same reasons, we can use a dictionary to store the important points in our dungeon. Remember, we don't need to know every point in the dungeon, we only need to know the essential and random paths.

The tricky part is that we need to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required