Notes · Deep-dives · Build logs
Notes.
A running set of deep-dives on the things I build and break — game mechanics, the modern web platform, real-time systems and provably-fair design. Written from the actual code, not marketing. New notes land here a couple of times a week.
All notes
Animated page transitions on a plain multi-page site with about ten lines of CSS: the @view-transition at-rule, shared elements via view-transition-name, transition types, the pageswap/pagereveal events, and why every failure mode is one of five things.
How to hide 100ms of latency in a browser multiplayer game: a fixed tick loop, an input buffer, server reconciliation with rollback re-simulation, entity interpolation for remote players, and error smoothing that hides the corrections.
The Elo formula in plain English, a dependency-free JavaScript implementation, sane K-factor tiers, and how to turn ratings into an expanding-window matchmaking queue that doesn't leave players waiting.
How to move physics simulation into a Web Worker so your browser game stays at 60 FPS — postMessage vs Transferable vs SharedArrayBuffer, practical code with Rapier, and the interpolation trick that hides physics lag.
How to build a mobile-money payment flow that never double-charges — idempotency keys, webhook deduplication, and the state-machine pattern from real M-Pesa and EcoCash integration code.
A practical guide to the Temporal API — PlainDate, ZonedDateTime, Duration and Instant explained with real code. Why Date is finally obsolete in Node.js 26 and ECMAScript 2026, and how to migrate.
WebSocket, Server-Sent Events and WebTransport compared side by side — latency, browser support, direction, and a practical decision framework for choosing the right real-time protocol now that WebTransport is Baseline.
How online slots actually decide each spin — virtual reel strips, weighted symbol mapping, PRNG algorithms, RTP calculation, and why there is no such thing as a hot or cold machine.
How provably-fair dice and mines games turn an HMAC-SHA256 hash into a roll or mine placement — the exact byte extraction, float conversion and Fisher-Yates shuffle, with Python code to verify any round yourself.
Why the same ZWG buys fewer units later in the month: the six ZETDC bands, the 6% REA levy, the 400 kWh quota, and how to work out any purchase yourself.
How to transfer files between phones, PCs and tablets over Wi-Fi with no internet — a practical breakdown of WebRTC DataChannels, mDNS discovery, and the signaling trick that makes it all work offline.
Why JavaScript's garbage collector stutters your browser game at 60 FPS, and how to fix it with object pooling — a practical walkthrough with code, pool sizing, and Three.js InstancedMesh patterns.
How to implement hitscan raycasting and physics-based projectile shooting in a Three.js browser FPS — code, trade-offs, and when to use each approach.
A practical walkthrough of porting a Three.js browser game from WebGLRenderer to WebGPURenderer — the real migration steps, TSL shader conversion, compute shaders for particles, and the performance wins that actually matter.
How to use Supabase Realtime's Broadcast, Presence, and Postgres Changes to build multiplayer browser games — architecture patterns, code examples, and the trade-offs nobody mentions.
Two completely different models promise fair games — provably-fair cryptography and traditional RNG lab certification. How each works, what each guarantees, and the gaps in both.
How an HMAC-SHA256 hash becomes left-or-right bounces at every peg — the most visual way to understand provably-fair game mechanics, with a Python snippet to verify any drop yourself.
The honest engineering answer to "can I predict Aviator?" — how the crash multiplier is generated from a server seed, client seed and nonce, and why it's verifiable but never predictable.
The full build of a browser FPS: scene and renderer setup, pointer-lock controls, collision, weapons and enemies — and the parts that always cost more time than expected.
What provably fair actually means in crash games like Aviator and Plinko, and the two-minute server-seed, client-seed and nonce check that proves a round was honest.
How LanLink moves files across a local network with no internet, no cable and no account — discovery, transfer and the platform quirks on Android, Windows, macOS and Linux.
OpenStreetMap tiles, OSRM routing and a driver-matching flow that works on Zimbabwean data prices — the whole TapRide stack without a single paid maps call.
Why row level security is the only sane place to enforce who can see a balance, and how ZimPay's transfers, ledgers and auth fit around it.
Accessible components, a build that ships ESM and CJS, and the discipline of adding no runtime dependencies at all.