adrian's soapbox

Raymarching Distance Fields: Concepts and Implementation in Unity

Raymarching is a fairly new technique used to render realtime scenes. The technique is particularly interesting because it is entirely computed in a screen-space shader. In other words, no mesh data is provided to the renderer and the scene is drawn on a single quad that covers the camera’s field of vision. Objects in the scene are defined by an analytic equation that describes the shortest distance between a point and the surface of any object in the scene (hence the full name Raymarching Distance Fields). It turns out that with only this information you can compose some strikingly complicated and beautiful scenes. Further, because you aren’t using polygonal meshes (and are instead using mathematical equations) it is possible to define perfectly smooth surfaces, unlike in a traditional renderer.

Snail by Inigo Quilez was created entirely using raymarching. You can find more examples of raymarched scenes on Shadertoy.

This article will first discuss the fundamental concepts and theory of raymarching. Then it will show how to implement a basic raymarcher in the Unity game engine. Finally it will show how to integrate raymarching practically in a real Unity game by allowing raymarched objects to be occluded by normal Unity GameObjects.

You can find a complete reference implementation at this Github Repository.
» read more

HTC Vive Teleportation System with Parabolic Pointer

Here I present an easy-to-use teleportation system for the HTC Vive and the Unity game engine. The system is modelled after Valve's game for the Vive The Lab, a game where the player can traverse VR environments that are bigger than the play area. You can check out the project source code here on Github. The Github project is open source and licenced under the MIT licence.

Myself demoing the system in the HTC Vive

» read more

Demo Reel

Here is a short demo reel of my proudest work that I created for undergraduate university applications. It highlights all of my major Github projects up to October, 2015. You can check out the video below.

Wii Remote API for Unity and C#

Within the past 10 years motion controls have become an integral part of gaming and console game development. The Wii Remote specifically has managed to capture a generation of casual gamers and has created a completely new genre of casual games. However, none of these controllers have managed to permeate the PC gaming market despite their potential. In response to this, I have created a cross-platform Wii Remote communication layer for Unity (and C# with minimal changes - primarily debug messages). The API allows Unity developers to integrate the Wiimote and popular extension controllers (such as the Nunchuck, Classic Controller, and Wii Motion Plus) into their games. It also supports the Wii U Pro controller (which behaves as a Wiimote with a special extension controller).

Here is a video of the some of the API's features:

You can download the latest release here. The API’s source code (including a full demo scene) can be found here.
» read more

Bunnyhopping from the Programmer's Perspective

"Bunnyhopping" is an exploit of a very popular bug in games like Quake III Arena, Half-Life, and Counter-Strike. Bunnyhopping, or bhopping for short, allows a player to exceed the game-defined speed limit. It has created entirely new methods of play and allows very exciting, fast-paced emergent gameplay. As a decidedly skill-based mechanic, competitive players love bhopping because it is so hard to master. Thus, it may be useful to you as a game developer to "implement" bunnyhopping into your game. The purpose of this article is to define what bunnyhopping is, why it is important to consider as a game developer, and how to implement it mathematically into your FPS movement code. All code examples are open-source and free to use, as always.

This is what bunnyhopping looks like in-game to a skilled player:

One Example of Bunnyhopping in Counter-Strike: Source (Source)

» read more

1 | 2