Sunday, April 21, 2013

Voxels, Items & Icons

An inventory filled with stuff, mostly the new concrete & metal plate/grate voxels.


Thunder Moon has a pretty capable item system. I think of it as a "light RPG" item system in the sense that you have to manage your inventory a little bit. There are three slots which can hold items that are tagged for them, which is closer to Team Fortress in terms of the number of slots to manage than a typical RPGs which often have a dozen or more slots for head, hands, chest, feet, wrists, ears, etc.

There are 8 held slots which can be quickly selected between in game without going to the inventory using the D-Pad, unlike the worn and aux slots which require going into the inventory and manually equipping new items. The items that go into the held and worn slots are assigned two of the controller buttons each so these items can have a primary and secondary action. Aux slots only get one action, mainly due to limited number of buttons on the controller.

Equippable items have the ability to load and manage assets of any kind, but so far this is used mainly by the packs and weapons to load a 3D model with animations (using the same pipeline described in earlier posts) and sound effects. These are attached to the character and can use any number of models which are managed as a unit, allowing attached items to incorporate lights or separate items that need to use different shaders. The assets loaded for an item can include animations to apply to the main character, which is how the weapon firing action works. The items that are in game now are just the tip of the iceberg in terms of what the item system can do.

Most of the items have icons that were made in the traditional way which is to just render them out and put them in the sprite sheet resource. Voxels are unique however; the voxels are actually created by a custom tool which assembles the textures used for each face so creating icons manually would be a tremendous hassle. The voxel icons are instead procedurally generated, which took some dev time but now that I've had time to make more voxels it's been a great time saver to have their icons just automatically appear in the game. Automation is great.