Upload
jeffery-dean
View
216
Download
0
Embed Size (px)
Citation preview
Overall Sky.NET Idea
Last year’s class: first to make Sky.NET
Sky.NET’s world is made up of entities, attributes, behaviors, and rules Dynamically extensible, abstract
framework Capable of adding entities, attributes,
behaviors, and rules at run time
Our Sky.NET
Our task: Improve Sky.NET Implement rules framework Faster view / graphics Faster network / server access
Model
Behaviors: Can take in arbitrary arguments Uses query and affecter lambda to
interface with the database Provides common interfaces for
working with the database adapter Allows the ability to write different
interfaces to perform other behaviors if desired
Allows more flexible rules implementations
Model
Rules: Rules can permit or block the
execution of a behavior Rules can also change the way that
behaviors are run through wrapping the behavior, the affecter, or the query
They know all of the arguments given to the rule, and are given a direct link to the database, allowing a rule complete information about the world.
Model Agents
Adapter between Network and Simulation Used by the Client to interact with the
Simulation Server Side Automation Client Uploaded User Permissions still in place Client’s discretion to choose how they
interact with Simulation Adds flexibility for Client to deploy an A.I.
agent
View – High Level Design
Model-View-Controller pattern View handles interaction with user Decouples data from its
presentation
View acts as a manager of: Media packages Devices Data feeds
View – Media Packages
Media Packages encapsulate files that can be used to represent an entity or behavior
Implemented as zip files with XML manifests
Store mapping of keys to media files
View - Devices
Devices actually present data to the user
Implementer can choose which media are relevant for a given device
ThreeDimDevice – uses Irrlicht engine to render 3d meshes that represent entities
View – Data Feeds
Data feed encapsulates a single view of a SkyNet simulation
Simulation can make any number of feeds available to user
User must consider different feeds when making decisions
View – Behavior Parameters Must allow flexibility for behavior
implementers
Need an abstract way to get user input of a requested type
GUI panels are generated dynamically to fulfill the parameters for a given behavior
High-Level Network Design Flexible framework:
supports for multiple clients, servers, clients access behind firewalls, client/server capability on a single machine
Scalable framework: low-level network supports Sockets for
connections Extensible framework:
arbitrary objects transferred, low-level network details insulated from the rest of the program
Low-Level Network
TCP/IP Sockets DummyNetwork
loads carried out in another thread
development procedure
Server-Side Loading and Saving of the State of the World Implemented as a
Behavior Easy to understand:
SkyNetDataSet schema XML file to specify entity
creation Relational structure:
Entity, Attribute, AttributeType is expressed structurally and transferred into the Database
Loading/Saving to SQL
Relational structure mapping:
Entity, Attribute, AttributeType,stored in the database
Server-Side Loading and Saving of the State of the World Example:<Entity> <Guid>”3C1B97FC-38A5-47c0-A74D-7DD3471AFEB3”</Guid>
<Attribute> <Name>”Age”</Name> <Value>”21”</Value> </Attribute></Entity>
Network
Any questions about the network?
Any questions about server-side loading and saving of the state of the world?
Database
Why do we need a database?
To store the state of the world To handle a lot of data To act as a file system To facilitate searching for data
Database
What are we storing in the database?
The four basic components of every simulation:
Entities and Attributes
Behaviors and Rules
Database Entities and Attributes
Many-to-Many relationship Each entity can have many attributes Each type can appear in the attribute
table multiple times
Database
Behaviors and Rules One-to-Many relationships Behaviors and rules stored as code A rule can affect multiple locations
Database - Implementation Gentle.NET
Object relational mapping
No licensing required
Database backend flexibility