"In the previous chapters, we have completed some of the core functionalities of the Zinx framework. Now, we are going to build a server-side application based on Zinx. To illustrate this, we will use a game application server as an example of Zinx's practical application."
The game scenario is an MMO (Massively Multiplayer Online) game with a Unity3D client. The server-side demo implements essential modules of an MMO game, including AOI (Area Of Interest) based broadcasting and global chat.
2.Server Application Basic Protocols
MsgID
Client
Server
描述
1
-
SyncPid
Synchronize the player's login ID (used for player ID).
2
Talk
-
World chat.
3
MovePackege
-
Movement.
200
-
BroadCast
Broadcast messages (Tp 1: world chat, 2: coordinates synchronization (spawn point sync), 3: action, 4: updated coordinates after movement).
201
-
SyncPid
Broadcast messages for disconnect/aoi disappearance.
202
-
SyncPlayers
Synchronize the position information of nearby players (including oneself).