• Register

Build a home, build a community, build HOPE. Hope is a first person, world and community building roleplaying game. Set in the junkpunk world of EverSky, where people live on flying structures known as "rigs". Your role is to help build the community on a rig called "Hope", using a wide variety of tools. You will build, enhance and maintain the rig, whilst trading, crafting and socializing with the rigs inhabitants.

Report RSS Inventory management and other dull stuff

Working some more on "inventory". Its kind of dull, but its important for crafting, trading, resource gathering etc.

Posted by on

Spent the last week doing some work on Inventory for the game. Basically I wanted it so that I could make up inventories in the editor (Unity) and then manipulate those inventories in the game.

I'm new to C#, so it took me a bit of fiddling around to figure out what sort of data structure code I needed, mainly just syntax for things I already knew from other languages (like how to declare a delegate in C#) .

Inventory, or rather, the "collection of items" that is an inventory, is really important code, because it forms the foundations for a ton of other code. Its dull as ditchwater code to write, but it really does require some thinking how to structure it for the unique aspects of the game. I also had to figure out how to tie it in with the NGUI based UI code (I've bought a few more add-ons for unity, such as NGUI and Playmaker, but more on that another time).

Anyway, here's a quick video showing the inventory working both in-game and in-editor. Notice that the items are in sync between the two. Sorry for the lousy capture, had to use a different programme to capture the editor interface.

More to come on this, hopefully I'll be able to explain how all this makes things like trade, craft and resource generation easier in the next video.

Take care. .Z.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: