Web and phone game · farming and fishing
Conuco
A Caribbean farming, fishing and town-restoration game for web and phone, written Spanish first.
-
Game core, no renderer
- src/core
- src/state
- src/systems
- src/data
14 systems Farming, fishing, cooking, weather, festivals and more. Content is data: 12 crops, 9 fish, 8 recipes, 6 characters.Saved randomness The mulberry32 state is saved with the game, so a reload continues the same stream.126 tests in Vitest run this core without drawing a frame.
- Reads the state src
/render The only folder that imports PixiJS. It draws the world from the game state, so the art can change without touching the rules.
Saving and loading
- Autosave Runs when the app goes to the background.
- src
/save Moves the previous save to the backup slot, then writes the new save with its version./save.ts - src
/save On load, a corrupt main save falls back to the backup. Old saves migrate one version at a time; new fields get defaults from a fresh game./migrations.ts
- Role
- Timeline
- Stack
By the numbers
126
tests in 24 files, all on the game core
194
keys per language, English and Spanish
41
Dominican terms kept the same in both languages
The idea
Conuco is a farming, fishing and town-restoration game set on the Caribbean coast, written Spanish first. You plant, fish, cook and help bring a coastal pueblo back: the colmado stays open, festivals come back, and a resort developer wants to buy the coast.
What I built
PixiJS draws the world, and no file outside src/render imports it, so systems such as the end of a day run headless in Vitest. Content is data: 12 crops, 9 fish, 8 recipes, 6 characters, 4 town projects, 2 festivals and 12 achievements.
Randomness comes from a mulberry32 generator whose state is saved with the game, so a reload continues the same stream. Saves carry a version, migrate forward one step at a time, fill new fields with defaults, and keep a backup slot that recovers a corrupt main save. Autosave runs when the app goes to the background.
The hard parts
-
Game rules without the renderer
The renderer will change as the art changes. Keeping rules and state out of the rendering code lets the tests run the whole core without drawing a frame.
-
Saves that can grow
New crops, festivals and story steps add fields to the save. Each version has a migration, missing fields get defaults from a fresh game, and a backup slot recovers from a corrupt save, with a test for that case.
-
Dominican terms in both languages
Words such as conuco, colmado and sancocho stay the same in English and Spanish. The 41 kept terms live in one glossary, so both languages show them the same way, and each language file has the same 194 keys.
What’s next
Add a headless simulation to tune the economy, and two more festivals.
Related by idea
Seeded randomness, so any run can be replayed
SWARMGEDDON, Invicto, Flawless, The Veil · El Velo, Coherente, This site
Rules in a module with no UI imports
English and Spanish with key parity enforced
Saves that survive reloads, updates and storage loss
Coherente, SWARMGEDDON, El Corre Corre, Invicto