Merchant Roads | Caravan Trading and Management Html5 Game

Bluehost Shared Hosting

Merchant Roads – A Caravan Trading and Management Game

Merchant Roads is a single-player medieval caravan trading simulation built with Phaser 3. Lead your caravan across a network of towns, buy low and sell high, manage resources, hire guards, invest in properties, and survive bandit encounters. No backend, no API keys, no external dependencies — just a single HTML file and a library.

Features

Trading & Economy

  • 22 trade goods — iron ore, stone, furs, grain, livestock, wool, timber, clay, fish, salt, iron tools, weapons, leather, cloth, beer, pottery, lumber, dried fish, flour, spices, silk, gems
  • Dynamic pricing — each town has unique supply/demand with daily fluctuations, prosperity modifiers, reputation effects, and event-driven price spikes
  • 30% buy/sell spread — profits require travelling between towns
  • Item decay — goods degrade 2% per day, encouraging quick turnaround
  • Seller scams — 15% chance of overpriced goods (30% of asking value)
  • Sales tax — 15% tax on all sales

World Map & Travel

  • 12 towns across 4 biomes — mountain, coastal, plains, capital
  • 23 connected roads with distances of 1–4 days and danger levels 1–5
  • Real-time animated travel — player icon walks along Bezier-curved roads
  • Zoom & pan — scroll wheel and middle-mouse drag
  • Road blocks — wars between factions can cut off routes and spike prices 2.5x

Bandit Encounters

  • Visible roaming bandits on roads (skull emoji, 2–5 active)
  • 4 encounter choices — Fight (based on guards), Bribe (85% success), Surrender (lose goods + 50% gold), Flee (based on road danger)
  • Consequences — guard losses, item loss, 5% death chance

Town Activities

  • Market — browse 4 sellers per visit with unique procedural portraits, buy and sell goods
  • Properties — 8 workshop types (smithy, brewery, tannery, linen weavery, pottery, smokehouse, carpentry, mill) generating daily income and appreciating +50/day. Max 20 properties.
  • Tavern — hire guards (5 for 500 gold), rest (+10 morale for 500 gold), gamble (100 gold bet, 50% win chance for 150 gold)
  • Bank — deposit gold for safety, withdraw, take loans (10% daily interest), repay, issue letters of credit. Properties freeze at 30+ days overdue.

Crew & Survival

  • Guards — hire for 100 gold each, 2 gold/day wage, protect against bandits
  • Food system — crew eats 0.5 food per person daily; starvation causes morale loss and attrition
  • Morale — ranges 0–100%, affected by food, rest, profits, battles. Game over at 0%.

Passive Income

  • Passive caravans — buy for 1,000 gold each, generate income every 2 days. Max = level × 5.
  • Workshops — daily rental income with appreciation

Progression

  • Level & XP — gain XP from trading profits, passive income, and sales. Each level grants +5 caravan capacity.
  • Reputation — town reputation (0–100) affects prices up to ±25%
  • Capacity upgrades — start at 20 cargo slots, upgradeable (cost = 2^level × 1000)

Living World

  • Day/night cycle — 6 phases (Dawn, Morning, Midday, Afternoon, Dusk, Night)
  • Dynamic factions — Hanseatic, Silken Road, Phoenician, Neutral — with relations and wars
  • Random events — Trade Festival, War Declared, Famine, Merchant Guild, Bandit Activity
  • AI competition — 20% daily chance AI merchants buy stock from towns
  • NPC caravans — 4 named NPC caravans travel the roads with their own progress

Save System

  • Auto-save every 5 in-game days to browser localStorage
  • Manual save/load from the pause menu

Tutorial

  • 10-step interactive tutorial that highlights UI elements and guides new players

Tech Specs

  • Engine: Phaser 3 (v3.60.0)
  • Language: Plain JavaScript (ES Modules) — no TypeScript, no transpilers
  • Assets: Procedurally generated PNG sprites and WAV audio — no image/audio editor needed
  • Dependencies: Zero runtime dependencies beyond Phaser
  • Resolution: 1280×720 base, responsive scaling
  • Fonts: Cinzel (headings) + Lato (body) via Google Fonts
  • Storage: localStorage for saves
  • Tools included: generate_sprites.mjs and generate_audio.mjs for full asset regeneration

What’s Included

  • Complete game source code (5,500 lines of well-organised JavaScript across modular scenes, systems, and utilities)
  • All generated assets (sprites + audio)
  • Asset generation scripts (Node.js)
  • Full documentation page
  • Phaser 3.60.0 runtime library
  • package.json with dev server and testing scripts

Browser Support

Works in all modern browsers (Chrome, Firefox, Safari, Edge) that support HTML5 Canvas and ES Modules.

How to Run

npx http-server . -p 8080 -c-1 

Or use any static file server of your choice.

0 average based on 0 ratings.

Tawajo

Tawajo

Visit Author's Portfolio

View Portfolio
Last Update 2026-06-03
Created 2026-06-03
Sales 4
Discussion Comments
Compatible Browsers Firefox Safari Opera Chrome
Software Version HTML5
High Resolution Yes
Files Included JavaScript JS HTML CSS
Video Preview Resolution