Clone of mobile game Build Stack

Using Unity 3D

Build a stack to see how high you can go. Slabs will spawn from the left and right sides of the screen. As slabs move over the stack try to line them up with the stack as best they can in order to create the tallest stack possible. Any overhang gets cut off and all future slabs are resized to the size of the remaining piece. To start spawning slabs right click or press spacebar. Press again to stop and place the current slab on the stack. The game ends when any slab is stopped and misses the main stack.

This simple project solidified my confidence in using Unity and setting up a workflow. It was somewhat challenging (confusing) figuring out the math needed for both a new remaining and overhang piece after cutting the slab. With this project I learned about gizmos and TextMeshPro but mostly this was a programming heavy project.

At the start a cube/slab prefab with its own moving script is instantiated. Every slab knows which direction it is moving by knowing from which of the two spawners it came from. The current moving slab also reacts to the player's input and handles the logic of slicing itself into a remaining and hangover piece. The game difficulty increases by spawning faster moving slabs up until slab forty is placed. Going past or stopping before the stack ends the game and triggers a restart option.

Other small quality of life details include adjusting the camera height so that the stack is always in center view once it starts getting too tall. UI using TextMeshPro was added for displaying current score and highscore much like in previous Flappy Bird project. Gizmos were used to highlight the spawn points in the editor.