This glossary defines codebase-specific terms, domain concepts, and technical jargon used within the go-dota2 library. It serves as a reference for engineers to understand the mapping between Dota 2 Game Coordinator (GC) concepts and their implementation in Go.
The central server system at Valve that manages Dota 2 sessions, matchmaking, lobbies, and player economies. The Dota2 struct in this library acts as a client to this coordinator client.go32-49 It communicates via the Steam Network using the go-steam library README.md13 README.md80-81
The unique identifier for the Dota 2 application on Steam. In this codebase, it is defined as 570 client.go23
A state synchronization mechanism used by the GC to keep the client updated on volatile objects like Lobbies, Parties, and Inventories README.md43-48 Instead of sending full state updates for every change, the GC sends incremental updates to "Shared Objects" via messages like k_ESOMsg_CacheSubscribed and k_ESOMsg_UpdateMultiple client.go89-94
Refers to the specific types of objects stored within the SOCache. Each CSOType corresponds to a specific Protobuf message.
| Term | Code Entity | Description |
|---|---|---|
| Lobby | cso.Lobby | A game session container for players and spectators. Maps to protocol.CSODOTALobby README.md63 |
| Party | cso.Party | A group of players queued together for matchmaking. Maps to protocol.CSODOTAParty README.md45 |
| Connection Status | EDOTAGCSessionNeed | The current state of the GC session requirement (e.g., UserInOnlineGame) protocol/dota_gcmessages_common.pb.go53-70 |
Sources: README.md13-81 client.go23-94 protocol/dota_gcmessages_common.pb.go53-70
The API Generator. A tool within the codebase that uses heuristics to match request IDs to response IDs and automatically generate Go methods for the Dota 2 API README.md22-24 README.md71-74 It uses a snapshot of message IDs to identify client and GC roles apigen/snapshot-messages.txt1-10
A core pattern used for request-response communication with the GC. It handles context-based timeouts, request ID tracking, and response unmarshaling README.md74-75
The raw packet structure received from go-steam. It contains the AppId, MsgType (from EDOTAGCMsg), and the raw Body client.go156-177
An enumeration of all possible message IDs recognized by the Dota 2 Game Coordinator protocol/dota_gcmessages_msgid.proto4-5 Examples include k_EMsgGCAbandonCurrentGame (7035) protocol/dota_gcmessages_msgid.proto15
The standard header included in GC messages, containing Steam IDs, session IDs, and job tracking information (job_id_source, job_id_target) protocol/steammessages.pb.go104-116
Sources: README.md22-75 client.go156-177 protocol/dota_gcmessages_msgid.proto4-15 protocol/steammessages.pb.go104-116 apigen/snapshot-messages.txt1-10
This diagram bridges the "Network Reception" logic to the internal Go handler entities.
Sources: client.go29-186
This diagram illustrates how raw GC messages are converted into Shared Object updates.
Sources: client.go35-156 README.md55
| Domain Concept | Implementation / Pointer | Description |
|---|---|---|
| Lobby Management | k_EMsgGCPracticeLobbyCreate | Message ID used to create a private lobby protocol/dota_gcmessages_msgid.proto17 |
| Match Metadata | protocol.CDOTAMatchMetadata | Complex structure containing teams, lobby IDs, and matchmaking stats protocol/dota_match_metadata.pb.go137-151 |
| Inventory Snapshot | InventorySnapshot | Captures player items, kills, and net worth at a specific game time protocol/dota_match_metadata.proto49-62 |
| Session Handshake | Dota2.handleClientWelcome | Processes the k_EMsgGCClientWelcome message to establish a GC session client.go86 |
| GC Session Needs | protocol.EDOTAGCSessionNeed | Enumeration of reasons a client might need a GC session (e.g., UserInUI) protocol/dota_gcmessages_common.pb.go53-70 |
| Tournament Events | protocol.DOTA_TournamentEvents | Enums for events like TE_FIRST_BLOOD or TE_COURIER_KILL protocol/dota_gcmessages_common.pb.go158-173 |
| Ping Handling | Dota2.handlePingRequest | Responds to GC heartbeats with CMsgGCClientPing client.go180-183 |
| State Tracking | state.Dota2State | Internal struct tracking connection status and session variables client.go59-62 |
Sources: client.go59-183 protocol/dota_match_metadata.pb.go137-151 protocol/dota_match_metadata.proto49-62 protocol/dota_gcmessages_msgid.proto17 protocol/dota_gcmessages_common.pb.go53-173
Refresh this wiki