Lab Rat

Lab Rat and Portal 2 Puzzle Library

When the Portal 2 puzzle editor was released, I pretty quickly became interested in the file format. I quickly inspected the saved puzzle files until I had figured out the format, then I documented the format (at the Valve Developer Wiki) and started working on a library to read and write puzzle files.

Lab Rat uses the finished library to generate a 3-dimensional maze which you must carry your trusty companion cube through. The library itself supports every item in the Portal 2 puzzle editor, as well as connections between items and voxel editing. It was a decent amount of work to determine how each different item worked, and then build an intuitive API set to work with the items.



  • 2012 – Present


  • C#
  • Photoshop