SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
A Virtual World Distributed Server
developed in Erlang as a Tool for analysing Needs
  of Massively Multiplayer Online Game Servers
               Erlang/OTP User Conference
            Stockholm on November 10, 2005




                                                 Michał Ślaski
                                 michal@erlang-consulting.com

                                      © 2005 Erlang Training and Consulting Ltd
Contents

•   Massively Multiplayer Online Games
•   Problems to solve
•   Prototyping
•   Using Erlang/OTP for the prototype
•   Client and server applications
•   Determining the maximum number of players
•   Architectures with single and double-function nodes
•   Synchronisation of the game’s state
•   Conclusions


                           Page 2      © 2005 Erlang Training and Consulting Ltd
Massively Multiplayer Online Games

                            • Significant increasing in number of active subscribers
                            • Fast growing online games market

                           9 000 000

                           8 000 000
Total active subscribers




                           7 000 000

                           6 000 000

                           5 000 000

                           4 000 000

                           3 000 000

                           2 000 000

                           1 000 000

                                  0
                                  1997 1998 1999 2000 2001 2002 2003 2004 2005


                                              Source: MMOGCHART.COM                  Source: IGDA, quot;2004 Persistent Worlds White Paperquot;



                                                                            Page 3              © 2005 Erlang Training and Consulting Ltd
Problems to solve

• Big amount of data to process

• Frequent synchronisation
   – acceptable delay 150 - 500 ms

• Adaptation to the connection quality

• Limited opportunity for full testing with thousands of
  players during early phase of development



                          Page 4         © 2005 Erlang Training and Consulting Ltd
Prototyping

• Experimenting with the functional
  and technical aspects

• Determining the scalability of the architecture

• Testing new solutions




                          Page 5       © 2005 Erlang Training and Consulting Ltd
Using Erlang/OTP for the prototype

• Open source
• Compatible with various platforms
• Concurrent oriented programming
    – one process for every connected player
•   Efficient internal communication
•   Supporting distributed applications
•   Distributed database Mnesia
•   Distributed load testing tool IDX-Tsunami




                               Page 6          © 2005 Erlang Training and Consulting Ltd
Client application

• Java + Java3D
• Actions:
   – moving
   – collecting objects
   – magic
   – chat
• Player’s state
  kept on the server




                          Page 7   © 2005 Erlang Training and Consulting Ltd
Server application
                                  • Server distributed on a
• The game terrain
                                    cluster of machines
  divided into zones
• Players placed within the
  same zone are processed
  on the same node




                              Page 8         © 2005 Erlang Training and Consulting Ltd
Determining the maximum number of users
                                             1 200
                                                                               Legend
                                                                         Collecting object transaction
                                             1 050
transaction time [msec]




                                                          900

                                                          750

                                                          600

                                                          450
                                                                                                                                                                        180
                                                          300
                                                                                                                                                                        160
                                                                     overload
                                                          150                                                                                                                     122 players
                                                                                                                                                                        140




                                                                                                                                                    number of players
                                                                                                                                      The server
                                                            0                                                                                                           120
                                                                0   20       40      60       80     100       120      140     160
                                                                                                                                      was
                                                                                  time of the test [s]                                                                  100
                                                                                                                                      overloaded                         80
                                                          800
                                                                                                                                      in the 60th
                                                                                             overload                                                                    60
                                                                                                                                      second of
                                                          700
                          network traffic [kbits / sec]




                                                                                                                                                                         40
                                                                                                                                      the test
                                                          600
                                                                                                                                                                         20
                                                          500                                                                                                             0
                                                                                                                                                                              0    20   40      60   80    100      120   140   160
                                                          400
                                                                                                                                                                                             time of the test [s]
                                                          300

                                                          200

                                                          100                                               Legend
                                                                                                         Outgoing network traffic
                                                            0
                                                                0   20       40       60      80     100       120     140     160
                                                                                  time of the test [s]


                                                                                                                                        Page 9                                    © 2005 Erlang Training and Consulting Ltd
Architectures with double-function nodes
                       900



                       800



                       700
   number of players




                       600



                       500



                       400



                       300



                       200

                                                                       Legend
                                               maximum number of players that c an be handled by the arc hitec ture
                       100
                             0    1      2       3        4        5        6        7         8        9        10
                                 number of nodes processing network traffic and player's actions



                                                              Page 10                        © 2005 Erlang Training and Consulting Ltd
Architectures with single-function nodes
                       700                                                                                      120




                       600                                                                                      100




                                                                                                                      CPU utilisation [%]
                       500                                                                                      80
   number of players




                       400                                                                                      60




                       300                                                                                      40




                       200                                                                                      20
                                                                                  Legend
                                                                   maximum number of players
                                                                   ac tion proc essing nodes' CPU utilisation
                                                                   network proc essing nodes' CPU utilisation
                       100                                                                                      0
                             0          1          2           3               4             5              6
                                 number of nodes processing player's actions (2 network nodes)


                                                            Page 11                       © 2005 Erlang Training and Consulting Ltd
Synchronising issue
        Client A                   Server                       Client B


            Try to pick up a mushroom



                                           Try to pick up a mushroom




                   Action status - OK

                                             mushroom collected
                                                by client A




                                             Action status - FAIL




                                        Page 12                 © 2005 Erlang Training and Consulting Ltd
Desynchronisation of the game’s state
                                                            0,1

• Server                                                                          Legend
                                                                         suc c essful ac tions
                                                            0,09




               number of transactions / number of players
                                                                         not suc c essful ac tions
  is not                                                                 y=0.04855 (suc c essful)
                                                                         y=0.0009119 (not suc c essful)
                                                            0,08
  overloaded
                                                            0,07


• More                                                      0,06

  successful                                                0,05
  actions
                                                            0,04


                                                            0,03


                                                            0,02


                                                            0,01


                                                              0
                                                                   0   100     200      300      400      500    600      700      800      900     1 000
                                                                                                time of the test [s]


                                                                                     Page 13                    © 2005 Erlang Training and Consulting Ltd
Desynchronisation of the game’s state
                                                            0,05

• Server is                                                                                                               Legend
                                                                                                                 suc c essful ac tions




               number of transactions / number of players
                                                            0,045
                                                                                                                 not suc c essful ac tions
  overloaded                                                                                                     y=0.04855 (suc c essful)
                                                                                                                 y=0.0009119 (not suc c essful)
                                                            0,04


                                                            0,035
• More
  actions                                                   0,03

  fail                                                      0,025


                                                            0,02


                                                            0,015


                                                            0,01


                                                            0,005


                                                               0
                                                                    0   100   200   300   400     500     600       700      800      900     1 000
                                                                                          time of the test [s]


                                                                                Page 14                 © 2005 Erlang Training and Consulting Ltd
Conclusions

• Erlang/OTP is appropriate for developing prototypes
  of the distributed MMOG systems

• Rapid development of the prototype allows
  examining different algorithms in a relatively short
  period of time

• Future work
   – algorithms not dependent on the player’s position



                          Page 15      © 2005 Erlang Training and Consulting Ltd
Contents

•   Massively Multiplayer Online Games
•   Problems to solve
•   Prototyping
•   Using Erlang/OTP for the prototype
•   Client and server applications
•   Determining the maximum number of players
•   Architectures with single and double-function nodes
•   Synchronisation of the game’s state
•   Conclusions


                           Page 16     © 2005 Erlang Training and Consulting Ltd

Más contenido relacionado

Destacado

The Multiplayer Classroom:
 Designing Coursework as a Game
The Multiplayer Classroom:
 Designing Coursework as a GameThe Multiplayer Classroom:
 Designing Coursework as a Game
The Multiplayer Classroom:
 Designing Coursework as a Game
gamifyforthewin
 
Game Server by Teguh
Game Server by TeguhGame Server by Teguh
Game Server by Teguh
Agate Studio
 

Destacado (19)

The Multiplayer Classroom:
 Designing Coursework as a Game
The Multiplayer Classroom:
 Designing Coursework as a GameThe Multiplayer Classroom:
 Designing Coursework as a Game
The Multiplayer Classroom:
 Designing Coursework as a Game
 
SRECon EU 2016: Riot Games Vs the Internet
SRECon EU 2016: Riot Games Vs the InternetSRECon EU 2016: Riot Games Vs the Internet
SRECon EU 2016: Riot Games Vs the Internet
 
Game Server by Teguh
Game Server by TeguhGame Server by Teguh
Game Server by Teguh
 
Make your-game-multiplayer
Make your-game-multiplayerMake your-game-multiplayer
Make your-game-multiplayer
 
Online mobile game server use Firebase realtime aatabase
Online mobile game server use Firebase realtime aatabaseOnline mobile game server use Firebase realtime aatabase
Online mobile game server use Firebase realtime aatabase
 
Cedec2013 photon network engine
Cedec2013 photon network engineCedec2013 photon network engine
Cedec2013 photon network engine
 
Supercell
SupercellSupercell
Supercell
 
Clash of Clans: Secrets of Success
Clash of Clans: Secrets of SuccessClash of Clans: Secrets of Success
Clash of Clans: Secrets of Success
 
Clash royale
Clash royaleClash royale
Clash royale
 
Online game server on Akka.NET (NDC2016)
Online game server on Akka.NET (NDC2016)Online game server on Akka.NET (NDC2016)
Online game server on Akka.NET (NDC2016)
 
Clash Royale vs Clash of Clans
Clash Royale vs Clash of ClansClash Royale vs Clash of Clans
Clash Royale vs Clash of Clans
 
Supercell Report
Supercell ReportSupercell Report
Supercell Report
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
 
3D Graphics & Rendering in Computer Graphics
3D Graphics & Rendering in Computer Graphics3D Graphics & Rendering in Computer Graphics
3D Graphics & Rendering in Computer Graphics
 
Riot Games Scalable Data Warehouse Lecture at UCSB / UCLA
Riot Games Scalable Data Warehouse Lecture at UCSB / UCLARiot Games Scalable Data Warehouse Lecture at UCSB / UCLA
Riot Games Scalable Data Warehouse Lecture at UCSB / UCLA
 
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
 
Server side game_development
Server side game_developmentServer side game_development
Server side game_development
 
[KGC 2012] Online Game Server Architecture Case Study Performance and Security
[KGC 2012] Online Game Server Architecture Case Study Performance and Security[KGC 2012] Online Game Server Architecture Case Study Performance and Security
[KGC 2012] Online Game Server Architecture Case Study Performance and Security
 
Lighting you up in Battlefield 3
Lighting you up in Battlefield 3Lighting you up in Battlefield 3
Lighting you up in Battlefield 3
 

Similar a A Virtual World Distributed Server Developed In Erlang As A Tool For Analysing Needs Of Massively Multiplayer Online Game Servers

Solaris 10 10 09 what's new customer presentation
Solaris 10 10 09 what's new customer presentationSolaris 10 10 09 what's new customer presentation
Solaris 10 10 09 what's new customer presentation
xKinAnx
 
Creating a cost-analysis of a distance education program
Creating a cost-analysis of a distance education programCreating a cost-analysis of a distance education program
Creating a cost-analysis of a distance education program
Sultan Qaboos university
 

Similar a A Virtual World Distributed Server Developed In Erlang As A Tool For Analysing Needs Of Massively Multiplayer Online Game Servers (7)

Novell ZENworks Configuration Management Database Management
Novell ZENworks Configuration Management Database ManagementNovell ZENworks Configuration Management Database Management
Novell ZENworks Configuration Management Database Management
 
Siyapath - A P2P, Gossip Based Volunteer Computing Framework
Siyapath - A P2P, Gossip Based Volunteer Computing FrameworkSiyapath - A P2P, Gossip Based Volunteer Computing Framework
Siyapath - A P2P, Gossip Based Volunteer Computing Framework
 
Extending Io Scalability
Extending Io ScalabilityExtending Io Scalability
Extending Io Scalability
 
COLO: COarse-grain LOck-stepping Virtual Machines for Non-stop Service
COLO: COarse-grain LOck-stepping Virtual Machines for Non-stop ServiceCOLO: COarse-grain LOck-stepping Virtual Machines for Non-stop Service
COLO: COarse-grain LOck-stepping Virtual Machines for Non-stop Service
 
CloudBridge and Repeater Specifications Sheet
CloudBridge and Repeater Specifications SheetCloudBridge and Repeater Specifications Sheet
CloudBridge and Repeater Specifications Sheet
 
Solaris 10 10 09 what's new customer presentation
Solaris 10 10 09 what's new customer presentationSolaris 10 10 09 what's new customer presentation
Solaris 10 10 09 what's new customer presentation
 
Creating a cost-analysis of a distance education program
Creating a cost-analysis of a distance education programCreating a cost-analysis of a distance education program
Creating a cost-analysis of a distance education program
 

Más de l xf

Asynchronous Io Programming
Asynchronous Io ProgrammingAsynchronous Io Programming
Asynchronous Io Programming
l xf
 
The Proactor Pattern
The Proactor PatternThe Proactor Pattern
The Proactor Pattern
l xf
 
Scalable Networking
Scalable NetworkingScalable Networking
Scalable Networking
l xf
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Win
l xf
 
Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Eve
l xf
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Software
l xf
 
The Migration From Erlang To Otp A Case Study Of A Heavy Duty Tcpip Clients...
The Migration From Erlang To Otp   A Case Study Of A Heavy Duty Tcpip Clients...The Migration From Erlang To Otp   A Case Study Of A Heavy Duty Tcpip Clients...
The Migration From Erlang To Otp A Case Study Of A Heavy Duty Tcpip Clients...
l xf
 
Messaging With Erlang And Jabber
Messaging With  Erlang And  JabberMessaging With  Erlang And  Jabber
Messaging With Erlang And Jabber
l xf
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systems
l xf
 
Concurrency And Erlang
Concurrency And ErlangConcurrency And Erlang
Concurrency And Erlang
l xf
 
Learning Erlang And Developing A Sip Server Stack With 30k Potential Users
Learning Erlang And Developing A Sip Server Stack With 30k Potential UsersLearning Erlang And Developing A Sip Server Stack With 30k Potential Users
Learning Erlang And Developing A Sip Server Stack With 30k Potential Users
l xf
 

Más de l xf (11)

Asynchronous Io Programming
Asynchronous Io ProgrammingAsynchronous Io Programming
Asynchronous Io Programming
 
The Proactor Pattern
The Proactor PatternThe Proactor Pattern
The Proactor Pattern
 
Scalable Networking
Scalable NetworkingScalable Networking
Scalable Networking
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Win
 
Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Eve
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Software
 
The Migration From Erlang To Otp A Case Study Of A Heavy Duty Tcpip Clients...
The Migration From Erlang To Otp   A Case Study Of A Heavy Duty Tcpip Clients...The Migration From Erlang To Otp   A Case Study Of A Heavy Duty Tcpip Clients...
The Migration From Erlang To Otp A Case Study Of A Heavy Duty Tcpip Clients...
 
Messaging With Erlang And Jabber
Messaging With  Erlang And  JabberMessaging With  Erlang And  Jabber
Messaging With Erlang And Jabber
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systems
 
Concurrency And Erlang
Concurrency And ErlangConcurrency And Erlang
Concurrency And Erlang
 
Learning Erlang And Developing A Sip Server Stack With 30k Potential Users
Learning Erlang And Developing A Sip Server Stack With 30k Potential UsersLearning Erlang And Developing A Sip Server Stack With 30k Potential Users
Learning Erlang And Developing A Sip Server Stack With 30k Potential Users
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

A Virtual World Distributed Server Developed In Erlang As A Tool For Analysing Needs Of Massively Multiplayer Online Game Servers

  • 1. A Virtual World Distributed Server developed in Erlang as a Tool for analysing Needs of Massively Multiplayer Online Game Servers Erlang/OTP User Conference Stockholm on November 10, 2005 Michał Ślaski michal@erlang-consulting.com © 2005 Erlang Training and Consulting Ltd
  • 2. Contents • Massively Multiplayer Online Games • Problems to solve • Prototyping • Using Erlang/OTP for the prototype • Client and server applications • Determining the maximum number of players • Architectures with single and double-function nodes • Synchronisation of the game’s state • Conclusions Page 2 © 2005 Erlang Training and Consulting Ltd
  • 3. Massively Multiplayer Online Games • Significant increasing in number of active subscribers • Fast growing online games market 9 000 000 8 000 000 Total active subscribers 7 000 000 6 000 000 5 000 000 4 000 000 3 000 000 2 000 000 1 000 000 0 1997 1998 1999 2000 2001 2002 2003 2004 2005 Source: MMOGCHART.COM Source: IGDA, quot;2004 Persistent Worlds White Paperquot; Page 3 © 2005 Erlang Training and Consulting Ltd
  • 4. Problems to solve • Big amount of data to process • Frequent synchronisation – acceptable delay 150 - 500 ms • Adaptation to the connection quality • Limited opportunity for full testing with thousands of players during early phase of development Page 4 © 2005 Erlang Training and Consulting Ltd
  • 5. Prototyping • Experimenting with the functional and technical aspects • Determining the scalability of the architecture • Testing new solutions Page 5 © 2005 Erlang Training and Consulting Ltd
  • 6. Using Erlang/OTP for the prototype • Open source • Compatible with various platforms • Concurrent oriented programming – one process for every connected player • Efficient internal communication • Supporting distributed applications • Distributed database Mnesia • Distributed load testing tool IDX-Tsunami Page 6 © 2005 Erlang Training and Consulting Ltd
  • 7. Client application • Java + Java3D • Actions: – moving – collecting objects – magic – chat • Player’s state kept on the server Page 7 © 2005 Erlang Training and Consulting Ltd
  • 8. Server application • Server distributed on a • The game terrain cluster of machines divided into zones • Players placed within the same zone are processed on the same node Page 8 © 2005 Erlang Training and Consulting Ltd
  • 9. Determining the maximum number of users 1 200 Legend Collecting object transaction 1 050 transaction time [msec] 900 750 600 450 180 300 160 overload 150 122 players 140 number of players The server 0 120 0 20 40 60 80 100 120 140 160 was time of the test [s] 100 overloaded 80 800 in the 60th overload 60 second of 700 network traffic [kbits / sec] 40 the test 600 20 500 0 0 20 40 60 80 100 120 140 160 400 time of the test [s] 300 200 100 Legend Outgoing network traffic 0 0 20 40 60 80 100 120 140 160 time of the test [s] Page 9 © 2005 Erlang Training and Consulting Ltd
  • 10. Architectures with double-function nodes 900 800 700 number of players 600 500 400 300 200 Legend maximum number of players that c an be handled by the arc hitec ture 100 0 1 2 3 4 5 6 7 8 9 10 number of nodes processing network traffic and player's actions Page 10 © 2005 Erlang Training and Consulting Ltd
  • 11. Architectures with single-function nodes 700 120 600 100 CPU utilisation [%] 500 80 number of players 400 60 300 40 200 20 Legend maximum number of players ac tion proc essing nodes' CPU utilisation network proc essing nodes' CPU utilisation 100 0 0 1 2 3 4 5 6 number of nodes processing player's actions (2 network nodes) Page 11 © 2005 Erlang Training and Consulting Ltd
  • 12. Synchronising issue Client A Server Client B Try to pick up a mushroom Try to pick up a mushroom Action status - OK mushroom collected by client A Action status - FAIL Page 12 © 2005 Erlang Training and Consulting Ltd
  • 13. Desynchronisation of the game’s state 0,1 • Server Legend suc c essful ac tions 0,09 number of transactions / number of players not suc c essful ac tions is not y=0.04855 (suc c essful) y=0.0009119 (not suc c essful) 0,08 overloaded 0,07 • More 0,06 successful 0,05 actions 0,04 0,03 0,02 0,01 0 0 100 200 300 400 500 600 700 800 900 1 000 time of the test [s] Page 13 © 2005 Erlang Training and Consulting Ltd
  • 14. Desynchronisation of the game’s state 0,05 • Server is Legend suc c essful ac tions number of transactions / number of players 0,045 not suc c essful ac tions overloaded y=0.04855 (suc c essful) y=0.0009119 (not suc c essful) 0,04 0,035 • More actions 0,03 fail 0,025 0,02 0,015 0,01 0,005 0 0 100 200 300 400 500 600 700 800 900 1 000 time of the test [s] Page 14 © 2005 Erlang Training and Consulting Ltd
  • 15. Conclusions • Erlang/OTP is appropriate for developing prototypes of the distributed MMOG systems • Rapid development of the prototype allows examining different algorithms in a relatively short period of time • Future work – algorithms not dependent on the player’s position Page 15 © 2005 Erlang Training and Consulting Ltd
  • 16. Contents • Massively Multiplayer Online Games • Problems to solve • Prototyping • Using Erlang/OTP for the prototype • Client and server applications • Determining the maximum number of players • Architectures with single and double-function nodes • Synchronisation of the game’s state • Conclusions Page 16 © 2005 Erlang Training and Consulting Ltd