Skip to content
appsbynate
← games

Tile Drop

A falling-block puzzle in 12KB, playable offline, with no scripts from anyone but me.

Section
games
Year
2026
Role
Solo project
Stack
TypeScript, Canvas, Service Worker

Replace this file with a real app. It’s here so the games section of the grid isn’t empty — delete it once you have a real one.

The problem

Every browser puzzle game I found for a five-minute break loaded a megabyte of analytics before it drew a single tile, and half of them stopped working on the subway.

What I chose, and why

Canvas and a fixed-timestep loop, no framework. The whole game is one file of state plus one draw call, which fits in my head, and a service worker caches it on first load so it works with no connection at all.

I skipped a physics library. Blocks move on a grid in whole cells, so the “physics” is two integer comparisons — a library would have been more code than the thing it replaced.

The hard part

Input latency. Holding left to slide a block felt sticky because I was reading key state once per frame, which meant a tap shorter than 16ms could vanish entirely. Queueing key events and draining the queue at the top of each tick fixed it, and made fast repeated taps behave the way players expect.

What I’d change

Scores live in localStorage, so they’re stuck on one device. A shared board would need a server, which is exactly the thing I was trying not to run.