Your SlideShare is downloading. ×
0
• Happy Me
• Architecture Overview
• Architecture Detail
Object Management System
Server-Client Data Synchronization
Ne...
• MMO casual game
• Room-based active server
• Web-based Unity3D client
• Run on social platform
• 3 system and framework developers
• 4 game developers
• 12 months of development
Database
Game Servers
Client
Internet
Server Side Client Side
Game Logic
Player
Data
Player
Data
Player
Data
Object
Management
System
Network Message
Dispatching
System
Auto
Synchronization
Framework
MAKE OUR LIFE EASIER
• Object management system
 MVC design pattern
 Dynamic data
• Auto synchronization framework
 Truly automatic («Set» a...
Model
View
Controller
(gameplay logic)
Database
Network
Messages
View
Controller
(graphic logic)
Server Side Client Side U...
Model
View
Controller
Game
Objects
Object
Views
Game
Logic
Modules
Rooms
Game
Objects
Object
Views
Game
Logic
No-SQL
(Storage)
Network
Messages
Object
Views
Graphic
Logic
Server Side Client Side
...
Object
Rooms
Object
Views
Modules
Game
Objects
• A container of properties
• Serialize to and deserialize from JSON
• Hierarchy relationship (parent-child)
Object
Guid
Property 1
Property 2
Property Meta Data
• Tags
• Persistent
• Client transfer
• Type
• Long
• Name
• “propert...
Object
Unit
GameObject
DataObject
Player
DecoItem
Pet
UseItem
ClothItem
Item
Quest
Job
PlayerViewDecoView PetView
ObjectVi...
Pros
• MVC design pattern practice
• Fully customizable property system
• Manage game world into one single
system
Cons
• ...
Server
RoomPlayer.Position = (10, 20)
Player.OnUpdatePosition(10, 20)
{
model.MoveTo(10, 20);
}
Client
Synchronization
Scheduler
Other
Schedulers
Message
Processor
ROOM
• Process messages
from clients
• Send or broadcast
mess...
Personal
Room
Coffee
Room
Downtown
Room
Sync
Other
Sync
Thread Pool
Other
Sync
Other
Sync
Sync
Other
ROOMS
TASK
QUEUES
WOR...
Thread
1 second
SYNCHRONIZATION
SCHEDULER
OTHERS SCHEDULER
1/10 second
Other Task
Sync Task
Sync Task
Other Task
Sync
Task...
Object
Position
Energy
Gold
Change Set
SYNCHRONIZATION
SCHEDULER
SetProperty(Position, (1, 2))
Sync
Task
Pros
• Automatic synchronization property changes
• Optimal data transfer
• Best use for active server game
Cons
• Overhea...
Login
- Username
- Password
Synchronize
- Type
- Properties
Buy Item
- ItemType
- Quantity
Chat
- Message
RequestFriend
- ...
Server
Send
Client
Receive
Serialize
Deserialize
Login
- Username
- Password
Login
- Username
- Password
OnAuthen
OnMove
O...
Pros
• Meaningful message by define custom
structure
• Familiar usage as common GUI system
(MFC, WinForm)
• Share message ...
• Seamless MVC framework across server
and client
• Address the most common difficulty in
design active server : the synch...
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
A practical architecture design for mmo casual game
Upcoming SlideShare
Loading in...5
×

A practical architecture design for mmo casual game

333

Published on

1 Comment
1 Like
Statistics
Notes
  • thanks for you share~ how to implementation it ?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
333
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide
  • Review lại flow
  • Transcript of "A practical architecture design for mmo casual game"

    1. 1. • Happy Me • Architecture Overview • Architecture Detail Object Management System Server-Client Data Synchronization Network Message Dispatching System
    2. 2. • MMO casual game • Room-based active server • Web-based Unity3D client • Run on social platform
    3. 3. • 3 system and framework developers • 4 game developers • 12 months of development
    4. 4. Database Game Servers Client Internet
    5. 5. Server Side Client Side Game Logic Player Data Player Data Player Data
    6. 6. Object Management System Network Message Dispatching System Auto Synchronization Framework MAKE OUR LIFE EASIER
    7. 7. • Object management system  MVC design pattern  Dynamic data • Auto synchronization framework  Truly automatic («Set» and forget style)  Synchronize the delta difference only • Network message dispatching system  Custom structure message  Easy to register messages and invoke handlers
    8. 8. Model View Controller (gameplay logic) Database Network Messages View Controller (graphic logic) Server Side Client Side Unity3D 3D Models Database Model
    9. 9. Model View Controller Game Objects Object Views Game Logic Modules Rooms
    10. 10. Game Objects Object Views Game Logic No-SQL (Storage) Network Messages Object Views Graphic Logic Server Side Client Side SQL (Ranking, Log) Database Game Objects Modules Modules Rooms Rooms
    11. 11. Object Rooms Object Views Modules Game Objects
    12. 12. • A container of properties • Serialize to and deserialize from JSON • Hierarchy relationship (parent-child)
    13. 13. Object Guid Property 1 Property 2 Property Meta Data • Tags • Persistent • Client transfer • Type • Long • Name • “property 2” • Version • 568
    14. 14. Object Unit GameObject DataObject Player DecoItem Pet UseItem ClothItem Item Quest Job PlayerViewDecoView PetView ObjectView Module MainGame Authen HomeDeco SyncData Room Lobby Public Personal Object Manager
    15. 15. Pros • MVC design pattern practice • Fully customizable property system • Manage game world into one single system Cons • Challenge to manage huge number of objects
    16. 16. Server RoomPlayer.Position = (10, 20) Player.OnUpdatePosition(10, 20) { model.MoveTo(10, 20); } Client
    17. 17. Synchronization Scheduler Other Schedulers Message Processor ROOM • Process messages from clients • Send or broadcast messages to clients • Synchronize data changes between server and clients • Update status • Other duties…
    18. 18. Personal Room Coffee Room Downtown Room Sync Other Sync Thread Pool Other Sync Other Sync Sync Other ROOMS TASK QUEUES WORKERS
    19. 19. Thread 1 second SYNCHRONIZATION SCHEDULER OTHERS SCHEDULER 1/10 second Other Task Sync Task Sync Task Other Task Sync Task Other Task TASK QUEUE WORKER
    20. 20. Object Position Energy Gold Change Set SYNCHRONIZATION SCHEDULER SetProperty(Position, (1, 2)) Sync Task
    21. 21. Pros • Automatic synchronization property changes • Optimal data transfer • Best use for active server game Cons • Overhead to determine what has changed since last sync.
    22. 22. Login - Username - Password Synchronize - Type - Properties Buy Item - ItemType - Quantity Chat - Message RequestFriend - FriendGuid Serializer (Thrift, Protobuf, Json, XML) Network package Encryption
    23. 23. Server Send Client Receive Serialize Deserialize Login - Username - Password Login - Username - Password OnAuthen OnMove OnRun Login Authen Move Run Message Handlers OnLogin
    24. 24. 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
    25. 25. • Seamless MVC framework across server and client • Address the most common difficulty in design active server : the synchronization • Base framework environment for adapting any gameplay
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×