Haven’t had time to work on the project due to real work crunch and that taking time, but I thought I would save a minute to write something short.
I have been thinking a bit about how to handle construction of blocks, walls, floors etc, and have gone through a multiple ways to handle it.
The block-placing way was the first thing that came to mind, it would’ve been a simple solution if it wasn’t for the fact that blocks and items are separately defined. Defining two sets of data for every tile just to make it placeable would’ve been a pain, not to mention that tile blocks are big and would not work well as dropped items or placed in inventory.
The building tool was another thing that I was thinking about, a tool that you would build and would be used to place blocks at the cost of resources, which was pretty nice in theory, but I started getting a headache on how AI would use it and some other small issues that wasn’t fun dealing with.
So I ended up with the Construction mode which is essentially not a mode, but more like a big slot and a permanent “item” that exists to the left of the inventory, which would change your left click to a placement mode.
You wouldn’t place a block, you place a constructionblock, a sort of scaffold at the cost of what it takes to build the tile you intend to, from there on you have a builders tool that you bang on the scaffold with and see it go from unfinished to finished and the proper tile pops up.
The reason behind this was so that I could combine tile construction and tile constuction orders (such as a build-designation in dwarf fortress) into one thing, and that meaning; if you place a bunch of construction blocks your minions or friends would wield their building hammer and start finishing it up. It also means you could help Ai finish up their constructions.
And then something I actually got done recently.
Being a fan of the dota type games and liking the way most of them handle the importance of visually displaying how much damage you did directly on the healthbar. So I implemented a short white segment on the healthbar that represent the damage you just did which then quickly goes away.