Book Image

Unity Game Development Scripting

By : Kyle D'Aoust
Book Image

Unity Game Development Scripting

By: Kyle D'Aoust

Overview of this book

Table of Contents (17 chapters)
Unity Game Development Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Features of an inventory


Before creating an inventory, you must figure out what kind of inventory fits your game best. There are various features that an inventory has that will need to be figured out when designing one. The following are the features that we will discuss:

  • Limits

  • Accessibility

  • Order

Limits of the inventory

There are two common ways to limit an inventory; they are weight and slot size. If an inventory is based on weight, it will only carry a certain number of objects that are within its weight bearing limits. If an inventory is based on slot size, the player can have as many objects as long as there are slots and the weight of an object either doesn't matter or isn't tracked at all.

An example of a weight-limited inventory is found in games such as The Elder Scrolls V: Skyrim. The player can keep items in their inventory up to a certain accumulated weight limit. An example of a slot size limited inventory is found in games such as Borderlands. In Borderlands, the player's backpack...