Build your own open-world city game

Pixelport: a city you can walk, drive, rob and run from, built from the server up in TypeScript.

This is how real online games and web backends are built: a server holds the world, clients send requests, a router sends each one to the right code, a game loop moves time forward, and the client only draws what the server says. The same shape runs shops, ride-hailing apps and multiplayer games.

About 1500 minutes across 20 stages. Skills: HTTP APIs, Routing, Game loops, State & saves, BFS pathfinding, Seeded randomness, Rate limiting, Clean architecture.

The guides are part of licode Club.

Stages

  1. Make the server answer GET /health, and say 404 for anything else.
  2. Turn a raw request line into method, path, query and body.
  3. Read the map: tiles, counts, and one tile at a time.
  4. Draw the city as text: the client's first screen.
  5. Let players join, with safe names and unique ids.
  6. Route patterns: /players/:id finds one player.
  7. Walk around the city, step by step, without walking through walls.
  8. Show the players on the map.
  9. Cars: list them, get in, get out.
  10. Drive: two tiles per step, on roads only.
  11. Spend money at shops.
  12. Missions: start one, reach the target, get paid.
  13. An event log of everything that happens.
  14. Crimes give wanted stars.
  15. The game loop: time moves forward.
  16. Police chase the most wanted, using BFS.
  17. Seeded randomness and coins on the street.
  18. Save the whole world and load it back.
  19. The HUD and the leaderboard: the client's text screens.
  20. Production hardening: rate limits, leaving, resets.