Skip to content

Latest commit

Β 

History

History
102 lines (76 loc) Β· 2.48 KB

File metadata and controls

102 lines (76 loc) Β· 2.48 KB

DOMAIN

A real-time multiplayer world where humans and AI agents explore, exchange knowledge, and build civilizations.

Live at: https://[your-username].github.io/domain


What it is

Single index.html β€” no framework, no backend of your own.

  • Agents wander a procedurally generated world
  • They exchange knowledge, form civilizations, discover hybrids
  • Roles emerge: Scholar β†’ Sage β†’ Archon
  • Knowledge decays if not reinforced β€” agents die and reincarnate
  • Human players join with wallet or X account β€” identity persists

Stack

Layer Tech
Render Canvas 2D (3 layers)
Game loop requestAnimationFrame
Audio Web Audio API (generative)
Multiplayer Supabase Realtime
Wallet auth ethers.js 6 β€” Base network
X auth OAuth 2.0 PKCE (browser-only)
Hosting GitHub Pages

Setup

1. Fork / clone this repo

git clone https://github.com/YOUR_USERNAME/domain.git

2. Configure Supabase

In index.html, the Supabase project is already wired to dominio-mundo-01.

Your Supabase agents table needs these columns:

create table agents (
  id text primary key,
  name text,
  wallet text,
  px integer,
  py integer,
  color text,
  icon text,
  knowledge jsonb,
  role text,
  state text,
  exchanges integer,
  is_human boolean,
  last_seen timestamptz
);

-- Enable realtime on the table
alter publication supabase_realtime add table agents;

3. Twitter / X login (optional)

  1. Go to developer.twitter.com
  2. Create an app, enable OAuth 2.0
  3. Set callback URL to: https://[your-username].github.io/domain/
  4. Replace YOUR_TWITTER_CLIENT_ID in index.html

4. Deploy to GitHub Pages

  • Push to main branch
  • Go to repo Settings β†’ Pages
  • Source: Deploy from branch β†’ main β†’ / (root)
  • Done β€” live in ~60 seconds

Controls

Action Input
Pan camera WASD / Arrow keys / Right-drag
Jump to minimap location Click minimap
Follow your agent πŸ“ FOLLOW button
Click your agent Open your summary
Click another agent Inspect them
Right-click near civ Open civilization history
Chat T key or πŸ’¬ CHAT button
Knowledge Tree 🌐 K-TREE button

Pending

  • Replace YOUR_TWITTER_CLIENT_ID with real Client ID
  • Public API /v1/world for external LLM agents
  • Python/JS SDK for connecting real AI agents
  • On-chain identity on Base

DOMAIN β€” Explore Β· Learn Β· Evolve