Orb

A first-person puzzle game about a test subject in a lab who moves glowing orbs to open the way forward. It runs on our first C++ engine, which two of us built alongside the game. I wrote the engine's physics, scene management and serialization, the pipeline that turned Unity into our level editor, and the gameplay on top.

C++ · OpenGL · Unity as level editor · 2017 · with Leon Brands

Orb running in our C++ engine: a lab room with an orb on a pedestal and the player's orb gun

Unity as the level editor

A custom engine with no editor means levels written by hand, and we had one school project to build both an engine and a game. So I made Unity the editor instead. Designers built levels in Unity with our own components: a manager, a player controller, rigidbodies and colliders that mirrored the C++ ones field for field.

A custom exporter serialized the scene, and the engine loaded it and rebuilt every object by type name. The designers kept the tool they knew, and we never had to write an editor.

A level in the Unity editor on the left, running live in our C++ engine on the right
A level in Unity (left) and the same level running in our engine (right)

A physics engine from scratch

Orb is a physics puzzle game, so the physics had to be solid. I wrote it myself: rigidbodies with gravity, drag, bounciness and friction, AABB collision with continuous collision detection so fast objects never tunnel through walls, triggers for the puzzles, and raycasts.

Serialization handles polymorphic objects and shared pointers, so the same code saves scenes and prefabs and loads what Unity exported.

Our engine's window with collider debug drawing, over the same room in Unity with our Custom Box Collider in the inspector
Collider debug view in our engine, over the same room in Unity with our collider component selected

The game on top

On the gameplay side I wrote the character and camera controller, the trigger logic that drives each puzzle and the orbs themselves. The designers planned every room on paper first, and those plans became Unity scenes, then levels in the engine.

A designer's level plan drawn over the layout in Unity
A designer's plan for one of the rooms

Built with Leon Brands, who wrote the renderer. We went on to build Tristeon together.

← Back to the portfolio