Framework Comparison
A fair, evidence-based look at g2w next to Phaser and Ritmo. Every fact below was verified against official sources on 2026-10-28 and linked in the sources section; cells without verifiable evidence say Not verified instead of guessing. If a claim here ever conflicts with reality, the source link wins.
registry.npmjs.org/jixi.js → Not found) and zero GitHub repositories matching jixi.js or jixijs(GitHub search API, checked 2026-10-28). The closest real projects are jixi (an unmaintained PixiJS engine, last npm publish 2021) and @jixi/js (an unrelated AI SDK). If you meant one of those — or another name — the comparison column will be filled in.Side by side
| Dimension | g2w | Phaser | Ritmo | jixi.js |
|---|---|---|---|---|
| What it is | TypeScript-first framework: small packages composed at the application boundary | All-in-one 2D HTML5 game framework, commercially maintained | Headless, type-safe ECS simulation runtime — the renderer is host code | No verifiable project found |
| Rendering | PixiJS 8 adapter (WebGL / Canvas / WebGPU), all browser-verified per feature | Built-in node-based WebGL renderer (v4); Canvas renderer deprecated in v4 | None built in — adapters mirror entities to Pixi, Three.js, or canvas | — |
| Scenes & lifecycle | Renderer-agnostic SceneManager with defined transitions and disposal semantics | Phaser.Scene with init/preload/create/update and 10 documented states | No scene manager — spawn/despawn commands with deferred application | — |
| Game loop | rAF with injectable FrameScheduler, seconds-based clamped deltaTime | RAF TimeStep with variable smoothed delta; fixed-step physics loop: none documented | Fixed-step Clock (hz 60) with accumulator, clamping, and interpolation alpha | — |
| Input | Keyboard, pointer, multi-touch (core contract) + DOM and Gamepad API adapters | Keyboard, pointer, drag & drop, multi-touch, gamepad — all built in | Keyboard, gamepad, pointer, touch with actions, rebinding, and local multiplayer | — |
| Physics | Not implemented (candidate work) | Arcade Physics + Matter.js bundled | Swept circle collision in ritmo-math; no rigid-body engine | — |
| Audio | AudioManager contract + @g2w/audio-web backend with an explicit autoplay policy | Built-in SoundManager (Web Audio + HTML5 Audio, spatial audio, autoplay unlock) | Not built in | — |
| TypeScript | Written in strict TypeScript end to end; core has zero runtime dependencies | JavaScript source with generated .d.ts definitions | TypeScript ≥5.9 strict; permission-checked systems make misuse a compile error | — |
| Architecture style | Explicit ownership, small strict contracts, adapters at the edge | Game Objects via component mixins; plugin system in core | ECS: permission-checked queries, relations, events, snapshots, seeded RNG | — |
| AI/agent support | AGENTS.md governance, deterministic-test discipline, DevTools read-only overlay | Official MCP server, .md versions of every docs page, 28 in-repo agent skills, Phaser AE | SKILL.md shipped in the npm package, llms.txt, oxlint plugin, replay-as-test devtools | — |
| Maturity | v0.1.0, 8 packages on npm (2026-10-28); pre-1.0, API may change | Since 2013; Phaser 4.2.1; ~40.6k stars (GitHub API, 2026-10-28) | First npm publish 2026-10-17 (v0.18.0, 0.x); 127 stars (GitHub API, 2026-10-28) | — |
| License | MIT | MIT | MIT | — |
What Makes g2w Different?
Separated into what is verified today, what is intended, and what is ambition:
- Verified factSmall, strict packages: @g2w/core has zero runtime dependencies and never touches a rendering technology or browser global — enforced by architecture tests, not conventions.
- Verified factRenderer-agnostic core with three browser-verified PixiJS backends: WebGL, Canvas, and WebGPU each pass the same 12-feature smoke in a real browser (R6-3).
- Verified factDeterministic, lifecycle-complete semantics: scene transitions, disposal races, texture ownership, and adapter rollback are pinned by regression tests — 449+ tests across the monorepo.
- Verified factAI-agent-ready by policy: AGENTS.md defines agent boundaries, DevTools observes the running game read-only, and every milestone ships with evidence, not claims.
- IntentionThe Effect-based G2WGame runtime is the primary application path while core stays Effect-free — a deliberate split, tested and documented (E3/E4).
- Ambition3D via a future Three.js adapter (R8) proving the renderer contract generalizes — exploratory, gated on a stable-contract release cycle, not started.
When Phaser Is the More Practical Choice Today
This page would not be honest without this section. g2w is a young, deliberately small framework; Phaser is a mature, commercially maintained one. Choose Phaser when:
- You need physics (Arcade/Matter), tilemaps, cameras, tweens, or particles today — Phaser ships all of them built in; g2w lists them as uncommitted candidate work.
- You are shipping a real game now and want 13 years of battle-tested behavior and a huge example/tutorial ecosystem.
- You want agent assistance with mature official tooling: Phaser's MCP server, .md docs, and 28 skills are ahead of g2w's AGENTS.md + DevTools approach.
- You prefer one install and one mental model over composing eight small packages yourself.
And choose g2w when:
- You need strict, explicit resource ownership and lifecycle semantics you can audit — every rule is tested, and documented ≠ implemented.
- You want a dependency-free core and the freedom to swap or add renderers (the same conformance suite any future adapter must pass).
- You are building with AI agents and want a framework whose invariants are enforced by deterministic tests rather than documented hopes.
- You want your game logic free of any rendering API — g2w scenes and objects are renderer-agnostic by contract.
About Ritmo
- Ritmo is not a competitor for the same job: it is a headless ECS simulation runtime with no rendering, scenes, or audio — you bring the renderer (it ships Pixi and Three.js adapters) — see ritmo.typeonce.dev.
- Its type-safety approach (permission-checked systems, compile-error guidance for agents) is the closest philosophical neighbor to g2w's strict-contract design, but applied at ECS level rather than framework level.
- It is very young: first npm publish 2026-10-17, 0.x with documented API changes between versions. Its fixed-step clock, rollback netcode, and replay-as-test devtools are genuinely ahead of anything g2w has.
The Broader Ecosystem
G2W next to ten popular web game frameworks and engines. Version, license, and status facts were verified against the npm registry and the GitHub API on 2026-10-28; the feature columns (physics, 2D/3D) reflect each project's official documentation and were not re-audited line by line like the deep comparison above.
| Framework | Type | 2D/3D | Physics | Language | License | Status (verified 2026-10-28) |
|---|---|---|---|---|---|---|
| g2w | Small packages you compose | 2D (3D planned) | Not yet (candidate work) | TypeScript strict | MIT | 0.1.0, 8 packages on npm |
| Phaser | All-in-one 2D framework | 2D | Arcade + Matter.js | JavaScript + generated .d.ts | MIT | 4.2.1, ~40.6k stars |
| PixiJS | Rendering engine only | 2D | None | TypeScript | MIT | 8.22.0, ~48.6k stars |
| Three.js | 3D library | 3D | None in core | JavaScript | MIT | r186, ~117k stars |
| Babylon.js | Full 3D engine | 3D | Havok / Cannon plugins | TypeScript | Apache-2.0 | 9.32.1, ~26.2k stars |
| Excalibur | TypeScript-first 2D engine | 2D | Arcade | TypeScript | BSD-2-Clause | 0.32.0 (still 0.x) |
| Kaplay | Quick-and-fun game library (Kaboom successor) | 2D | Simple built-in | JavaScript / TypeScript | MIT | 3001.0.19 |
| MelonJS | Tilemap-focused 2D engine | 2D | Built-in | JavaScript / TypeScript | MIT | 20.11.0 |
| PlayCanvas | 3D engine + visual editor | 3D | Via module | TypeScript | MIT | 2.23.3 |
| GDevelop | No-code / visual engine | 2D | Via behaviors | No coding required | MIT | Editor-based; no npm package |
| p5.js | Creative coding library | 2D | None | JavaScript | LGPL-2.1 | 2.3.4 |
Where everything sits
Every project above falls into one of three boxes:
- All-in-one engines (Phaser, Excalibur, MelonJS, Kaplay, Babylon.js, PlayCanvas, GDevelop) — every system built in, but you live inside their architecture and bundle; the renderer is not swappable.
- Pure renderers / libraries (PixiJS, Three.js, p5.js) — flexible, but the game loop, scenes, input, assets, and lifecycle are all yours to build; PixiJS is in fact what G2W's renderer adapter wraps.
- G2W's box — framework structure (loop, scenes, input, assets, audio, lifecycle) with a renderer-agnostic, zero-dependency core. The only project in this list that ships "swap the renderer" as a tested contract rather than a concept.
Sources
All facts were checked on 2026-10-28 against these official sources (framework counts like stars come from the GitHub API on that date):
- Phaser 4 release & changelog
- Phaser README (AI-assisted development, TypeScript)
- Phaser agent index (llms.txt)
- Phaser MCP server
- Ritmo documentation
- Ritmo repository
- g2w ROADMAP.md (evidence per milestone)
- g2w v0.1.0 release
Framework community numbers (stars, forks) change daily and are only meaningful as order-of-magnitude context, not rankings. No performance benchmarks are claimed by anyone in this table — g2w's own roadmap requires a reproducible benchmark harness before any performance claim.
Next steps
See what has actually shipped in Roadmap, or start building with Installation.