bytopia (working title)

For the last few months I’ve been working on a voxel-based construction/exploration game in my spare time. Figured it’s a good time to share some of my progress.

A quick video demo here.

It’s all fairly minimalist so far, but the major features:

  • First pass on procedural world generation.
  • Large worlds (currently +/- about 2 million blocks in any direction, including up/down).
  • Day/night cycle with sun and moon, as well as a rudimentary atmospheric scattering approximation.
  • Normal mapping combining surface normals with a bevel effect on blocks to give everything a nice blocky look.
  • Rudimentary UI, including inventory, main menu, HUD, and a debug console.
  • Fairly polished movement controls and physics for the player (this is a big priority for me–games like this often have awkward-feeling movement and I want to avoid that).

A few technical details:

  • Handwritten in modern C++.
  • Renderer based on OpenGL 4.5.
  • Physics (just for cosmetic effect for dropped items etc) using PhysX.
  • Font rendering/layout using freetype2 and harfbuzz.
  • Windows-only so far, but built with ease of porting in mind.


Over the last couple years I’ve been impulsively filming a lot of little things I find interesting, but then never doing anything with the footage. So I’ve started a Youtube channel that will be just those pretty little instants: videos mostly less than a minute long, sometimes silent, sometimes with natural audio, sometimes with my own soundtrack added.

I’m not sure how long I’ll keep this up, but I do have a huge archive of this stuff to draw from, so I can probably keep it going for a while even if I don’t film anything new.

Feel free to subscribe, especially if you’re into shallow focus and brevity…

ephemera / moments

Week 9: GPU Game of Life


For my ninth weekly project, I’ve created…life!

Although it was originally computed by hand, Conway’s Game of Life has been implemented as software so many times over the past 44 years by so many people that I’m not sure doing my own version even counts as a creative project, but somehow throughout my decades of computer programming I’ve never built one, so I’m doing it anyway.

This particular version is implemented almost entirely on the GPU–the CPU provides the initial state and can turn more cells on to keep the game going, but otherwise all computation is done in a compute shader. (Compute shaders are kind of brilliant for this, as the Game of Life is practically the definition of an embarassingly parallel problem.)

I render live cells in red, and have dead cells fade gradually in green instead of disappearing. This makes it easier to see structures forming and vanishing. The initial condition is just created by randomly drawing pixels all over the buffer, and you can add more at any time by holding down the Enter key.

One thing I found particularly interesting is how many gliders tend to emerge from these completely random starting conditions! With the green trails behind them, they’re very visible. You also get a lot of small, stable structures as well as simple oscillators. (Phase-2 oscillators are almost impossible to see in this simulation, unfortunately, because it moves so fast it makes them look stable.)

Click here to download the program (update: added some DLLs it was missing). It’s a Win32 executable and requires a D3D11-compatible video card (anything even remotely recent should work). There’s some on-screen help-text that explains some other controls you can use.

Week 8: Attempted Cinemagraph

I absolutely adore cinemagraphs–still images with subtle, looping animation. There’s something mesmerizingly timeless about the best ones. For this week’s project, I tried to create my own (large file, may take some time to load–sorry):

It’s just some buildings on 9th St NW as seen out of my window, with the reflection of a car going by. My main takeaway from doing this is to wonder how the heck cinemagraph creators keep their file sizes reasonable! This thing is huge, despite the motion being fairly subtle (everything but the big tree and the car going by is completely still).

On the plus side, I think I hid the point where it loops pretty well (I can’t see it, and I know it’s there)–the end of the original video quickly crossfades back into the beginning.

So, all in all, a modestly successful experiment with some as-yet unsolved problems. Next time I’ll see about reducing the size–by lowering the framerate, using a shorter loop, and/or a smaller animated part of the image.