Chapter 5. Randomized Items

Items in a game usually make up a considerable amount of content, especially in games where collecting loot is the main objective. We can use PCG to help us vary our content so that we don't have to create an overly large library of art assets. It is common in games that have a lot of content to use the same 3D model or sprite for two different items and just change the color or texture.

In this chapter, we are going to add items that our player can use to give them an advantage in the game. We will be adding both health items and items that can be stored in the player's inventory that will give the player bonus effects, such as damage and defense. We will randomize the values and use different colors to represent the ...

Get Procedural Content Generation for Unity Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.