It has been some time since my last devblog! I have been working on a lot of under the hood stuff and not really anything that is visible in the game! There are some additions nonetheless, which I want to show you today!
The second biggest thing I worked on was the new hud. I decided to go with two panels. The first one is on the left and in it are all the inventories and controls of the player and also of the nearby machines and chests. The second one is on the right and this one is dedicated to crafting! Keep in mind that some areas of the crafting ui are still not done.
Canola is needed to produce lubricant for the robot. It was relatively easy to add the canola plant into the game since I programmed all necessary components for it a long time ago.
The biggest thing I worked on since last time, maybe even since I started this project, were content packages. Content Packages are basically a bunch of files in a folder that make up the content in the game. Every single tile, entity, item or even recipe you see in the game is all loaded from files. This was a lot of work to do since I had to assign all the ids dynamically and make sure those ids don't clash with other content packages that are loaded. You could load hundreds of content packages at once and play with them in your world.
It is very easy to create one since you don't require coding experience. I made sure to make them very powerful but also easy to understand at the same time. All game objects are made up of components. A component defines a specific behaviour or property. Here is how the canola plant is defined:
It might seem a little bit complex at first but it is really not. If you look at every component individually and understand what it does it is really simple. One of my favourite components are the 'RestrictedPlacementComponent', which defines where a block is allowed to be placed, and the 'DropComponent', which is a powerful component for defining drops when the tile is broken.
The last thing I did with the content package system was to add recipes.
The plan is to have variations in recipes. The player can find different recipes of the same type, one is cheaper and the other one might be a bit more expensive. He has to make sure to use the cheapest one in his machines or even when he crafts himself.
To end things off, here is a little video of the new stuff. I really like the gui fade-in and fade-out.
Thank you for reading!
See you in my next post,