Devblog 1: Item interfaces

Summary on the Inventory system, code management and item models.

Wilderness’ Inventory System

For our inventory to work, we need to have a base item class. This is Item.cs. It’s a basic class, with a constructor (public Item()), public variables and different enums for custom data.

We put this in a C# list, and then use this to dynamically add and change the inventory size (which will come in use later). However, this is really messy, with all of the variables listed. ItemNoEditor
It’s not easy to edit these values. We only want to display the necessary values. So, fortunately, Unity allows us customise the information in the Unity Inspector.
With Editor scripts, we can completely change the layout:
ItemWithEditor
This makes everything much more clean, with the editor resizing depending on the values selected. The code is here:

We also have a custom editor script that adds an Item, with a much easier interface than just editing the base variables. By defining item ids, we can use them for quicker item identification.

Networking Management

We namespace all of the code into necessary sections, e.g. DarkWindowStudios.Wilderness.MainMenu, Wilderness.ServerSide etc.
This allows for easier management of code. We also prefix the client side code with C_, for easier management of scripts.

Item Models

We are working on item models. Here is the first finished model. It’s a Glock 17, a semi-automatic pistol used by many armies around the world, including the British and American armies.

That’s all for this post. We hope to get the logos done soon and release some footage of gameplay near the end of October. Don’t forget to follow us on Facebook and Twitter and keep up to date on development on Trello.
twitterFacebookyoutube

Leave a Reply

Your email address will not be published. Required fields are marked *