code

4 posts

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.

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.

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.

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.