LLM-Controlled
Social Simulations

A Phaser.js game engine for creating AI-driven social scenarios. Characters move, talk, and interact โ€” all orchestrated by your LLM.

๐ŸŽฎ

Interactive demo at /player.html

EXPLORE

FEATURES

๐Ÿค–

LLM Integration

Built-in callbacks for LLM decision points. Your AI controls character actions.

โš›๏ธ

React Component

<PixelGame> component with full TypeScript support and ref-based API.

๐Ÿ“

YAML Scenarios

Define scenes, characters, and sequences in readable YAML format.

๐Ÿ

Python Client

Headless mode for simulations and evaluations. No browser required.

QUICK START

import { PixelGame } from 'pixelgame/react';

function App() {
  return (
    <PixelGame
      scenario={scenarioYaml}
      autoPlay={true}
      onReady={() => console.log('Ready!')}
      onLLMQuery={async (req) => {
        // Your LLM decides what the character does
        return { actions: [{ action: 'say', params: { text: 'Hello!' }}] };
      }}
    />
  );
}