Pipe Hacker II

Pipe Hacker II was the first Unity project that I made completely solo without following a tutorial. The basic mechanic of placing pipes that connected to each other appealed to me as a small component of a larger, more complex game that I was brainstorming ideas for at the time, so I decided to try a bite-size version of it. That turned out to be wise.

What I learned making this

  • Coroutines and Mathf.Lerp for smooth movement between positions
  • Sound effects and UI
  • Scripting and using classes that aren't MonoBehaviour
  • Generating new game objects on the fly

Details I'm proud of

  • The code for the movement of the cursor includes a system that, when the movement is close to complete, accepts input and buffers the inputs in a queue so they'll execute when the cursor is finished moving.
  • The pipe sprites flip themselves when needed to fill up from the correct end; I discovered that this problem existed fairly late in development and didn't want to make new sprites, so I managed to hack together a way to do it using rotations.

What I'd change now

  • The codebase is fairly poorly organized; nearly every class is overloaded and could be split into multiple to better separate concerns, and certain methods are very much in the wrong place.
  • The pipes in this are not prefabs; instead, the code in PuzzleGenerator creates an empty game object and adds all the necessary components in the script to add a pipe to the level.

[back to projects]