An Architecture for a Massively Multiplayer Online Role





























































- Slides: 61
An Architecture for a Massively Multiplayer Online Role Playing Game Engine
Why Study Games? • Draws on all parts of Computer Science - Algorithmic Analysis - Software Engineering - Graphics - Database Design - Artificial Intelligence - Networking - Security - Modeling - Human Computer Interaction • Demanding application • Lessons learned apply to real world productive applications
Architecture vs. Implementation • Starting at design level yields better implementation • Good software practice
The Outline • MMORPG’s • Architecture – Paradigms – Patterns • Our Architecture (The Dirty Details) • Problems and Solutions
MMORPG • Massively Multiplayer Online Role Playing Game: Hundreds or more players connected via the Internet where each player takes on a role and improves his or her character
MMORPG (Cont. ) • • Massively Multiplayer - Scalable Online - Networked Role Play - Feature rich application Game - Entertaining and immersive
Architecture? • Architecture (n): the manner in which the components of a computer or computer system are organized and integrated © 2002 Merriam-Webster Online
Paradigms Concern Network Traffic Game Scale Security Game Clock Business Model Peer to Peer Client/Server ? X X ? Ö Ö
Layered Pattern The Layers pattern helps to structure applications that can be decomposed into groups of subtasks in which each group of subtasks is at a particular level of abstraction. Pattern-Oriented Software Architecture - A System of Patterns Buschmann et all; John Wiley and Sons Ltd, Chichester, UK, 1996.
Layered Architecture Example Layer 1 Encapsulates similar tasks Layer 2 Layer 3 Layer 1? What's That?
Publisher-Subscriber Pattern The Publisher-Subscriber pattern helps keep the state of cooperating components synchronized. To achieve this it enables one way propagation of changes: one publisher notifies any number of subscribers about changes to its state. Pattern-Oriented Software Architecture - A System of Patterns Buschmann et all; John Wiley and Sons Ltd, Chichester, UK, 1996.
Publisher-Subscriber Pattern A knows about B. B knows about A. Neither know anything about C. C knows nothing about either A or B. A B C
Model-View-Controller Pattern The Model-View-Controller pattern (MVC) divides an interactive application into three components. The model contains the core functionality and data. Views display information to the user. Controllers handle user input. Views and controllers together comprise the user interface. A change-propagation mechanism ensures consistency between the user interface and the model. Pattern-Oriented Software Architecture - A System of Patterns Buschmann et all; John Wiley and Sons Ltd, Chichester, UK, 1996.
Model View Controller
Blackboard Pattern The Blackboard pattern is useful for problems for which no deterministic solution strategies are known. In Blackboard several specialized subsystems assemble their knowledge to build a possibly partial or approximate solution. Pattern-Oriented Software Architecture - A System of Patterns Buschmann et all; John Wiley and Sons Ltd, Chichester, UK, 1996.
Broker Pattern The Broker pattern can be used to structure distributed software systems with decoupled components that interact by remote service invocations. A broker component is responsible for coordinating communication, such as forwarding requests, as well as for transmitting results and exceptions. Pattern-Oriented Software Architecture - A System of Patterns Buschmann et all; John Wiley and Sons Ltd, Chichester, UK, 1996.
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger De/Encrypt Collision Detection Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Server Architecture World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Server Architecture World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Server Architecture World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Server Architecture World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Server Architecture World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Server Architecture World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Publisher-Subscriber Pattern A knows about B. B knows about A. Neither know anything about C. C knows nothing about either A or B. A B C
Server Architecture World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Server Architecture World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Layered Architecture Client Application Server Application Messenger En/Decrypt Network
The Six Problems • • • Client side performance Network traffic Scalability Load balancing Secure game play Maintainability
Server-side Performance World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Server-side Performance AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client-side Performance AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Client-side Performance AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
The Six Problems • • • Client side performance Network traffic Scalability Load balancing Secure game play Maintainability
Network Traffic AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
The Six Problems • • • Client side performance Network traffic Scalability Load balancing Secure game play Maintainability
Scalability and Load Balancing World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
Scalability and Load Balancing World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
The Six Problems • • • Client side performance Network traffic Scalability Load balancing Secure game play Maintainability
Secure Gameplay World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB
6. Maintainability • Modularized • Layered • Well-known Architectural Patterns Used
6. Maintainability • Modularized • Layered • Well-known Architectural Patterns Used
6. Maintainability • Modularized • Layered • Well-known Architectural Patterns Used
© 2002 Sony Online Entertainment
Six Problems Addressed • • • Client Side Performance Minimizing Network Traffic Scalable Opportunities for Load Balancing Security Maintainability Ö Ö Ö
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Worlds of Warcraft © 2002 Blizzard Software
Example : Dark Age of Camelot © 2002 Mythic Entertainment
Example: Worlds of Warcraft © 2002 Blizzard Software
Client Architecture
Client Architecture AI Input Graphics Library Network Component View Mayor Graphics Component Command Component Chat Physics Messenger Collision Detection De/Encrypt Network
Server Architecture World Component Network De/Encrypt World DB World Messenger Groups Governor AI Controller Authentication User Component User DB