New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Cleora Stiedemann


Marketplace > Rice University > ComputerScienence > COMP 410 > SOFTWARE ENGINEERING METHODOLOGY
Cleora Stiedemann
Rice University
GPA 3.72

Stephen Wong

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Stephen Wong
Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 9 page Class Notes was uploaded by Cleora Stiedemann on Monday October 19, 2015. The Class Notes belongs to COMP 410 at Rice University taught by Stephen Wong in Fall. Since its upload, it has received 23 views. For similar materials see /class/224947/comp-410-rice-university in ComputerScienence at Rice University.

Similar to COMP 410 at Rice University




Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/19/15
Behaviors in Tequila A few Behavior implementation details have changed from Sangria to Tequila This document should clarify what has changed what classes are used by Behaviors and how Behaviors are executed First a couple of broad de nitions of class groups Attributes a key value pair used to generate a Fitness Fitness a collection of key value pairs the Behavior uses to determine how the execution of a Behavior affects both the sending entity and the responding entity Behavior The three types of Behaviors are detailed below Sending and Responding behaviors will both be concrete implementations of the ISendingBehavior class Sending A sending behavior is the behavior that is executed to get an Entity to actually do something A sending behavior can be something like attack move refuel etc The sending behavior is responsible for creating the initial Fitness Reacting A reacting behavior modifies the Fitness that the sending behavior creates This is used so factors in the environment can affect the sending fitness For example a force field may have a DefendReacting Behavior which boosts a troops Defend Behavior fitness Terrain also has a MoveReacting Behavior that affects any moving Entity s speed and ability to move Responding A responding behavior is the behavior that interacts with the sending behavior For example Defend is the responding counterpart to Attack The responding behavior uses the Fitness calculation of its sending behavior counterpart and its own Fitness calculation to determine the success of the sending behavior Responding behaviors can also be affected by reacting behaviors Here is the general framework for the execution of a sending behavior by entity A A is told to execute a sending behavior on a certain location A s Fitness for executing the sending behavior is calculated A s Fitness is passed to Entities within a certain area with a reacting behavior corresponding to A s sending behavior The Entities with the reacting behavior modify A s Fitness by looking at elements in the environment etc that affect A s ability to perform its sending behavior Now that A s sending Fitness is nalized the behavior can be executed This is also the step where A s attributes are modi ed The BehaviorAdapter s ExecuteBehaviorInLocation method is called by the sending behavior s execute method Lets say that ExecuteBehaviorInLocation nds some Entity with a responding behavior corresponding to A s sending behavior We will call this Entity B B generates its Fitness for performing the responding behavior This is where A s sending Fitness is taken into account B s Fitness is passed to Entities with reacting behaviors that correspond to its responding behavior Again the Entities with the corresponding reacting behavior modify the originally calculated Fitness B s ExecuteBehavior method then modi es B s attributes How this design deals with children Entities This shouldn t be a problem if an Entity s child is involved in executing a behavior and its attributes need to be modi ed the Fitness will simply pass along that information If the parent Entity doesn t contain an attribute that is referred to in the Fitness we know a child was involved and we can just recur down to the child that does contain that attribute and modify it as the Fitness instructs Concerns about current design Behaviors can t handle new widgets in the current design this is because behaviors are hardcoded to deal with speci c attributes and Fitnesses Also while we will have a collection of Fitnesses I think it is important to keep these scores obtuse We don t want a troop to have a building attack tness and a troop attack tness the troop should calculate the same attack tness no matter what it is attacking and the defend behavior should decide what happens to the building or other troop 0 Economic DesignResources o What are resources Things which are acquired and traded for others 0 Types I Natural freethose which are not created by a player and at the base level require little to none capital investment to acquire 0 Ex Wood Hunting Land Miningdepends on what we give the player initially I Natural nonfreesame but require substantial investment to even get the resource 0 Ex Coal Crude oil Mining Farming I Processedthose which are produced by using naturalprocessed resources generally require a good deal of investment to get 0 Ex Electricity Bullets Metal 0 Possibilities I Only have Natural resourcessimplest form 0 Like most RTS ie Age of Empires gamesgenerally have between 15 different resources I Have any combination of the three typesmore complex I Have any combination and allow custom resources to be added like weaponsmost complex most exible o How are resources usedtransported I World bank as soon as resources are acquired they go into an invisible storage area available for instantaneous use anywhere by the player 0 Most common for RTS games most simple I Realworldresources are stored where they are acquired 0 Must be transported to area of use 0 Ex Wood must be taken from the forest to the shipyard 0 Should this be automated o Are there speci c resourcecarrying units or can anything carry resourcesie a soldier carrying bullets 0 Economic Model 0 Is there a concept of a national economy In ation bonds etc 0 Manual automatic 0 How much control can a player have How much does one need 0 What tasks can the computer automate Can there be too much simplicity o This relates to what does each person control I Will a general know if the squads under him are people or computers 0 Ingame communication 0 Online chat Voice chat Message system I Is anyone allowed to communicate to anyone else For example is the lieutenant of one country allowed to simply open a chat window with the enemy high command Is there a mail system How realistic will it be Political Design 0 Structure I What does each person control 0 Country o Diplomacy Depending on what each person controls alliances can be 0 Technology Troops Do those come with a country Other players Between people countries groups Of cial written into game ie allyenemy checkbox Uno icial purely verbalusercreated agreements 0 much like real world treaties o basically makes game one big FFA Freeforall Most commononly of cial agreementsin order to add more exibility they simply add more of cial types Combinations generally don t work very well unless unof cial agreements are heavily emphasized as people will tend to just use the of cial 0 Is there even a concept of researching upgrades Global instantaneous upgradesresearch an upgrade for guns to re faster and all your troops instantly upgrade Instantaneous at factoriestroops must go in and resupply to upgrade TypesMilitary Science Social 0 Setting is modern how does this allow for historical upgrades A progression oftechnology requires a progression oftime 0 Social 0 Is there a concept of the masses 0 Popular uprising Leader popularity Is this a computerbased popularity thing Algorithmbased Do players themselves vote Of cialunof cial o Is it a dictatorship hierarchy those higher up have absolute authority Once again just what does a player own 0 Military 0 Settingmodem o Categorizations of troop types Wellde nedinfantry land vehicles sea air etc o Troop Prede ned troopscustom troops can be inserted but separate guidelines will need to be established Troops made up of swappable parts Inherently allows customizationparts can be easily added new units can be easily made Parts either must be categorized or given point values or both groupings At the base level will each unit be quantized Will there be a concept of an individual marinetanldairplane Will they be hidden from higher levels ie a squad commander can see each individual unit but a general will only see squads I If so will the squad decrease in quantized units of effectiveness as individual units die I Does the concept of quantizing statistics con ict with traditional hpattaccetcie does a marine die in one hit When he gets injured does his individual effectiveness decrease If so how I In the end it has to boil down to simple numbers but where to draw the line 0 Timeline 0 How long are games expected to last 30 mins 1 hr inde nite 0 Finite time period I Can have de ned tech trees expected amount of growth plot etc I Easy to de ne how players start what they start with etc 0 In nite time period I Tech advances become more complicated I No preset story line can be implemented I Must be able to account for inde niteness of gamehow to keep the game interesting I How do people enter the game Do they start with a squad of units Does this squad magically appear or do players have to wait for people already in the game to create new units for them to control 0 Territory 0 What exactly is a countryregionterritory o Is it de ned in the game like Rise of Nations and if so what does it do I Morale bonuses Quicker resupplying Anything other than political purposes 0 Environment 0 Terrain I How does terrain affect a unit s movement 0 Weather I Is there such a thing Is it random 0 DayNight I Same as above o Visibility 0 T3 pi a1 1 39 J areas are r39 39y opaque whereas explored but not currently visible areas are covered with fog of war 0 Any other ideas 050quot 100quot 100quot 075quot SkyNet Hex Cartesian Coordinates Diagram 100quot o 3990 075quot Converting from Hex to Cartesian CartX HexX 075 CartY HexY 05 if HexX is Odd HexY if HexX is Even or Zero Converting from Cartesian to Hex HexX CartX 075 round to nearest integer HexY CartY 05 round to nearest integer ifabove is Odd CartY round to nearest integer if above is even SKMHG I GLOBAL CJNFI l T s I MULATUR Design Documentation for an XMLbased Model Clement Pang 23 March 2005 Ove rv iew This documentspecifies the general architecture ofthe SkyNet Model that will be XMLibasedt In specific how entities exist and interact and how data is stored will be explained and illustrated in deta39t Introduction The currentSkyNet Model consists ofa hierarchical system where the world consists solely ofentitiest Each entity has a collection ofattributes a collection of behaviors a collection ofpoints represented by an IAreathat describe its physical location and a collection ofProxyEntities that may play a part in certain be aviorst Entities may be parents to other entities etgtAtank may have a machine gun and a turretas its child entityt 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 anXMLbased model Based on the above description thewhole SkyNetModeI can be serialized into an XML le with a schema that is implemented right now as a compatible to an ADOt DataSett The diagram ofthe tables is shown be w Enooes hoes z gamma stung Varem um 5an mm 39 E Reamng chav m nnnnnn E PraxyEnotym m The diamonds representthe relationship a are oneitoimany relationship Using the tools provided by Visual StudioNET the XML Schema can be generated into classes that reflect the data ie 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 ofan entity by calling SkyNetModelEntitiesFindByEntityGuidsomeguidGetAttributesTableO The relationships in the DataSet provide constraints in which the data can be validated during addition insertion and deletion ofdata 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 Data can be easily serialized into xml files or transmitted through the network The client model can simply call SkyNetModelMergekyNetModeI from Server and its data will be automatically refreshed DataSet can also be written to the hard drive for debugging purposes ADONET provides transactions inside DataSet and optimisticpessimistic locking that ensures the ACID properties of changes that occur in the model The original design of the model requires locking the entity when updating the attributes Hashtable thereby restricting access to the entity from other objects Using the new system ADONET locks only the rows that are being updated and determines if phantom data or race condition can occur if concurrent access is allowed This can allow other objects to access the model if they simply want to read but not change the data Events are generated automatically by ADONET when rows are changed added deleted or updated The client model can then easily pass these events into the View and would therefore eliminate the need to determine when and what to send to the View when messages are received from the network When a serverjoins the network other servers can serialize their model and send it over the network to ensure that they have the current model in memory The original idea of passing each entity individually over the network is eliminated since only one single stream of data is required to recreate the entire model Similarly when clients request for updates they will not be receiving potentially thousands of EntityUpdateMessages as it is currently called but rather an XML file that describe all that exist in a certain envelope Since a DataSet can also be stored into a database such as a SQL Server or MSDE The model need not only exist in memory lfwe ever decide that we would want to stop running the server but retain the data for future execution we can simply store the DataSet into a SQL Server for future execution Using SQL Server for Backend Storage The current direction that we are heading for in designing the Server Model is to use ADONET to represent the model in memory as well as to store the data in SQL along the way Storing the data in SQL allows us to have a physical copy of the data in permanent storage with much faster storage and retrieval time than a le that exist on a hard drive We are currently using MSDE the embedded version of SQL Server to host the data There is much more flexible licensing requirement on MSDE than SQL Server and if ever we decide to scale up to a real SQL Server possibly a cluster we could easily replace MSDE with SQL Server MSDE is downloadable from Microsoft Another benefit of using SQL as the backend is that more complex queries if needed can be executed directly on the SQL Server instead of looking at the DataSet model in memory Of course the results would be fed back into the DataSet and from a quotuserquot standpoint they will not notice whether the model is using the DataSet in memory to retrieve the results or whether the SQL backbone is used Examples include the serialization of the model to the client with a certain envelope When the client request for all entities within a certain window while it is possible to just look at the DataSet in memory and grab only those that is within that window it would have been much faster if we can query the SQL database with a query that only returns entities with their related children within that envelope and serialize the results instead Another advantage of using SQL as the backend is the support for SQL in NET Enterprise Services In SkyNet when events happen across server boundary the original idea is to use an n way handshake system where servers would agree on processing a certain event and execute them at the same time This requires multiple messages to be passed around when events occur NET Enterprise service provides transaction support between different computers using Microsoft Distributed Transaction Coordinator included in Windows 2000 onwards formerly known as MTS It uses a two phase commit system such that transactions either occur or they don t occur across different computers We are actively trying to harness the available tools from Enterprise Services so that we will not be required to deal with complex locking and handshake issues when inter server communication is required The Server Model can be hosted as a Windows service if necessary and more advanced tools can be used if performance and scaling is ofa concern Object pooling and multi threaded processing can be enabled for Enterprise Service objects aka components and if we ever want to host SkyNet as a Server Client system instead of p2p we can use Microsoft s Application Center to host the components on a server farm While it might be possible that we can write our own transaction system for inter server communication it is probably better given the current time constraint and other human factors to use readily available classes from NET to implement our ideas


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Amaris Trozzo George Washington University

"I made $350 in just two days after posting my first study guide."

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.