gitwtfhub

wtf is age-of-ai?

alexvilelabah/age-of-ai — explained in plain English

Analysis updated 2026-05-18

15TypeScriptAudience · developerComplexity · 4/5LicenseSetup · moderate

TL;DR

An open source, browser based multiplayer real time strategy game inspired by Age of Empires, with AI generated art and a Node.js game server.

Mindmap

mindmap
  root((repo))
    What it does
      Real time strategy game
      Multiplayer matches
      Bot opponent option
    Tech stack
      TypeScript
      Node.js server
      WebSocket
    Use cases
      Play with friends
      Study game server design
    Audience
      Developers
      Game hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Play a browser based real time strategy game against friends or a bot

REASON 2

Study an example of an authoritative multiplayer game server in TypeScript

REASON 3

Host your own instance of the game on a public or fixed domain

What's in the stack?

TypeScriptNode.jsWebSocketViteCanvas

How it stacks up

alexvilelabah/age-of-aiaestheticsuraj234/chai-gpt-buildappariciojunior/motion-studio-open
Stars151515
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasymoderate
Complexity4/52/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires Node.js 20+ and running separate server and client processes to play.

Wtf does this do

Age of AI is a browser based multiplayer real time strategy game inspired by classics like Age of Empires and Age of Mythology. Players gather resources, build a base, advance through ages, train units, and fight other players, all running entirely in the browser on a 2D canvas with no downloads or plugins needed. All the art and music were generated with AI, while the game logic and balancing were written by the project's author, and the whole thing is open source. The game supports English, Portuguese, and Spanish, detected automatically from the player's region and switchable from the options menu. To run it locally, a player needs Node.js 20 or newer. One terminal runs the WebSocket game server, and a second runs the web client through Vite. At least two browser tabs or machines are needed to play against another human, or a player can add a bot to play solo. For sharing the game outside a local network, the project includes scripts that use a Cloudflare Tunnel to generate a temporary public link, or to serve the game on a fixed domain if configured. The game is structured as three parts sharing one codebase: a shared package defining the game's types and network protocol, a Node.js server that is the single source of truth for what is actually happening in the match, and a browser client that renders the game and sends player actions to the server. The server runs the simulation ten times per second, using pathfinding and state machines for tasks like gathering and combat, and validates every command a player sends so a modified client cannot cheat. Code comments are written in Portuguese, though all variable and function names, plus the documentation, are in English. The project is released under the MIT License and welcomes outside contributions.

Yoink these prompts

Prompt 1
Explain how the authoritative server in this project prevents a modified client from cheating.
Prompt 2
Walk me through running the server and client locally with npm run dev:server and dev:client.
Prompt 3
Help me set up a Cloudflare Tunnel to share this game with friends over the internet.
Prompt 4
Show me how the shared package keeps the server and client protocol in sync.

Frequently asked questions

wtf is age-of-ai?

An open source, browser based multiplayer real time strategy game inspired by Age of Empires, with AI generated art and a Node.js game server.

What language is age-of-ai written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, WebSocket.

How hard is age-of-ai to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is age-of-ai for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.