{"id":51061101,"url":"https://github.com/pyrou/tinytraffictown","last_synced_at":"2026-06-23T02:01:35.783Z","repository":{"id":363862385,"uuid":"1265028743","full_name":"pyrou/tinytraffictown","owner":"pyrou","description":"A tiny isometric traffic-management game with big late-90s energy. Mini motorways with RollerCoaster Tycoon bridges.","archived":false,"fork":false,"pushed_at":"2026-06-22T15:44:10.000Z","size":7288,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-22T17:22:36.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pyrou.github.io/tinytraffictown","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyrou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-10T11:56:53.000Z","updated_at":"2026-06-22T15:44:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pyrou/tinytraffictown","commit_stats":null,"previous_names":["pyrou/tinytraffictown"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pyrou/tinytraffictown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrou%2Ftinytraffictown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrou%2Ftinytraffictown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrou%2Ftinytraffictown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrou%2Ftinytraffictown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrou","download_url":"https://codeload.github.com/pyrou/tinytraffictown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrou%2Ftinytraffictown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34672250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-23T02:01:32.870Z","updated_at":"2026-06-23T02:01:35.772Z","avatar_url":"https://github.com/pyrou.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚗 Tiny Traffic Town\n\n\u003cimg width=\"1280\" height=\"816\" alt=\"Tiny Traffic Town gameplay screenshot\" src=\"public/screenshot.png\" /\u003e\n\n\n*A tiny isometric traffic-management game with big late-90s energy.*\nA mini motorways with RollerCoaster Tycoon bridges.\n\nBuilt in one hour during a rainy lunch break using Claude Fable 5.\n\nConnect colorful houses to matching businesses, and watch your beautiful road network slowly descend into gridlock — because in this town, everyone stops at the yield sign. Even the bikes. **Especially** the bikes.\n\n100% browser, 100% TypeScript, 0 backend, 0 external assets — every pixel is drawn\nprocedurally on a chunky low-res canvas, the way nature intended in 1999.\n\n## 🕹 Play it\n\nPlay online: **https://pyrou.github.io/tinytraffictown/**\n\nOr run it locally:\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen the URL Vite prints (default: http://localhost:5173). That's it.\nThe interface speaks both **French and English** — hit the FR/EN button to switch.\n\nOn first launch, a welcome screen explains the basics — hit \"Play\" to dismiss it\n(it won't come back), or click the title bar any time to bring it back.\n\n## 🔗 Sharing your map\n\nHit **Share** to copy a link containing your current road network and buildings —\nsend it to a friend and they'll start a fresh game on your layout.\n\n## 📦 How it works\n\n- **Businesses** generate orders. **Cars** leave houses of the same color, drive\n  over, deliver, and head home. Every delivery pays credits and score.\n- Roads **cost credits**; demolishing **refunds 100%**. No scams here.\n- Let a business pile up more than 5 pending orders and a red danger bar starts\n  filling. Hit 100% and it's **bankruptcy** — game over.\n- New houses and businesses keep popping up, with new colors over time. The town\n  always grows more houses than businesses — but the orders never stop.\n- **Bikes** wander from house to house just to get in everyone's way. They ride at\n  75% speed and you can't overtake them. You will learn to hate them. Lovingly.\n- The map is dotted with decorative **trees** — building a road or a building on\n  one cuts it down for good.\n\n## 🛣 Roads with altitude (the RCT way)\n\n- Ground roads, **elevated roads** on pillars (levels 1–4), and **ramps** to climb\n  one level at a time.\n- Two roads may only cross with a **vertical gap of 2** — so a proper overpass is:\n  ramp up, ramp up again, bridge at level 2, glorious.\n- **2x2 road blocks are forbidden.** The traffic laws of this town were not written\n  for roundabout-squares. (A ramp in the inner corner of a turn is fine.)\n\n## 🚦 Rules of the road\n\nEverything drives like a very polite, very stubborn simulation:\n\n- **Right-hand traffic**, two lanes per tile — oncoming cars pass each other cleanly.\n- **No overtaking.** If the car ahead stops, you stop. Form a queue. Be civilized.\n- Every T and X junction is a **yield with priority-to-the-right**: vehicles come to\n  a **full stop** (even on an empty road — rules are rules), then go only if the\n  junction is free and nobody's coming from the right.\n- Stops and starts are instant. No physics degree required.\n- If four cars all yield to each other forever, the most impatient one eventually\n  just goes. Like real life.\n\n## ⌨️ Controls\n\n| Action | Input |\n|---|---|\n| Build / demolish | Left click (drag to paint) |\n| Pan camera | Right / middle drag, arrow keys |\n| Rotate camera 0/90/180/270° | `R` or ⟲ ⟳ buttons |\n| Build height level | Mouse wheel, `Q` / `E` |\n| Tools: road / ramp / demolish | `A` / `Z` / `X` |\n| Ramp direction | `T` |\n| Pause | `Space` |\n| Speed x1 / x2 | `1` / `2` |\n| Language FR/EN | FR/EN button |\n\n## 🐞 Debug menu\n\nThe 🐞 button opens a little cheat panel: spawn a house or business of any color,\nor unleash an extra bike on the populace.\n\n## 💾 Saves\n\nBest score, options (camera rotation, speed, language) and your **game in progress**\nlive in `localStorage`. Close the tab mid-game; it'll be there when you come back.\n\"New game\" wipes the slate.\n\n## 🚀 Deployment\n\nEvery push to `main` runs a GitHub Actions workflow\n(`.github/workflows/deploy.yml`) that builds the project and publishes `dist/`\nto GitHub Pages at `https://pyrou.github.io/tinytraffictown/`.\n\n## 🏗 Under the hood\n\n```\nsrc/\n  Config.ts            every gameplay constant in one place\n  Game.ts              orchestrator: game loop, autosave, game over\n  i18n.ts              FR/EN strings (pure module, no DOM)\n  core/\n    types.ts           directions, road pieces, buildings\n    Grid.ts            3D grid, placement rules (crossings, 2x2 ban)\n    Pathfinder.ts      multi-source/multi-target A* over the 3D road graph\n  sim/Simulation.ts    economy, orders, danger, traffic rules, bikes — headless\n  render/Renderer.ts   procedural isometric Canvas 2D, camera rotation\n  input/Input.ts       mouse, keyboard, build tools\n  ui/UI.ts             Win9x-style HUD, debug menu, game-over screen\n  storage/Storage.ts   localStorage wrapper\n```\n\nStrict TypeScript, no runtime dependencies, no sprite sheets — roads, buildings,\ncars and bikes are all drawn with `fillRect` and stubbornness, then upscaled with\n`image-rendering: pixelated` for that authentic management-game-from-your-childhood\nlook.\n\n`npm run build` type-checks (strict) and bundles. The whole game gzips to ~12 kB,\nwhich is smaller than the average favicon these days.\n\n## 📜 Credits\n\nInspired by the *vibe* of RollerCoaster Tycoon 2 and Mini Motorways — no assets,\nnames, sprites or sounds were copied. All bugs are artisanal and locally sourced.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrou%2Ftinytraffictown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyrou%2Ftinytraffictown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrou%2Ftinytraffictown/lists"}