16
Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the four entities, interaction flow and quests will all be described and then demonstrated.

Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Embed Size (px)

Citation preview

Page 1: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Deceit System

This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the four entities, interaction flow and quests will all be described and then demonstrated.

Page 2: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Distributed Setup

Definitions:Client – A user of the game running a program

utilizing the ClientApp.Central Server – a server for initial connection

management and load-balancing.Interaction Server – Servers running the Deceit

Engine. The bulk of the work occurs here.Storage – anything capable of providing the

requirements of IStorageAdapter.

Page 3: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Distributed Setup

1. Central Server is started.2. Interaction servers are brought online and make

the Central Server aware of their existence.3. Clients ask the Central Server for an Interaction

Server to connect to.4. Clients contact to the specified Interaction

Server and form a persistent connection.5. Interaction Servers perform engine logic and

access storage when necessary.

Page 4: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

STORAGE

InteractionServer

CentralServer

Client

Client

Client

Client

Client

Client

InteractionServer

InteractionServer

Network

Page 5: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

The Four Entities

Our system has four key entities, of which you should be familiar when working with it:

- GameItems - An item, object, thing, etc.- Attribute – A property of a GameItem.- Interaction – A verb, something that occurs, a host

in the visitor pattern.- Permissions – Boolean-evaluate-able entities which

accept or deny an Interaction from occurring and also have the power to send new Interactions.

Page 6: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

The Four Entities

The important thing to note here, and that which makes the Deceit Engine truly unique among all other systems is the fully-dynamic nature of these entities. They are all capable of being dynamically altered, or even created and added to the system at run-time. The world could begin with no items in it, they can be added with no attributes, interactions or permissions. No interactions or permissions need be written or compiled with the system. All of them may be dynamically added along with any attributes to the items you just created in the blank world.

Page 7: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

The Four Entities: Permissions

In order to create a robust system of Permissions, they have been divided up into two types:

General Permissions apply to Interactions as a whole. The “Pick Up” Interaction being performed on any item at all necessarily requires some things, such as being in close proximity to the target. These Permissions are then applied to all uses of the Pick Up Interaction.

Specific Permissions deal with the ability of the item which is the target or destination of the Interaction. It may require more strength to Pick Up an Apple than to Pick Up a Car. Utilizing the Visitor Pattern, we allow each GameItem to provide these Specific Permissions.

Page 8: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Something You Are:Game Item & Attributes

Something You Can Do:Interaction & Permission

Giacomo• Hair Color: Brown• Eye Color: Blue• Height: 5’8”• Mouth: 2”• Age: 20• Money: ¥50,000

Strawberry: Eat

Permission:Mouth Size > 1”

Car: Eat

Permission:Mouth Size > 120”

Page 9: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Interactions: From Click to Client

1. An action occurs in the real world, such as a mouse-click.

2. The Client’s Application Layer catches this as and interprets it as an Interaction, selecting an InteractionIdentifier to send across the Network.

3. The Client Networking module knows how to communicate with an Interaction Server’s Networking module.

Page 10: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Interactions: From Client to Server

4. The Server Networking module is sent the InteractionIdentifier.

5. This is caught and passed to the Game Engine, whose operations will be the subject of further discussion.

6. If the Game Engine needs to access data in Storage, it sends a request to the Storage Adapter, which knows how to communicate to whichever particular storage you use.

Page 11: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Interactions: From Storage and Back

7. Storage responds with any requests through the Storage Adapter. Game Logic proceeds.

8. In the case of an Interaction that sends updates or information back to the Client, the process works mostly in reverse back to the Client Application Layer.

9. Finally, any changes in the game world are displayed to the user.

Page 12: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Network

STORAGE

ApplicationLayer

ClientNetworking

Game Engine

ServerNetworking

Client

Interaction Server

Storage AdapterClick

Page 13: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Interactions: Inside the Engine

1. An InteractionIdentifier arrives at the starting point in the Game Engine: The Interaction Dispatcher.

2. The Dispatcher asks Storage for the General Permission associated with that InteractionIdentifier.

3. The General Permission is evaluated, and in the case where it allows the Interaction to occur, the Interaction is not yet executed.

4. Instead, it is sent to the GameItem which, using the Visitor Pattern, provides an executable Interaction and associated Specific Permission from Storage.

5. If the Specific Permission allows, the Interaction occurs.

Page 14: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

STORAGE

GeneralPermission

SpecificPermissionInteraction

Interaction Dispatcher

Game Item

Interaction Identifier

Page 15: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

Quests

Quests in Deceit arise naturally from situations produced by Interactions and Permissions being dynamically added to items, modifier and/or removed as the scenario progresses.

Because of these, there is no Quest data structure, but instead a Quest Installer that adds the necessary Permissions and Interactions to the system and then installs specific instances of them to the necessary items.

Page 16: Deceit System This overview is meant to provide a coherent understanding of the Deceit System and Engine. The distribution of clients and servers, the

……

Game Item 1

Inte

racti

on 1

QuestInstaller

Perm

issi

on

Inte

racti

on 2

Perm

issi

on

Perm

issi

on

Game Item 2

Inte

racti

on 1

Inte

racti

on 2

Perm

issi

on

Inte

racti

on n

Perm

issi

on

Inte

racti

on 3

Perm

issi

on

Perm

issi

on

Inte

racti

on n