Artists‎ > ‎

Building Blocks

Prefabs

The building block prefabs are located in Assets/Resources/Prefabs/build/


If you drag one into the scene it looks crazy:


So let me break it down.

Sockets

The building components connect to each other using sockets. Sockets can be male or female, or both. For example, the generic_foundation has a ground socket which is female. This uses a Socket_Area script - which means that the male socket can be 'plugged' into anywhere on the green quad. The yellow spheres are hotspots.. which lock the placement to their center if the placement is within their radius. They're helpers.


The wall, door, stairs and window pieces have a male socket at their base, marked as Ground. This is how you can connect the wall to the foundation.


Skins

The building system is set up to accept multiple 'sets' of skins for each component, which it will choose randomly. This should help remove the 'tile' look seen in legacy buildings.


The skins consist of multiple components.

Ghost

The ghost is the skin that you see when placing the block.

Frame

The frame is the framework that is shown before you build it. The player bashes it with the hammer to add resources and make it become a full building block. The frame can have an unlimited amount of 'lerp' models, ranging from not built at all to the fully built block.. so the player gets some visual feedback about how built it is.

Build

The build model is what it looks like when it's built. The build model can have multiple lerp models to show how destructed it is. The fully built model should be as low poly as we can get away with - because there could potentially be hundreds/thousands on screen at once.
Comments