DevSlog

Building, objects and materials

My main goal for any game mechanics associated with building and the building objects themselves should be flexibility, extensibility and ease of use. Not only for those that want to modify the files but also for the players playing the game.

In other words the menus should be intuitive and easy to read, whilst giving all the information required to quickly build any of the objects available. Anyone wanting to modify the files should be able to do so easily and with the least amount of friction possible.

I also wanted materials to change the appearance of the item whilst also changing its composition, from how it reacts in the world to how much health it has etc.

A lot of time was spent iterating upon the UI and adjusting the mechanics of the game associated with building and materials to fit the criteria set out above. Below you can see the menu I finally settled upon, though be aware that like most other things in this game, it is still a work in progress and could be subject to change.

Build Menu
Build Menu

You can see from the above image we have a primary material and a secondary material. Not every object will require two different material types to build and this can be modified in the JSON files if required. Below you can see this item requires 3 of either Titanium or Gold plus 2 Silicon. These materials can be further modified via another JSON file.

"material_types": {
        	"primary_mats": ["Titanium", "Gold"],
        	"primary_mats_amount": 3,
        	"secondary_mats": ["Silicon"],
        	"secondary_mats_amount": 2,
        },

Below you can see the effects of the different primary material types (Secondary material types will not change the colour of the objects). This is achieved by using a shader and a mask material which can be input into the JSON file.

The effect of different primary materials.

Adding new objects should be as easy as copying and pasting a similar object, changing parts of its data and pointing it to your texture file in your module folder.

As usual, if you have any questions then feel free to head on over to our forums where I will be happy to reply.