Application of PCG
Where we can apply PCG is an interesting question, as it can theoretically be applied to every aspect of a game. Here is a brief list of examples of where it has already been used:
- Level layout—Blizzard Entertainment's Diablo series
- Unique item creation—Gearbox Software's Borderlands series
- AI behavior—Hisanori Hiraoka, Daisuke Watanabe, and Kyohei Fujita's dreeps
- Texture generation—Farbrausch's .kkrieger
- Model Generation—Speed Tree (which can be used with Unity)
- Storyline—Bethesda's The Elder Scrolls 5: Skyrim Radiant Quests system
- Music—Ed Key and David Kanaga's Proteus
This list encapsulates some of the more popular uses of PCG. As a game lover, you are encouraged to research each of these games as they are wonderful examples of PCG. We will cover most of these topics in this book, but this is by no means an exhaustive list of how PCG can be used in game development.
So now you know what PCG is but what about implementing it? To put it plainly, PCG is just the idea that we can automatically generate game content. We will develop different algorithms and use certain programming practices to apply the idea of PCG to our video games.
One of the more popular ways to implement PCG utilizes randomness or random events to produce content. It is popular because it is easier to let randomness determine certain events over scripting every outcome. For example, we might let randomness determine which pieces are used to generate the weapons seen previously in Gearbox's Borderlands. We might use a pseudo random number generator and bind each piece of the weapon to a randomly determined number. Of course, keep in mind that this isn't truly random as we will soon discuss further.