Preface
[ vi ]
What this book covers
Chapter 1, Pseudo Random Numbers, teaches you about the theory of procedural
content generation (PCG). We will cover what PCG is and how it is used in video
games. You will then learn about a useful component of randomization called
Pseudo Random Numbers (PRN). We will cover what PRNs are, how they are
used, and how they can help us implement PCG algorithms.
Chapter 2, Roguelike Games, teaches you about a prime example of procedural content
generation, Roguelike games. We will cover some history of the origin of PCG and
Roguelike games. We will then set up the Unity project foundation of our very own
Roguelike game.
Chapter 3, Generating an Endless World, begins the implementation of your 2D
Roguelike game. We will be creating a level that generates itself at runtime while the
player explores. We will cover PCG algorithm design and useful data substructures.
Then, we will put it together to implement the game world.
Chapter 4, Generating Random Dungeons, implements the sublevels of our Roguelike
game. We will cover a different approach to level generation as we generate a full
level layout at runtime. You will learn about some common approaches to this
technique and implement one for yourself.
Chapter 5, Randomized Items, teaches you about randomly generating items. The
items you generate will have differing properties so we will use some techniques
to communicate this to the player. We will cover item spawning, interaction, and
inventory storage.
Chapter 6, Generating Modular Weapons, teaches you about and how to implement
a random modular weapon system. You will build upon what you learned in the
previous chapter to add more complexity to item generation. These items will
comprise a small set of pieces that are assembled at runtime.
Chapter 7, Adaptive Difculty, crosses over into the eld of Articial Intelligence (AI)
and teaches you about how AI and PCG are similar and related. You will learn
about the PCG idea of adaptive difculty, which is one part AI and one part PCG.
You will then implement an adaptive difculty system for your Roguelike game.
Chapter 8, Generating Music, shows you how PCG can even contribute to the music
and sound content of a game. You will learn a little music theory; just enough to
design a PCG algorithm for music generation. Then, you will implement a music
generator for your Roguelike game that can generate music at runtime.