About webpunk.ts
webpunk.ts was born out of nostalgia for FlashPunk — the beloved ActionScript 3 game framework from the early 2010s that made 2D game development feel approachable and fun. FlashPunk gave you a fixed timestep, a scene stack, and a clean entity system. You could ship a real game without fighting a behemoth engine.
When Flash died, that simplicity went with it. Modern frameworks grew in scope. Building a small 2D game started requiring decisions about renderers, bundlers, physics libraries, and scene graphs before you could draw a single rectangle.
webpunk.ts is the answer to that drift. It is a TypeScript rewrite of the FlashPunk philosophy: give the developer a fixed timestep, a scene stack, an entity-component system, and a simple canvas renderer. Batteries included, bloat excluded.
It targets the HTML5 canvas and wraps cleanly with Tauri for native desktop distribution. The entire framework is a single npm package with zero required peer dependencies.
Current features (v0.2.1)
- →Fixed-timestep game loop (60 Hz) with interpolated rendering
- →Entity / component system with built-in Transform, BoxCollider, CircleCollider, Animator
- →Scene stack with push/pop semantics and built-in FadeScene + LoadingScene
- →Camera system with named world and UI layers, FollowController
- →Input system with named action bindings (keyboard + mouse)
- →Tiled map loader (.tmj/.tmx) with tile collision + object layers
- →SpriteSheet + AnimationClip system with per-frame durations
- →Canvas 2D renderer with integer scaling and pixel-art filtering
- →Screen-space UI: UICanvas, UIText, UIPanel, UIButton, UIImage, UIProgressBar, UIGrid
- →UITheme system — procedural skins or JSON sprite-atlas skins with nine-slice
- →Audio manager: SFX one-shots, BGM with fade in/out, volume controls
- →Asset loader: textures, audio, fonts (local + Google Fonts)
- →Typed event bus (augmentable via declaration merging)
- →Save system with pluggable providers (default: localStorage)
- →Math library: Vector2, Rect with immutable operations
- →Tween system with 10+ easing functions, pingPong, loop
- →Tauri desktop build compatibility
Roadmap
Roadmap items are subject to change. Follow the developer blog for updates.
View the full changelog for past releases.