Hey guys! I've got some cool bits of construction to show off.
I've broken the lifecycle of construction down into four stages, Planning, Constructing, Constructed and Deconstructing. In the planning stage the Player pops out a holographic ray gun to place a construction site.
This hologram was a little tricky to get right. The transparency didn’t work great when moving the hologram in front of objects of different brightness, in darkness it would shine but in bright light it’d be invisible. To improve contrast in all lighting I clone all the sprites on the object and color them black then layer the hologram sprites on top of that.
Here's the hologram shader with transparency contrast issues.
The dark copy.
And the joined solution.
Once placed a construction site will appear displaying the missing construction material. Feeding the site the material advances the construction through a shader I’m using to represent a swarm of construction nanites. This uses a feature for shaders that Unity calls a MaterialPropertyBlock where you can set different property values per instance of a shader. This lets each construction exhibit a different materialization pattern.
At any time you can switch to the holographic deconstruction ray to tear down the construction and recover the resources.
So now you can build and tear down anything you’d like and combined with the resource transfer work I showed in Dev Log #2 I have most of the tech I need to start giving the player reasons to rocket around the solar system.