Skip to content

krampusx64/DOMAIN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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 branchmain/ (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

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages