Docstoc

PowerPoint Presentation - Computer Graphics and Geometric Modeling

Document Sample
PowerPoint Presentation - Computer Graphics and Geometric Modeling Powered By Docstoc
					MMORPG Servers



                 1
MMORPGs Features
 n   Avatar
 n   Levels
 n   RPG Elements
 n   Mission
 n   Chatting
 n   Society & Community
 n   Friends
 n   Combat
 n   NPCs / Monsters
 n   Experience Points
 n   Extended Game Contents
 n   Online Customer Services (GM)
                                     2
MMORPGs Technical Elements
 n   Client-server Architecture
 n   Servers
 n   Network Bandwidth
 n   Network Data Packet
 n   Network Security
 n   Graphics
 n   Database




                                  3
MMORPG Servers
 n   Stand Alone Servers
 n   Distributed System




                           4
Standalone Server
 n   Using a Set of Large Servers as the Game
     Servers
 n   Each Server Plays as a Single Function


                                    internet


                     Login server




         Database     Game play     Community


                                                5
Distributed System - Concept
 n   Distributed PC Clusters




                         servers             internet

 Database servers




                              servers

                                        Login servers
     Game play servers

                                                        6
Distributed PC Clusters
 n   1-U Web Server Based on PC Architecture
 n   Two CPUs
 n   Two Network IPs




                     Net IP 1   Net IP 2
        Internal LAN                     Internet
                         1U server




                                                    7
Distributed System - Features
 n   Distributed PC Clusters
     – Two IPs
 n   Scalability
 n   Fault Tolerance
 n   Load Balance
 n   Dynamic Zoning
 n   “Blade Servers”




                                8
Distributed System - Scalability
 n   Regional Operation Consideration
 n   Cost Effective
 n   Flexible Capacity




                         Serve concurrent 500 users




                         Serve concurrent 1000 users

                                                       9
Distributed System – Fault Tolerance
 n   All Servers Can Not Be Down in Anytime
 n   For Distributed Servers, Every Job Must Be
     Transferred Between Servers
 n   For Standalone Server, Use Redundant Policy




                                            10
                   Master server
                             !
Internal LAN



               !




                                    Internet
                   Slave server A



                   Slave server B




                                               11
                 Master server


Internal LAN



               X Slave server A




                                  Internet
                 Slave server B




                                             12
Redundant Policy

                                  !
           Server on duty



                                  Z
       !                     ZZ
           Server off duty




                                      13
Redundant policy

                             X
           Server off duty




           Server on duty




                                 14
               Master servers




Internal LAN




                                Internet
               Slave server A



               Slave server B




                   .
                   .


                                           15
Distributed System – Load Balance
 n   Distributed MMOGs Always Do the Load
     Balance by In-house Approach
 n   Load ?
     – CPU bound
     – Memory bound
     – Network bandwidth

 1 server = 500 concurrent players

 10 servers = 5000 concurrent players
            X

        ! It’s very important to move the jobs
          on a crowded server to another ones
                                                 16
                        Master server


         Internal LAN




                                         Internet
                        Slave server A



                        Slave server B




Load balance – case 1                               17
                            Master server
                                      !
         Internal LAN



                        !




                                             Internet
                            Slave server A



                            Slave server B




Load balance case 2                                     18
                        Master server


         Internal LAN




                                         Internet
                        Slave server A



                        Slave server B




Load balance case 2                                 19
Zone Concept
 n   A “Zone” is Logically a Region of Game
     Happening on Servers
 n   We Always Map the “Zone” to a Physical 3D
     Scene
 n   A Zone is Not Really a Physical Hardware
     Server
 n   But a Software Region that the Players
     Communicating Directly (in the same
     memory block)




                                            20
               Master server


Internal LAN




                                Internet
               Slave server A



               Slave server B




                                           21
Server A


         Zone X




   combating
                                                    Server C
               NPC            messaging
                                           Zone Z



                           messaging


                  Zone Y


                     transaction

                                       Server B
                                                     22
Interaction within/between Zones (Game Play)
 n   Within Zone
     – Combating
     – Chatting
     – Transaction
 n   Between Zones
     – Messaging
     – Transaction (remote)
     – Banking




                                          23
           Server A                                Zone Z


                   Zone X




                                                       Server C
                        NPC

                                          Zone Z




                              Zone Y




If server B is over-loaded,            Server B
move the “Zone Y” or “Zone                              24
Z” to an available server C
Load Balance Using Zone Moving
 n   Under the Concept of “Zone Moving”, We
     Can Move the Zones Between Hardware
     Server to Achieve the Load Balance
 n   But is This a Total Solution to Solve the Load
     Balance ?
 n   Condition :                  If server A is over-loaded,
                                       the whole server is over-loaded
     Zone X                            due that server A is occupied only
                                       one zone.
                          Server A
                                       Thinking :
     Zone Y
                           Server B      “Can we divide the zone into
                                          two or more ? “
     Zone Z
                           Server C


                                                                25
Dynamic Zoning
 n   Dynamically Adjust the Zones to Meet the
     Loading Requirement
 n   Moving Zones between Hardware
 n   Divide the Zone into Small Ones According to
     the Load and Move the Small Ones to
     Different Hardware




                                             26
My Suggestion about Dynamic Zoning (1)

 n   A “Zone” is Mapping to a Physical Scene or
     Map (geometry)
 n   A Zone is Composed by Several Groups
 n   A “Group” is a Collection of Players
     (Population)
 n   All Players in the Same Group Running in
     One Same Process
 n   Players in Different Group Communicate
     between Processes
     – Inter-process communication (IPC) ?



                                              27
My Suggestion about Dynamic Zoning (2)
 n   Group is More Dynamically Due to Based on
     the Concept of Population
     – Create
     – Delete
     – Move




                                            28
Zone = A 3D Scene
 n   A 3D Scene
     – 3D models
     – Moving objects
     – NPCs
     –…
 n   Zones are Physically Neighboring Together
 n   Using Portals to Connect the Relationship
 n   Player Travels between Zones
     – Logout current scene and login to another
       neighboring zone when stepping on the zone
       portal
     – Player in client will feel a little hanging during the
       moving

                                                         29
Zone Portals




                            Portal

                   Portal            Zone Y




               Zone X
                                         30
Zone Portals




                            Portal

                   Portal            Zone Y




               Zone X
                                         31
Population Group
 n   A Data Structure to Contain the Players
 n   When a Player Logins into one Zone, He
     Should Be Assigned into One Available
     Population Group and Got the ID
 n   Players Should Not Be Moved Between
     Population Groups When He Is Staying in
     this Zone
 n   A Zone Can Be Divided into Several Groups
 n   Group can be Created/Deleted/Moved by the
     Servers for Load Balance


                                           32
Players in a Zone


                      P5G1

            P1G1              P6G3
               P2G2

                                            P7G2


                      P12G2
                                     P5G3


           Zone X




                                                   33
                                                           Server A
                                Zone X




                                         Group 2 Group 1

When a new player
logins into Zone X, insert
the player into group 2 which
has space for new comer
                                                           Server B




                                                                      34
                                                                Server A
                                Zone X




                                    Group 3   Group 2 Group 1


But if there are no
groups with available space,
create a new group for new comers
                                                                Server B




                                                                           35
                                                              Server A
                                   Zone X




                 Group 6 Group 5 Group 4 Group 3 Group 2 Group 1




If the Zone X on Server A is full for new comer,
duplicate Zone X on Server B and
create a new group
for new players                                                Server B
                                    Zone X (2)




                                                                          36
                                                Group 7
                                                      Server A
                           Zone X




         Group 6 Group 5 Group 4 Group 3 Group 2 Group 1




Network communication

                                                       Server B
                            Zone X (2)


                                   IPC


                                                                  37
                         Group 8         Group 7
The Challenge of Dynamic Zoning
 n   Physical Terrain and Models Are not Easy to
     Divide Dynamically
     – If your zones are coupling with the physical scenes,
       to divide the geometric data in runtime needs some
       specific algorithms for 3D scenes
     – From my suggestion, don’t do it
     – Find a mechanism that makes the zone dividable
     – And that is the “Population Group”
 n   One Server Can Have Multiple Zones Running
 n   One Zone Can Run on Several Servers
     – Hard to code
     – Duplicated memory on servers
     – Synchronization between servers
     – Data communication overhead
                                                     38
The Challenge of Dynamic Zoning (2)
 n     Game Play Sensitive
 n     Running Players in the Same Zone by
       Multiple Processes
         – Duplicated memory on the same server
         – Synchronization between processes
         – Data communication between processes
 n     Players’ Attribute Data Should Be Classified
       as :
         – Frequently used between players
                  » Must be duplicated between processes
         – Seldom used between players
                  » Send between players when necessary
         – Locally used by player himself
 n     Cross-platform Server API Design*
                                                           39

* Hand drawing on white board

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:13
posted:7/2/2013
language:English
pages:39