c++11 constexpr fnv1a compile time hash

I've been working with some c++ lately and had previously been using static hash values for strings (similar to this from the Bitsquid blog) but the one thing that bothered me was the lack of ability to use them in switch statements, where I often want to use them. With constexpr in c++11, I can.

read more »

haxe: compile time macros

Haxe is a really great language for me. It does cross platform in a sensible way - by compiling and generating code to a target language. The best part is that it's not just converting, it's properly compiling the code - so all errors are caught by the compiler itself long before the generated code even gets there.

One of its most powerful features is the macro system which allows you to run haxe code at compile time, to augment and empower your existing haxe code. It sounds crazy - so let's dig in.


read more »

Past: js1k spring 2013

Past: is a look back at some older things I created.

For the 2013 spring js1k (javascript 1 kilobyte of code) challenge, I submitted a small 3D based canvas demo for fun. I just wanted to explore writing a simple 3D projection in 1k for myself, which turned out ok.


Original description:

3D projections in 2D, 50x50 grid mathed about with.

Click Read More to view right here.

read more »

Understanding Realtime Multiplayer

An article I wrote about understanding realtime multiplayer. Includes theory, plenty of links and diagrams and includes a working demo on github written in HTML5 with client and server for 1 vs 1 realtime multiplayer.

read more »