Beruflich Dokumente
Kultur Dokumente
Architecture Overview
Architecture Detail
Object Management System
Server-Client Data Synchronization
Network Message Dispatching System
Internet
Database
Client
Game Servers
Player
Data
Player
Data
Game Logic
Player
Data
Server Side
Client Side
MODEL
VIEW
CONTRO
-LLER
Network Message
Dispatching
System
Object
Management
System
Auto
MAKESynchronization
OUR LIFE EASIER
Framework
Database
Database
Model
Controller
(gameplay logic)
View
Server Side
Model
Network
Messages
Controller
(graphic logic)
View
Client Side
3D
Models
Unity3D
Model
Game
Objects
View
Object
Views
Rooms
Controller
Game
Logic
Modules
Database
No-SQL
(Storage)
SQL
(Ranking, Log)
Game
Objects
Game
Objects
Game
Logic
Modules
Object
Views
Rooms
Server Side
Network
Messages
Modules
Graphic
Logic
Rooms
Object
Views
Client Side
Object
Views
Game
Objects
Object
Rooms
Modules
A container of properties
Serialize to and deserialize from JSON
Hierarchy relationship (parent-child)
Guid
Object
Property 1
Property 2
Tags
Persistent
Client transfer
Type
Long
Name
property 2
Version
568
Object
Manager
DecoView
PetView
Player
PlayerView
Unit
Pet
ObjectView
GameObject
MainGame
Authen
Item
Module
Object
UseItem
ClothItem
HomeDeco
Quest
Room
SyncData
DecoItem
DataObject
Lobby
Public
Personal
Job
Pros
MVC design pattern practice
Fully customizable property system
Manage game world into one single
system
Cons
Challenge to manage huge number of
objects
Player.OnUpdatePosition(10, 20)
{
model.MoveTo(10, 20);
}
Server
Room
Client
Process messages
from clients
Send or broadcast
messages to clients
Update status
Other duties
Message
Processor
Other
Schedulers
Synchronization
Scheduler
ROOM
Synchronize data
changes between
server and clients
ROOMS
Coffee
Room
Downtown
Room
Personal
Room
TASK
QUEUES
Sync
Other
Sync
Other
Sync
Other
Sync
Sync
Other
WORKERS
Thread Pool
1 second
Other
Task
OTHERS SCHEDULER
Sync
Task
SYNCHRONIZATION
SCHEDULER
1/10 second
Other Task
TASK QUEUE
Sync Task
Other Task
Sync Task
WORKER
Thread
Position
Object
Energy
Gold
Change Set
SYNCHRONIZATION
SCHEDULER
Sync
Task
Pros
Automatic synchronization property changes
Optimal data transfer
Best use for active server game
Cons
Overhead to determine what has changed
since last sync.
Login
- Username
- Password
Synchronize
- Type
- Properties
Buy Item
- ItemType
- Quantity
Chat
- Message
RequestFriend
- FriendGuid
Encryption
Serializer
(Thrift, Protobuf, Json, XML)
Network package
Server
Login
- Username
- Password
Message
Handlers
Send
Serialize
Login
Authen
Move
Run
OnLogin
OnAuthen
OnMove
Deserialize
OnRun
Client
Login
- Username
- Password
Receive
Pros
Meaningful message by define custom
structure
Familiar usage as common GUI system
(MFC, WinForm)
Share message definition between server
and client
Easy to apply encryption
Cons
Unknown