Your SlideShare is downloading. ×
A Practical Architecture Design for MMO Casual Game
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

A Practical Architecture Design for MMO Casual Game

3,979
views

Published on

Published in: Technology

0 Comments
9 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,979
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
76
Comments
0
Likes
9
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Review lại flow
  • Transcript

    • 1. • Happy Me• Architecture Overview• Architecture Detail Object Management System Server-Client Data Synchronization Network Message Dispatching System
    • 2. • MMO casual game• Room-based active server• Web-based Unity3D client• Run on social platform
    • 3. • 3 system and framework developers• 4 game developers• 12 months of development
    • 4. InternetDatabase Client Game Servers
    • 5. Player Data Player DataGame Logic Player Data Server Side Client Side
    • 6. Object Network MessageManagement Dispatching System System Auto MAKESynchronization OUR LIFE EASIER Framework
    • 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. Database Database Model ModelController Network Controller(gameplay logic) Messages (graphic logic) 3D View View Models Server Side Client Side Unity3D
    • 9. Game Model Objects Object View Rooms Views GameController Modules Logic
    • 10. DatabaseNo-SQL SQL(Storage) (Ranking, Log) Game GameObjects ObjectsGame Network Graphic Modules ModulesLogic Messages LogicObject Object Rooms RoomsViews Views Server Side Client Side
    • 11. Object Views GameObjects Object Modules Rooms
    • 12. • A container of properties• Serialize to and deserialize from JSON• Hierarchy relationship (parent-child)
    • 13. Property Meta Data • Tags • Persistent • Client transfer Guid • TypeObject Property 1 • Long Property 2 • Name • “property 2” • Version • 568
    • 14. Object Manager DecoView PetView PlayerView Player Unit Pet ObjectViewMainGame GameObject DecoItem Authen Item UseItem Module ObjectHomeDeco ClothItem QuestSyncData Room DataObject Job Lobby Public Personal
    • 15. Pros• MVC design pattern practice• Fully customizable property system• Manage game world into one single systemCons• Challenge to manage huge number of objects
    • 16. ServerPlayer.Position = (10, 20) RoomPlayer.OnUpdatePosition(10, 20){ Client model.MoveTo(10, 20);}
    • 17. • Process messages• Update status from clients• Other duties… • Send or broadcast Message messages to clients Processor Other Schedulers Synchronization Scheduler • Synchronize data changes between server and clients ROOM
    • 18. Coffee Downtown Personal ROOMS Room Room Room Sync Other Sync TASK Other Sync Sync QUEUES Sync Other OtherWORKERS Thread Pool
    • 19. 1 second OtherOTHERS SCHEDULER TaskSYNCHRONIZATION Sync SCHEDULER Task 1/10 second Other Task Sync Task TASK QUEUE Other Task Sync Task WORKER Thread
    • 20. PositionSetProperty(Position, (1, 2)) Object Energy Gold Change SetSYNCHRONIZATION Sync SCHEDULER Task
    • 21. Pros• Automatic synchronization property changes• Optimal data transfer• Best use for active server gameCons• Overhead to determine what has changed since last sync.
    • 22. Login Synchronize Buy Item Chat RequestFriend - Username - Type - ItemType - Message - FriendGuid - Password - Properties - QuantityEncryption Network package Serializer (Thrift, Protobuf, Json, XML)
    • 23. Login Server- Username- Password OnLogin Message Send Handlers Serialize Login OnAuthen Authen Move Run OnMove Deserialize OnRun Login Client - Username - Password Receive
    • 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 encryptionCons• Unknown
    • 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