Logo Multiplayer

Multiplayer

Tổ chức
SummerEngine
multiplayer

Start here for Summer multiplayer: how authority, clients, Worlds and Sessions fit, and what comes next.

Tổng quan

Nhà phát hànhSummerEngine
Kho mãsummer
Tên kỹ năngmultiplayer
Sao
91
Bản fork
8
Tệp đi kèm
1
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được SummerEngine công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Multiplayer trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/SummerEngine/summer/tree/main/library/skills/multiplayer
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SummerEngine/summer.git /tmp/summer
mkdir -p .claude/skills
cp -r /tmp/summer/library/skills/multiplayer .claude/skills/multiplayer
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Multiplayer trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Multiplayer ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Multiplayer không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

/multiplayer — how Summer multiplayer works

Read this first, whatever the user asked for: "multiplayer", "co-op", "PvP", "online", "play with friends", "lobby", "peer-to-peer", "host a game", "netcode", "sync players". It explains the model in one page and sends you to the skill that builds the next piece.

The picture

A Summer multiplayer game is one project with two entry scenes:

  • the client scene, which every player runs: input, camera, visuals, UI;
  • the authority scene, which runs headless as the match server and owns the rules.
text
   each player's device                   Summer hosting (or Local Play)
  ┌──────────────────────┐  my pose       ┌──────────────────────────────┐
  │ client scene         │ ─────────────► │ authority scene = one World  │
  │ moves its own player │  "collect"     │ checks every pose and request│
  │ draws everyone else  │ ─────────────► │ owns score, doors, items...  │
  │                      │ ◄───────────── │                              │
  └──────────────────────┘  state, events └──────────────────────────────┘
  • A running match is a World. Summer starts one authority for it; the game declares what a World is in world.json (a WorldDefinition).
  • A player joins with Summer.client.join(...) and gets a verified Session: their seat in that World, with a verified player identity.
  • Players find a World through a queue in summer.build.json. Hosted, Summer's matchmaking fills it; locally, Local Play starts the authority and N clients on your machine.
  • The same code runs locally and hosted. No if server, no local-only branches, no IP addresses.

There is no player-hosted server, so there is no host migration, and a player quitting never ends the match for the others.

How data moves

Both sides load one network composition (network/composition.tres). It declares every stream the game uses, and a Spawner node attaches it to the World:

You wantUseWho writes itSkill
My character movesOwner-written State group, one per playerthat player's client; the authority checks each posemultiplayer-movement
Everyone sees the score, a door, the round timerAuthority-written State group, World audiencethe authoritymultiplayer-state
Only I see my wallet, hand, inventoryAuthority-written State group, target-Session audiencethe authoritymultiplayer-state
A player wants to buy, open, collect, ready upCommandclient asks, authority accepts or refusesmultiplayer-state
A one-off effect (sparkle, sound, hit flash)Eventthe authoritymultiplayer-state

State is retained, so a late joiner gets the current value. Commands carry the sender's verified Session. Events are fire-and-forget.

The rules

  1. Each client moves its own character. Movement feels instant on every connection. The authority accepts or refuses each pose, and a refused pose snaps the player back.
  2. The authority owns every other fact. Clients never change shared state; they send a Command and show the result.
  3. Identity comes from the Session, never from a field a client sent.
  4. Never use the stock high-level multiplayer API in a Summer game: no @rpc, MultiplayerSynchronizer, MultiplayerSpawner, ENetMultiplayerPeer, multiplayer.is_server() or peer-ID branches. Their sender ids are transport peers, not verified players. Late joiners miss state, and the game cannot use Summer hosting, matchmaking or identity.
  5. Test under a bad network before calling anything done: Local Play with latency, jitter and loss (multiplayer-testing).

Words

WordMeaning
GameYour game on Summer; its id is gameId in summer.build.json. Summer.initialize() takes no ID: Summer knows which game is running
WorldOne running match or shared place, simulated by one authority
WorldDefinitionworld.json: which scenes run the client and the authority, lifetime, persistence
QueueHow players find a World; declared in summer.build.json
SessionOne player's verified seat in a World
CompositionThe network contract both sides load: State streams, Command and Event streams
State groupOne retained value (a pose, a scoreboard); one writer, an audience
CommandA request from a client, answered by the authority
EventA one-off message from the authority
Local PlayRuns the authority and N clients locally, with optional network emulation

Build it in this order

Each skill continues the same small game, so their code fits together:

  1. multiplayer-project: the files, both entry scenes, joining, and a first Local Play run.
  2. multiplayer-movement: each player moves their own character; others see it smoothly; the authority checks every pose.
  3. multiplayer-state: score, doors, private inventories, Commands and Events.
  4. multiplayer-testing: Local Play under latency and loss, bots, and what a passing run must show.
  5. multiplayer-publish: export the summer.games bundle and upload it as a Build.
  6. release-readiness: before players get a version, prove the server starts its authority scene and a real online join works.

Add Summer services

SkillWhat it addsWorks in Local Play?
summer-matchmakingQueues, match sizes, teams, the accept prompt, join failuresYes, without the accept prompt
summer-match-resultsEnding a match: winners, losers, rating changesYes
summer-leaderboardsRatings and Game-wide leaderboardsPartly; reading boards needs hosting
summer-partiesFriends queue together as a partyNo, hosted only
summer-friendsThe player's Summer friends and direct messagesNo, hosted only
summer-player-dataProgress that follows the player to any WorldYes, stored on disk
summer-world-savesWorlds that persist between sessionsYes, in memory
summer-world-chatText chat inside a WorldNo, hosted only
summer-storeSelling items for Sparks, owned itemsItems yes; the store is hosted only
summer-analyticsGame events for your analytics dashboardNo, hosted only

What people ask for, and what Summer does

They ask forOn Summer
"One player hosts", peer-to-peerA headless authority per match, started by Summer or by Local Play
Host migrationNot needed: no player is the authority
Join by IP, invite code, server browserNot available. Players join a queue; friends join as a party (summer-parties)
A lobbyA queue with minPlayers/maxPlayers and an accept prompt (summer-matchmaking)
"Sync the player's position"An owner-written pose group (multiplayer-movement)
"Tell everyone the door opened"An authority-written State group (multiplayer-state)
"The client asks the host to buy something"A Command validated with the verified Session (multiplayer-state)
Save progressPlayer data for the player, World saves for the place (summer-player-data, summer-world-saves)

Start

Check what exists: summer.build.json, world.json, network/, authority/, client/.

  • None of them: start with multiplayer-project.
  • They exist: pick the skill for the piece you need from the tables above.
  • The game already uses @rpc or MultiplayerSynchronizer: tell the user it needs moving to Summer's networking. Then follow multiplayer-project and port one system at a time: movement first, then state.

From a shell

No Summer MCP tools in this session? Run each one as a command; when summer --version is missing or below 4.0, use npx -y summer-engine@latest in place of summer. Fields are flags in kebab-case (--scene-path res://main.tscn) or one --input '<json>', and summer ops describe <op> prints the exact input. The summer-cli skill has the rest.

In this skillCommand
summer_get_scene_treesummer engine get-scene-tree
summer_get_script_errorssummer engine get-script-errors
summer_project_settingsummer engine project-setting

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Multiplayer làm được gì?

Start here for Summer multiplayer: how authority, clients, Worlds and Sessions fit, and what comes next.

Vì sao nên dùng Multiplayer trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Multiplayer là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Multiplayer trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/SummerEngine/summer/tree/main/library/skills/multiplayer. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Multiplayer?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Multiplayer với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Multiplayer với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Multiplayer có miễn phí không?

Có. Kỹ năng này được SummerEngine phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇