Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Procedural Content Generation for Unity Game Development

You're reading from   Procedural Content Generation for Unity Game Development Harness the power of procedural content generation to design unique games with Unity

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781785287473
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ryan Watkins Ryan Watkins
Author Profile Icon Ryan Watkins
Ryan Watkins
Arrow right icon
View More author details
Toc

Generating items in the dungeon

Usually in RPG games, the player will acquire and carry items that add some status boosting effects. The player can have weapons to increase their damage or armor to increase their defense. We are going to add some armor items that will power up our player.

The armor items will run on a slightly more complicated system than the health items and will require their own class. We will also need a way to deliver the items to the player. We want to be a little more interesting than just littering the dungeon floor with items, so we will create a chest that will randomly spawn items.

The Chest prefab

Let's start with the Chest prefab. The Chest prefab will be a lot like the Wall prefab, in that the Chest prefab will also spawn items upon iteration. We will begin by building the prefab.

This chapter includes some additional art assets that can be imported for the Chest prefab and armor items. You are welcome to take this opportunity to make your own art for this...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime