an architecture for a massively multiplayer online role playing game engine

61
An Architecture for a Massively Multiplayer Online Role Playing Game Engine

Upload: adam-tyler

Post on 22-Dec-2015

223 views

Category:

Documents


1 download

TRANSCRIPT

An Architecturefor a

Massively Multiplayer OnlineRole 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

Network Traffic ? ?

Game Scale X Security X Game Clock X Business Model X

Concern Peer to Peer Client/Server

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 1Encapsulates similar tasks

Layer 2

Layer 3Layer 1? What's That?

Publisher-Subscriber Pattern

The Publisher-Subscriber pattern helpskeep the state of cooperating componentssynchronized. To achieve this it enables oneway propagation of changes: one publishernotifies any number of subscribers aboutchanges 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

B C

A knows about B.B knows about A.Neither know anything about C. C knows nothing

about either A or B.

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

View

Model

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

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Governor

Server Architecture

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

World Component

User Component

Server Architecture

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

Server Architecture

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

Server Architecture

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

Server Architecture

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

Server Architecture

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

Publisher-Subscriber Pattern

A

B C

A knows about B.B knows about A.Neither know anything about C. C knows nothing

about either A or B.

Server Architecture

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

Server Architecture

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

Layered ArchitectureClient

Application

Messenger

En/Decrypt

Network

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 DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

Server-side Performance

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client-side Performance

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Client-side Performance

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

The Six Problems

• Client side performance

• Network traffic

• Scalability

• Load balancing

• Secure game play

• Maintainability

Network Traffic

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

The Six Problems

• Client side performance

• Network traffic

• Scalability

• Load balancing

• Secure game play

• Maintainability

Scalability and Load Balancing

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

Governor

Scalability and Load Balancing

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

World Component

User Component

The Six Problems

• Client side performance

• Network traffic

• Scalability

• Load balancing

• Secure game play

• Maintainability

Secure Gameplay

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component

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

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

© 2002 Blizzard Software Worlds of Warcraft

Example : Dark Age of Camelot

© 2002 Mythic Entertainment

Example: Worlds of Warcraft

© 2002 Blizzard Software

Client Architecture

Client Architecture

Input

Graphics View

AI Library

Messenger NetworkDe/EncryptMayorGraphics Component

Command

Chat

Physics Collision Detection

Command Component

Network Component

Server Architecture

World DB

WorldNetwork Component

MessengerNetwork De/Encrypt

Authentication

User DB

Groups

AI Controller

Governor

World Component

User Component