HARTWELL_LABS

Novactorio

Novactorio (repository: `Factorio-web-game`) is a complete browser game: an original 2D engine, chunk-based infinite world generation, supply chains,

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

LayerTechnology
LanguageTypeScript 5.5, strict: true
UIReact 18 (overlay), TailwindCSS
BuildVite 6
RenderingHand-written Canvas 2D engine
BackendSupabase (Auth, Realtime, Postgres, Storage)
PaymentsStripe Checkout + webhooks (Deno Edge Functions)
Edge functionsDeno (supabase/functions/)
DeploymentCloudflare (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

On this page