GitHub โ†—

Novactorio

๐Ÿงช View animated quality gates โ€” typecheck ยท build ยท lint โ†’

A browser factory-automation game in the spirit of Factorio, written from scratch in TypeScript with a hand-built Canvas 2D engine.

Novactorio (repository: Factorio-web-game) is a complete browser game: an original 2D engine, chunk-based infinite world generation, supply chains, conveyor belts, pipe networks, enemy AI, pollution, co-op multiplayer, 23 localizations, and a Stripe-powered premium tier.

Stack: TypeScript 5.5 (strict), React 18, Vite 6, Supabase (Auth, Realtime, storage), Stripe, Deno Edge Functions, Cloudflare Pages/Wrangler.

Highlights

  • Hand-written engine โ€” ~2,500 lines of Canvas 2D rendering with no game frameworks (no Phaser, no Pixi).
  • Factorio-like depth โ€” conveyor belts, inserters, pipe networks, research tree, pollution, enemy evolution.
  • Infinite world โ€” chunk-based terrain with Perlin noise, seamless scrolling.
  • Co-op multiplayer โ€” Supabase Realtime broadcasts player positions and build actions (place/remove).
  • 23 languages โ€” runtime-switchable i18n; Polish and English fully translated.
  • Cloud saves โ€” world snapshots backed up to Supabase (world_snapshots.save_data).
  • Premium monetization โ€” Stripe Checkout subscriptions (Starter/Premium) via Deno Edge Functions; webhooks update profiles.premium_tier.

Tech stack

Layer Technology
Language TypeScript 5.5, strict: true
UI React 18 (overlay), TailwindCSS
Build Vite 6
Rendering Hand-written Canvas 2D engine
Backend Supabase (Auth, Realtime, Postgres, Storage)
Payments Stripe Checkout + webhooks (Deno Edge Functions)
Edge functions Deno (supabase/functions/)
Deployment Cloudflare (Wrangler)

Repository layout (highlights)

Factorio-web-game/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ game/            # engine.ts, renderer.ts, systems.ts, world.ts, noise.ts, ...
โ”‚   โ”œโ”€โ”€ render/          # render pipeline modules
โ”‚   โ”œโ”€โ”€ core/            # engine/systems/types
โ”‚   โ”œโ”€โ”€ components/      # React UI: AuthScreen, BuildMenu, ChatPanel, ...
โ”‚   โ”œโ”€โ”€ services/        # auth, coop, trade
โ”‚   โ”œโ”€โ”€ config/          # env, admin flags
โ”‚   โ””โ”€โ”€ i18n.ts          # 23-language localization
โ”œโ”€โ”€ supabase/
โ”‚   โ”œโ”€โ”€ functions/       # stripe-checkout, stripe-webhook, trade-fee-checkout, trade-webhook
โ”‚   โ””โ”€โ”€ migrations/
โ”œโ”€โ”€ docs/                # planning docs (e.g. plan-NETWORK.md)
โ”œโ”€โ”€ tools/               # easter-egg script, slicer.html
โ””โ”€โ”€ package.json

Related pages