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 strength of the item. This way, we can use the same sprite to represent several different item types. Here is a quick overview of what you will learn in this chapter:
- Designing a method to deliver items to the player
- Designing a...