Flappy Bird Implemented in TypeScript Types

The author of this web content discusses their creation of a 2D flappy bird game written purely in Typescript type annotations. They explain that Typescript types are Turing complete and that they have developed a type-level Typescript runtime using Zig. The game’s code is surprisingly simple, as it operates by threading the game state through a series of functions that update the state. Rendering the game involves populating a command buffer with drawing commands. The runtime, written in Rust and Zig, compiles Typescript code into bytecode and executes it using the web canvas API. The author also mentions potential optimizations and future plans for their project.

https://zackoverflow.dev/writing/flappy-bird-in-type-level-typescript/

To top