GameDev Snippets

GameDev Snippets

This is a selection of personal projects that I’m proud of. Take a look!


GlideBall is a 2D platformer about the thrill of flight, and trading control for power. It’s a personal project I created over a few months in late 2016. Each of the first six levels in this version is designed to teach the player about a mechanic in the game. (The seventh shows off a 3D background I created, but I didn’t have time to make them all look like that!)

Shaders and Effects

Visibility transitions for diorama-like scenes

VisDef transition


I designed this effect with fixed-angle camera games in mind, to create a seamless transition between interior and exterior, or adjacent rooms.

The system is based on hand-placed scene boxes. Each one specifies certain objects to be visible, invisible or transparent-invisible (for foreground objects that need to fade out transparently instead of blending to black). These states are then blended smoothly between. States can also be additive, so instead of overriding all objects, it just affects a few. (This is used to make the blue carriage turn semi-transparent as the player moves behind it, above.)

Toon shader using baked light probes

For GlideBall, I created a toon shader to use on the main character, for a high contrast appearance that would be easily distinguished from the background. I modelled the general look, including rim light and stepped specular lighting on the metal wings/ball, on The Legend of Zelda: Breath of the Wild.

I use a novel technique to apply lighting from the environment. When a character is not under direct light, most toon shading models either use flat ambient light or apply soft indirect light, giving less of a toon effect. For my version, I bake the lighting – both direct and indirect – to Unity’s light probes. In a script, I extract the dominant direction and colour of light at the character’s position and feed those values to the toon shader. This technique works great for naturally-lit interiors like caves.

An additional feature of the shader is that it alters the normals used for shading to avoid non-aesthetic thin strips of light or shade. Normals at each vertex are bent towards the edges of the screen to become closer in direction to the normals causing the thin strips, thickening them. As the camera rotates, notice that patches of shade at grazing angles appear and disappear quickly, not lingering in “too thin” territory.

“Game Boy Color” shader

GameBoy Color 3D edit


This shader is inspired by the look of Game Boy Color games, which sometimes repeated the same tiles using different colour palettes in order to mimic lighting conditions. Using this shader, each material has two different hand picked palettes, which correspond to the surface being either lit or unlit.

Editor Tools

Procedural meshes from bezier curves

Level Editor

I created this tool to quickly design “2.5D” levels for GlideBall. From a sequence of points, the tool generates a mesh, including UVs and normals, and a 2D collider. Each segment can be set to either flat or smooth. I’ve recently started learning Houdini to further explore procedural modelling.

Gameplay Programming

Ground snapping

2016-10-19 snapoffon FINAL

When a physics-driven player character walks over uneven terrain, they will often leave the ground momentarily, creating a sense of inconsistency to the controls. Here I use raycasts to find ground close underneath, and snap back to it.

“Super Meat Boy 3D World”

2016-11-24 30fps

An adaptation of the famously precise Super Meat Boy controls into 3D!

3D art

Mountain and vines scene

Landscape Screen 2

I created this scene using Maya as part of a university course. I modelled the scene and created the textures by processing photographs I took, then imported it into Unity (pictured). For this project I wrote a blend shader which applies moss to the rock cracks based on a heightmap and vertex paint.

Crossing the gapLandscape Screen 1

%d bloggers like this: