Spaces:
Paused
Paused
metadata
title: Mini World
emoji: π
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
Mini World
A real-time AI-powered exploration game where an AI agent navigates a procedurally-generated 2D emoji world.
Features
- πΆ AI agent that autonomously explores a 600x600 world
- π Collectible diamonds scattered across the map
- π³πͺ¨ Procedurally generated terrain using Perlin noise
- Real-time updates via Server-Sent Events (SSE)
Environment Variables
Set these in your Hugging Face Space settings:
HF_TOKEN(required) - Your Hugging Face API token for model access
Local Development
# Install dependencies
bun install
# Start the server
HF_TOKEN=<your-token> bun server.ts
The server runs at http://localhost:7860 (or set PORT env var)
Architecture
- server.ts - HTTP server with SSE streaming
- aiService.ts - AI inference using OpenAI SDK with HuggingFace router
- gameState.ts - Game world and state management
- index.html - Frontend UI