TerraForge
Dig. Build. Survive. Repeat. A 2D procedural sandbox about mining, crafting, building and survival, with a generative world and Gemini-powered systems.
What makes the game tick.
Each card is a system. Click one to read the details.
The world keeps going after you stop digging.
TerraForge is a 2D procedural sandbox about mining, crafting, building and survival. The world is generated, the items are data, and the survival loop keeps moving.
It is built with React and Three.js, with a server-side Gemini integration for generative systems and a multiplayer module in progress. The prototype already has world generation, items, lighting, sound and textures.
The goal is a sandbox that respects the player: clear systems, readable feedback, and a world that is interesting to shape.
Procedural world
The world is generated from a seed, with biomes and ore placed by the generator. The same seed rebuilds the same terrain.
Mining
You break nodes to get the resources the world actually holds. Better tools reach harder material and mine faster.
Crafting
Resources are turned into tools, materials and structures through data-driven recipes. Each tier opens the next.
Building
You place and remove blocks to shape the world. Structures and storage turn a hole in the ground into a base.
Survival
Health, hunger and danger keep the sandbox honest. You have to eat and stay alive while you build.
Gemini systems
Server-side Gemini adds generated content, so some of the world is authored at runtime. The API key stays off the client.
Procedural world
Seeded generation creates the terrain, biomes and ore the rest of the game depends on.
Seeded generation
The world is generated from a seed, so the same seed rebuilds the same terrain.
Biomes
Different regions change what grows, what drops and how you travel.
Ore & terrain
Ore and terrain are placed by the generator, so resources are found rather than handed out.
Mining
Break nodes, get resources, and feed the crafting loop.
Nodes
You break ore and material nodes to get what the world actually contains.
Tools
Better tools mine faster and reach harder material, so upgrades pay off.
Resources
What you mine feeds crafting and building, closing the loop.
Crafting
Turn resources into tools, materials and structures.
Recipes
Recipes are data-driven, so crafting is defined by data rather than hardcoded.
Stations
You make the basics first, then unlock better stations and better goods.
Tools
Progression runs through making: each tool opens the next tier of work.
Building
Shape the world with placed blocks and structures.
Blocks
You place and remove blocks, so the terrain is editable.
Structures
Structures turn a hole in the ground into a place that lasts.
Storage
Storage keeps what you need, so a base holds the run together.
Survival
Health, hunger and danger keep the sandbox honest.
Health
Health is a live resource, so mistakes cost something.
Hunger
You have to eat, or you don’t last the day.
Danger
The world pushes back, so the sandbox is never free of risk.
Gemini systems
Server-side Gemini integration adds generative content and systems.
Server-side
Generation runs server-side, so the API key stays off the client.
Generative content
Some content is generated rather than hand-placed.
API
It is built on @google/genai, which handles the model calls.
Multiplayer module
A multiplayer module is in progress with ws and express.
Rooms
Shared sessions put players in the same world.
Sync
State is synchronised over WebSockets.
Server
Sessions run on an Express and ws server.
Tech & platform
Stack
React 19, Three.js, Vite, Tailwind.
World
Procedural generation in src/game/worldGen.ts.
Items
Data-driven items and recipes.
AI
@google/genai, server-side.
Networking
Multiplayer module (ws + express).
Status
Playable prototype.