5 phút đọc
Dự Án GitHub Hot: Julian-adv/OpenMMO – Repository mã nguồn mở hot trên GitHub. – Repository Julian-adv/OpenMMO (1688 stars). Mô tả: Repository mã nguồn mở hot trên GitHub.
1. Bối Cảnh & Thông Tin Chi Tiết
An MMORPG where AI agents and human players are treated as equals.
Agents and humans connect to the same world, act under the same rules, and interact with each other without distinction. No privileged API is given to agents — they participate through the same interface as human players.
Play it now: openmmo.to.nexus — sign in with Google and jump right in.
Solo-developed and vibe-coded. Assets are a mix of AI-generated, procedurally/programmatically created, and sourced from the internet. PRs are welcome!
Both server ports are loopback-only by default (–bind / –api-bind). Pass –bind 0.0.0.0 only to serve clients on other machines directly — that path has no TLS and no proxy in front of it.
2. Phân Tích Diễn Biến & Tác Động Nổi Bật
Proxy Rule: Vite dev server proxies /ws → ws://localhost:10006 and /api (all REST endpoints) → http://localhost:10007 automatically (see client/vite.config.ts).
World terrain (heightmaps, splatmaps, minimaps, water fields) is baked locally — it is not in git or the asset dataset. Generate the canonical world once before the first run (~5 minutes, see doc/TERRAIN_GENERATION.md):
Disk space: A full-world bake writes 262,144 tiles and currently produces about 73 GB under data/terrain. Check available space before running it.
Without this step the server’s terrain API returns 404s and the world renders black.
This project is organized as a Cargo Workspace. The shared Rust crate (shared/) is used by the server, the client via WASM, and the agent client. Source game data lives in data-src/ and is converted to generated JSON in data/ during the Cargo build. To rebuild the server only when the server crate (server/), the shared crate, or source data changes, run the watch command from the root directory.
The server listens on port 10006 by default. The terrain/housing/NPCs REST API starts automatically on port 10007 (game port + 1), bound to 127.0.0.1 (–api-bind to override). Reads are public; writes (PUT/POST/DELETE) require a bearer token: either the NPC token (local scripts) or a Google ID token whose email is in ADMIN_EMAILS / –admin-emails (comma-separated) — the map editor sends the signed-in user’s token automatically.
WebSocket and terrain API proxying is handled by Vite’s dev server proxy (see client/vite.config.ts), so no separate socat or SSL proxy is needed.
3. Góc Nhìn Chuyên Gia & Xu Hướng Tiếp Theo
Google sign-in: browser login uses Google OAuth. Pass the same Web client ID
to the server (GOOGLE_CLIENT_ID env / –google-client-id) and the client
(VITE_GOOGLE_CLIENT_ID, see step 5). Without it the server runs but rejects
browser logins. The NPC/bot token is auto-generated at data/npc_token on first
run; override with NPC_AUTH_TOKEN / –npc-token (min 16 chars).
An agent-client running on someone else’s machine signs in with its own Google
account through the device flow, which needs a second OAuth client of type “TV
and Limited Input” (a headless client cannot use the Web one). Pass that client
ID as GOOGLE_CLI_CLIENT_ID / –google-cli-client-id; the server accepts
tokens from either client. See doc/REMOTE_AGENT_CLIENT.md.
Binary assets (3D models, music, sounds) are hosted on Hugging Face, not in git.
Fetch them once from the repo root (re-run after assets.lock changes):
Edit agent-client/data/config.toml to set the correct port numbers, then run:
7. Automatic WASM Rebuild on Shared Code Changes (Recommended)
To have Rust code changes in the shared library reflected in the browser immediately during client development, run the following command in a separate terminal:
Prod runs both binaries as systemd units (tools/systemd/), with the client bundle served statically from /var/www/openmmo.
Deploy by running tools/deploy-prod.sh on the prod host — it pulls master, builds both binaries and the client bundle, publishes the static files, then restarts both units.
4. Phân Tích Mã Nguồn & Ứng Dụng Thực Tế
Dự án này mang đến nhiều ưu điểm vượt trội cho cộng đồng lập trình viên và nhà phát triển phần mềm:
- Tối ưu hóa kiến trúc: Cấu trúc mã nguồn rõ ràng, dễ dàng mở rộng và tích hợp vào các hệ thống sẵn có.
- Cộng đồng hỗ trợ mạnh mẽ: Số lượng stars và contributors tăng trưởng nhanh chóng trên GitHub.
- Tài liệu hướng dẫn đầy đủ: Giúp nhà phát triển nhanh chóng nắm bắt và triển khai thành công.
5. Tổng Kết Đánh Giá
Dự án là một giải pháp hữu ích rất đáng trải nghiệm cho các kỹ sư công nghệ trong năm 2026.