Skip to content

Commit d19a37b

Browse files
committed
doc: aotai hike game
1 parent 88e6653 commit d19a37b

File tree

2 files changed

+85
-17
lines changed

2 files changed

+85
-17
lines changed

demos/AOTAI_Hike/README.md

Lines changed: 85 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,97 @@
1-
## AOTAI_Hike Demo(Phaser 像素场景 + DOM 像素聊天 UI + Python 内核)
1+
# 鳌太线徒步模拟器(AoTai Hike)Demo
22

3-
### 目录
4-
- **frontend/**: 纯静态前端(Phaser 走 CDN,不需要打包)
5-
- **backend/**: FastAPI 后端(session/角色/act/map 等接口),并预留记忆/生成接口扩展点
3+
> A pixel-art interactive narrative game demo based on the MemOS multi-view memory system
64
7-
### 一键启动(开发)
8-
在本目录下执行:
5+
<div align="center">
6+
<img src="./banner.png" alt="AoTai Hike × MemOS - Poly-View Memory" width="100%">
7+
</div>
98

9+
## 📖 Overview
10+
11+
**鳌太线徒步模拟器(AoTai Hike)** is a Web game demo showcasing MemOS's multi-view memory capabilities. Players can create multiple roles, lead a team across the dangerous AoTai route, and experience memory-based intelligent NPC dialogues and dynamic storytelling.
12+
13+
### Key Highlights
14+
15+
- 🎮 **Multi-role roleplay**: Create and switch between multiple roles, each with an independent memory space
16+
- 🧠 **Multi-view memory**: Fully integrated MemOS multi-view memory system
17+
- 💬 **Intelligent NPC dialogue**: Generate personality-consistent dialogue based on role memory
18+
- 🗺️ **Fixed route exploration**: Follow the real AoTai route and experience the full journey
19+
- 🎨 **Pixel-art UI**: Use Phaser 3 to render pixel-art maps and role animations
20+
21+
**📚 For detailed documentation, see: [INTRODUCTION_ZH.md](./INTRODUCTION_ZH.md) | [INTRODUCTION_EN.md](./INTRODUCTION_EN.md)**
22+
23+
## 🚀 Quick Start
24+
25+
### Requirements
26+
27+
- Python 3.8+
28+
- MemOS service (local or remote)
29+
30+
### Installation Steps
31+
32+
1. **Install backend dependencies**
1033
```bash
1134
cd backend
1235
python -m venv .venv && source .venv/bin/activate
1336
pip install -r requirements.txt
37+
```
38+
39+
2. **Configure MemOS service address (optional)**
40+
```bash
41+
export MEMOS_API_BASE_URL=http://localhost:8002
42+
```
43+
44+
3. **Start the service**
45+
```bash
1446
uvicorn app:app --host 0.0.0.0 --port 8010 --reload
1547
```
1648

17-
打开:`http://localhost:8010/demo/ao-tai/`
49+
4. **Access the game**
50+
Open your browser and visit: `http://localhost:8010/demo/ao-tai/`
51+
52+
## 📡 Core API
53+
54+
- `GET /api/demo/ao-tai/map` - Get map information
55+
- `POST /api/demo/ao-tai/session/new` - Create a new session
56+
- `POST /api/demo/ao-tai/roles/upsert` - Create/Update a role
57+
- `POST /api/demo/ao-tai/roles/quickstart` - Quick-create default roles
58+
- `PUT /api/demo/ao-tai/session/active_role` - Switch active role
59+
- `POST /api/demo/ao-tai/act` - Perform an action (core endpoint)
60+
61+
For detailed API documentation, see [INTRODUCTION_EN.md](./INTRODUCTION_EN.md#-api-documentation)
62+
63+
## 🏗️ Project Structure
64+
65+
```
66+
demos/AOTAI_Hike/
67+
├── backend/ # FastAPI backend
68+
│ ├── aotai_hike/ # Game core code
69+
│ │ ├── router.py # API routes
70+
│ │ ├── services/ # Game services
71+
│ │ ├── adapters/ # Adapters (memory/dialogue/background)
72+
│ │ └── world/ # Map data
73+
│ └── app.py # Application entry
74+
├── frontend/ # Frontend (Phaser 3 + DOM UI)
75+
│ ├── src/ # Source code
76+
│ └── assets/ # Asset files
77+
└── README.md # This file
78+
```
79+
80+
## 🔧 Extensible Interfaces
81+
82+
The game is designed to be "lightweight but extensible"; all intelligence-related features are isolated via adapters:
83+
84+
- `adapters/memory.py` - **MemoryAdapter**: Interface with MemOS memory system
85+
- `adapters/companion.py` - **CompanionBrain**: NPC dialogue generation (based on MemOS chat_complete)
86+
- `adapters/background.py` - **BackgroundProvider**: Background asset provider
87+
88+
## 📚 Related Documents
89+
90+
- [INTRODUCTION_ZH.md](./INTRODUCTION_ZH.md) - **Complete project introduction (中文)**
91+
- [INTRODUCTION_EN.md](./INTRODUCTION_EN.md) - **Complete project introduction (English)**
92+
- [backend/MEMORY_INTEGRATION.md](./backend/MEMORY_INTEGRATION.md) - Memory system interaction guide
93+
- [PRD.md](./PRD.md) - Product requirements document
1894

19-
### API
20-
- `GET /api/demo/ao-tai/map`
21-
- `POST /api/demo/ao-tai/session/new`
22-
- `POST /api/demo/ao-tai/roles/upsert`
23-
- `PUT /api/demo/ao-tai/session/active_role`
24-
- `POST /api/demo/ao-tai/act`
95+
---
2596

26-
### 扩展点(先占位,方便后续接 MemOS/LLM/背景生成)
27-
- `aotai_hike/adapters/memory.py`:MemoryAdapter(当前为 InMemory)
28-
- `aotai_hike/adapters/companion.py`:CompanionBrain(当前为 mock)
29-
- `aotai_hike/adapters/background.py`:BackgroundProvider(当前为静态 SVG)
97+
**Enjoy your AoTai hike!** 🏔️

demos/AOTAI_Hike/banner.png

2.72 MB
Loading

0 commit comments

Comments
 (0)