

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Clement Pang 23 March 2005
Overview
This document specifies the general architecture of the SkyNet Model that will be XML-based. In specific, how entities exist and interact and how data is stored will be explained and illustrated in detail.
Introduction
The current SkyNet Model consists of a hierarchical system where the world consists solely of entities. Each entity has a collection of attributes, a collection of behaviors, a collection of points (represented by an IArea) that describe its “physical” location and a collection of ProxyEntities that may play a part in certain behaviors. Entities may be parents to other entities (e.g. A tank may have a machine gun and a turret as its child entity).
Behaviors are executed primarily by using the attributes (or any other criteria that the behavior deems necessary) and computing a GameEvent to be broadcasted to the network.
The Idea of an XML-based model
Based on the above description, the whole SkyNet Model can be serialized into an XML file with a schema that is implemented right now as a compatible to an ADO.NET DataSet. The diagram of the tables is shown below:
(The diamonds represent the relationship; all are one-to-many relationship)
Using the tools provided by Visual Studio.NET, the XML Schema can be generated into classes that reflect the data (i.e. there will be a class called SkyNetModel which inherits a DataSet and can accept an XML file with the valid schema and data to be serialized into it).
The keys in the DataSet provide methods in which other objects can use to interact with the model. For example, a behavior can get all the attributes of an entity by calling SkyNetModel.Entities.FindByEntityGuid(some guid).GetAttributesTable().
The relationships in the DataSet provide constraints in which the data can be validated during addition, insertion and deletion of data. For example, adding an attribute with a certain EntityGuid will automatically requires the existence that entity in the Entities Table. Also, updates and deletion will be propagated to the child tables as well.
The Benefits of using an XML (DataSet) Data Structure