Skip to content

gamedev

Compile-time Archetype contracts

In my last post about the ECS migration, I complained about type discoverability with ECS compared to OO. I had already started to experiment with compile-time contract concepts but wasn't sure if it was just object-oriented thinking dying slowly. I now have something that makes me decently happy, but it may still make true ECS devotee's hair stand on end. I'd be curious to hear if and how this might be wrong-headed. Anyway, here's some compile time contracts for Archetypes using Arch-ECS

Migrating CitySim from Class Hierarchy Sim to ECS Sim

img_1.png I've been using Daniel Greenheck's CitySim.js as a sandbox for experimenting with simulation architecture. Not to improve or comment on Daniel's design — his goals are unrelated to mine — but because it gives me a fully-functioning city sim with a Three.js presentation layer I can work with, and it's a stepping stone for my other city sim projects.

I've been making modifications to this project on and off for a while now. The motivation for writing about it now is that the transition from Object-Oriented to ECS thinking has been the most interesting (to me) of my experiments in this code base. But I should cover some ground before getting to the actual topic. In brief: I took Daniel's code, spent some effort separating the simulation from the presentation, moved the simulation to a node.js server using the CQRS pattern, then ported that server from Node.js to C# using Wolverine for the CQRS plumbing. This post is about my latest refactoring — migrating from a per-object, class-hierarchy simulation to an Entity Component Systems architecture — and what that actually involved.

Vibing Voxxon - A Zaxxon inspired isometric voxel space shooter

img.png

I grew up on 80s arcade shooters. Asteroids, Space Invaders, Galaxian, Scramble, Defender and others all consumed an inordinate number of quarters, basically whatever allowance I had. Of all of them the one that left the most lasting impression was Zaxxon. The 1982 Sega arcade cabinet — and later its ports to whatever home computer you could convince your parents to buy — was unlike anything else at the time. An isometric scrolling shooter where you had to manage altitude to fly through gaps in walls, dodge missiles, and bomb ground targets. The shadow beneath your ship was your only depth cue. It was brutal, beautiful, and unique for its era. Mind you I always sucked at it, but I could watch the attract screen all day.

So when I was looking for a bite-sized project to try Claude Code on, Zaxxon immediately came to mind. It was something I could easily do myself, which gave me confidence that I would be in a good position to judge the output that Claude produced.

The result is Voxxon — a browser-based isometric scroller in Three.js with voxel explosions, a leaderboard, a boss battle, and more features than I originally planned.