<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.autismcollaborative.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Belmonte</id>
		<title>TACWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.autismcollaborative.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Belmonte"/>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Special:Contributions/Belmonte"/>
		<updated>2026-06-23T12:48:26Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.4</generator>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=632</id>
		<title>Important Neuroscientific Considerations in Game Design for Autism</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=632"/>
				<updated>2012-09-14T13:45:28Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added a caution about maximum-likelihood psychophysical threshold estimation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Neuroscientific Considerations in Game Design for Autism&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If there&amp;#039;s a way to use a game feature as an object of repetitive behaviour, a player with autism will find it..&amp;#039;&amp;#039;&amp;#039;  Players with autism often find predictable sensory contingencies more rewarding than unpredictable, surprising events.  So whereas non-autistic players could be expected to self-motivate to &amp;#039;level up&amp;#039; or in general to proceed through the game narrative, autistic players often are more content to keep on repeating the same feature, or causing the game to produce the same sound or visual effect.  These purely &amp;lt;u&amp;gt;sensory&amp;lt;/u&amp;gt; effects can be much more salient and motivating to a person with autism than the less tangible and immediate, more abstract and future-oriented effect of, say, a game score or a power-up.  So, for instance, an autistic player might become fascinated with the sound effect that takes place when their avatar is destroyed, and therefore keep &amp;#039;dying&amp;#039; on purpose, just to hear the sound effect - clearly a strategy that thwarts the intended game mechanic!  When designing and implementing a game, put yourself in the place of the player with autism, asking yourself, &amp;quot;What sensory aspects of this game could a person become fixated on?&amp;quot;  Try to move the player through the game, nudging them away from such repetitive behaviours and into new experiences.  At the same time, though, you can use &amp;lt;u&amp;gt;limited&amp;lt;/u&amp;gt;, &amp;lt;u&amp;gt;rationed&amp;lt;/u&amp;gt; opportunities for repetitive behaviour as a reward and a motivation for moving through the game - e.g. a game structure that allows a player ten (and only ten) repetitions of their favourite sound effect once they&amp;#039;ve done the hard work of reaching the next level.&lt;br /&gt;
&amp;lt;br&amp;gt;In his memoir &amp;lt;i&amp;gt;There&amp;#039;s a Boy in Here&amp;lt;/i&amp;gt;, Sean Barron describes his own autistic fascination with repetition and predictability:&lt;br /&gt;
&amp;lt;br&amp;gt;‘I loved repetition.  Every time I turned on a light I knew what would happen.  When I flipped the switch, the light went on.  It gave me a wonderful feeling of security because it was the same each time….  Even when I knew, it was thrilling to do it over and over.  It was always the same.&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;‘People bothered me.  I didn’t know what they were for or what they would do to me.  They were not always the same and I had no security with them at all….&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid timed events; give the player control of when things happen; whenever possible, prompt the player.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism have difficulty with executive function, that is, in rapidly planning and executing actions in response to sensory inputs.  They have a great deal of skill and often exceed the performance of people without autism -- but it&amp;#039;s a intensely studied and considered, deliberate style of skill, often not expressed under time pressure.  So it&amp;#039;s important to make certain that the timing of events is controlled not by the computer (except in cases where the experiment requires it) but by the player.  Small additions such as a &amp;quot;next&amp;quot; button or a &amp;quot;ready&amp;quot; button can make all the difference.  (An example of the event-driven rather than time-driven structure is the use of the up-arrow key to connect with the wormhole in the Maritime Defender mini-game.)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Do not depend on a player&amp;#039;s memory for instructions; prompt the player every time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	A corollary of the executive planning problem is that the player may have trouble remembering a sequence of steps.  Even if (s)he has learnt in a tutorial that key A triggers action X and key B triggers action Y, these arbitrary associations might not be remembered, unless the player has had a chance to practise these actions actively, many times over.&lt;br /&gt;
&lt;br /&gt;
Another corollary of this memory problem: &amp;#039;&amp;#039;&amp;#039;Do not make input-output mappings depend on the game state.&amp;#039;&amp;#039;&amp;#039;  You might be tempted to hide functions inside submenus, access to which depends on the player&amp;#039;s clicking on the right primary menu, or to make a drag of the mouse do something different after a click than after no click (or even worse, something different after a left-click than after a right-click).  Avoid such sequential logic in the user interface.  Wherever possible, use purely combinational logic.  Some sequential logic is of course unavoidable -- otherwise we wouldn&amp;#039;t be able to have separate mini-games! -- but it ought to be used sparingly and only when absolutely required.&lt;br /&gt;
&lt;br /&gt;
Maintain a consistent mapping between user inputs and game functionality; eschew a confusing multiplicity of modes.  People with autism work best with predictable relationships between action and reaction, that do not change.  A large number of game modes can overtax a player&amp;#039;s short-term memory:  What does this button do at this moment?&amp;quot;  On this screen should I speak my answer, or type it?  Instead of trying to make the game do everything, by partitioning it into many modes, try insofar as is possible to flatten the design so that all functions and modalities appear side by side and simultaneously -- so that it&amp;#039;s up to the player, rather than the computer, at any given juncture to choose how to play.  For instance, in a game in which input can be manual or vocal, do not separate these two input modalities into different game phases.  Instead, accept both input modalities on one and the same game screen.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Instead of a sequence of actions, ask for one action at a time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Rapid actions can be difficult enough by themselves, but when people with autism face the additional demand of performing several of these actions rapidly and in the proper sequence thay can feel very much overwhelmed.  (See the previous entries on executive function and memory.)  Instead of requiring sequences of inputs in response to a single prompt, try to prompt separately for each input.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use pictures, not words.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Most people with autism tend to think in pictures rather than words.  Instructions presented as text might not be comprehended -- not because the player is incapable of comprehending but because (s)he&amp;#039;s concentrating so much on decoding the individual words that (s)he can&amp;#039;t spare much effort to put those words together into the meanings of complete sentences and narratives.  Sometimes text is unavoidable; if text is used, avoid verbosity and don&amp;#039;t clutter the display with words.  Reading can be slow; see the entry on &amp;#039;&amp;#039;timed events&amp;#039;&amp;#039; above about waiting and prompting the player to continue.&lt;br /&gt;
&lt;br /&gt;
When designing game player avatars and non-player characters for children, be aware that the &amp;#039;&amp;#039;&amp;#039;anthropomorphised &amp;quot;cute&amp;quot; creatures that work with non-autistic children actually are something of a turn-off for autistic children.&amp;#039;&amp;#039;&amp;#039;  People with autism are stringently matter-of-fact as to what is real and what isn&amp;#039;t.  Imagine your player thinking, &amp;quot;Look, I know that caterpillars don&amp;#039;t have human faces and don&amp;#039;t smile, so why is this game treating me as though I could believe that they do?  Why are you treating me as someone who could be so stupid, so childish?&amp;quot;  Mechanical stimuli such as trains, gears, etc., work much more effectively.  An anecdote might best illustrate this phenomenon: when my autistic niece was about five years old, my sister, sitting with her on a park bench, tried to dispel the boredom by playing a pretend game with her, saying, &amp;quot;Oh the house is on fire; let&amp;#039;s get the fire engines!&amp;quot;  In reality, of course, there was no house, there was no fire, there was only a park bench, and my niece gazed quizzically at my sister as if to say, &amp;quot;What, mum, what kind of an idiot are you?&amp;quot;  Anthropomorphic animals and other counterfactual, imaginary stimuli tend to turn off people with autism.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Players should learn by doing, not just by observing or reading or listening.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	In this regard, people with autism are no different from people without autism: we all learn best when we can be active rather than passive learners.  The challenges faced by people with autism make it even more crucial that game activities involve learning-by-doing, rather than depending on learning-by-reading or learning-by-listening.  This is particularly true of the game tutorials.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid depending on simultaneous or near-simultaneous events in different perceptual channels (e.g. different places on the screen, or different senses such as video with audio).&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism focus intensely and exclusively on one perceptual channel at a time.  When focusing on one point or area of the display, events away from this spatial focus of attention may not register.  Anathema for a person with autism would be a cockpit display with many gauges indicating different quantities which all need to be observed simultaneously -- or a visual display that needs to be observed at the same time as a spoken or other auditory signal.  (Background music is okay because it doesn&amp;#039;t need to be attended; players can just let it go on whilst they focus on the visual display.)  Instead, either information should be displayed in one region of the display or one sensory channel, or ample time should be allowed to shift attention between points in visual space or between sensory channels.  Shifts of attention can take 2 to 3 seconds for people with autism, whereas people without autism take 0.2 to 0.3 seconds.  Think about what it would be like to be looking at the display through a long telescope that magnifies a small area but shuts out the periphery.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid evoking unnecessary anxiety.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism are &amp;#039;&amp;#039;&amp;#039;much&amp;#039;&amp;#039;&amp;#039; more prone to anxiety than people without autism -- especially when faced with a new and unpractised task, or with a timed task, or with an interactive situation that&amp;#039;s out of their control.  (See entries above on avoiding timed events and giving prompting, pictures, and practice.)  Do everything possible to make certain that the player, not the computer, is the one controlling what happens next, and that the player has every opportunity to practise and to become comfortable with the demands of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For repeating events, vary the timing slightly so that the time between two successive instances of the event is not constant.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This consideration actually isn&amp;#039;t about accommodating people with autism; rather, it&amp;#039;s about accommodating EEG analysis.  Those of you who know something about signal processing will be familiar with the phenomenon of &amp;#039;&amp;#039;&amp;#039;aliasing&amp;#039;&amp;#039;&amp;#039; in which a discrete sampling of a high-frequency signal at too low a sampling rate produces an artefactual low-frequency oscillation.  The problem here has a lot in common with aliasing.  Consider as an example the situation that exists when the firing button is pressed and held: the weapons will fire at a certain rate, say, once every 500 ms.  Suppose that we&amp;#039;re interested in the brain response to the combined auditory and visual effects associated with weapons firing.  Suppose also, though, that there is an ongoing, endogenous (that is, internally driven) 10 hz oscillation in the player&amp;#039;s brain that has nothing to do with these exogenous stimuli.  Since 500 ms is an integral multiple of the 100 ms period of this oscillation, when we sample the exogenous brain response to each weapons firing we&amp;#039;re going to end up also sampling the endogenous oscillation at the same point in its phase every time, and we will thus misattribute the endogenous signal as an exogenous response to the weapons firing.  To forestall this ambiguity in EEG analysis, we can add a small amount of temporal jitter to the intervals between firings - not so much as to make them seem unnaturally jittery to the player, but enough to get rid of this phase artefact.  The exact amount depends on what seems natural given the event separation; in this example of a 500 ms event we might deem that any variation more than 10% of the interval in either direction would seem unnatural, so we might then choose to vary the intervals over a uniform distribution from 450 ms to 550 ms.  Given the frequencies of the signals in which we&amp;#039;re interested, it isn&amp;#039;t ever necessary to add more than 150 ms (that is, 75 ms in either direction) of temporal jitter.  Add as much temporal jitter as you can, up to this 150 ms limit - but don&amp;#039;t sacrifice playability.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Log event codes for everything - absolutely everything.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This is another consideration for EEG analysis.  Did the weapons just fire (even though the firing key is being held down constantly)?  That&amp;#039;s an event.  Did some sort of motion start or stop or change speed?  That&amp;#039;s an event.  Absolutely everything that happens in the game should be reported with an event code.  (See &amp;quot;Game/Engine/Logger.cs&amp;quot;.)  We can always ignore event codes if we decide that they aren&amp;#039;t of interest in our analysis.  What we can&amp;#039;t do is go back and insert event codes after the data have been recorded.  So put everything in.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT use a maximum-likelihood method when estimating psychophysical thresholds.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Although Pentland&amp;#039;s &amp;quot;Best PEST&amp;quot; maximum-likelihood statistical estimator is theoretically optimal, it assumes that a human is an invariant system, one whose attention never wanders, one who never is distracted or bored, one who never blinks at a crucial moment.  Psychophysical estimators in general also assume that s subject&amp;#039;s missing a stimulus is as informative and beneficial as detecting a stimulus - and the maximum-likelihood method amplifies this shortcoming by converging not on a 75%- or 80%-correct threshold but on the 50% point.  At the 50% point, the slope of the psychometric function is maximal and there is a fine line between successful and unsuccessful detection.  It is therefore at this 50% point that estimated thresholds are most prone to error, and experimental subjects cum game players most prone to frustration.  In a game context, these properties make for a boring game.  Because the maximum-likelihood method considers all stimuli ever presented to the subject, the level of difficulty in detection will not adapt much to shorter-term trends in the subject&amp;#039;s acuity.  This lack of adaptation to changes in the subject&amp;#039;s acuity can make for a frustrating game sequence in which all or nearly all stimuli go undetected, placing the player in a situation where it seems impossible to succeed.  Even the best of circumstances, a game in which fully half of the trials are missed can likewise become very boring very quickly.  To avoid such pitfalls, we recommend eschewing maximum-likelihood &amp;quot;Best PEST&amp;quot; and Bayesian QUEST algorithms, and instead hewing to a more traditional adaptive-staircase procedure such as described by Garcia-Perez (1998):&lt;br /&gt;
http://dx.doi.org/10.1016/S0042-6989(97)00340-4&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;SEE ALSO&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
http://www.gamasutra.com/view/feature/3538/designing_games_that_are_.php&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Designing Games that are Accessible to Everyone&amp;quot; by Eitan Glinert&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=631</id>
		<title>Important Neuroscientific Considerations in Game Design for Autism</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=631"/>
				<updated>2012-08-29T15:21:29Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added a recommendation against counterfectually anthropomorphic avatars&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Neuroscientific Considerations in Game Design for Autism&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If there&amp;#039;s a way to use a game feature as an object of repetitive behaviour, a player with autism will find it..&amp;#039;&amp;#039;&amp;#039;  Players with autism often find predictable sensory contingencies more rewarding than unpredictable, surprising events.  So whereas non-autistic players could be expected to self-motivate to &amp;#039;level up&amp;#039; or in general to proceed through the game narrative, autistic players often are more content to keep on repeating the same feature, or causing the game to produce the same sound or visual effect.  These purely &amp;lt;u&amp;gt;sensory&amp;lt;/u&amp;gt; effects can be much more salient and motivating to a person with autism than the less tangible and immediate, more abstract and future-oriented effect of, say, a game score or a power-up.  So, for instance, an autistic player might become fascinated with the sound effect that takes place when their avatar is destroyed, and therefore keep &amp;#039;dying&amp;#039; on purpose, just to hear the sound effect - clearly a strategy that thwarts the intended game mechanic!  When designing and implementing a game, put yourself in the place of the player with autism, asking yourself, &amp;quot;What sensory aspects of this game could a person become fixated on?&amp;quot;  Try to move the player through the game, nudging them away from such repetitive behaviours and into new experiences.  At the same time, though, you can use &amp;lt;u&amp;gt;limited&amp;lt;/u&amp;gt;, &amp;lt;u&amp;gt;rationed&amp;lt;/u&amp;gt; opportunities for repetitive behaviour as a reward and a motivation for moving through the game - e.g. a game structure that allows a player ten (and only ten) repetitions of their favourite sound effect once they&amp;#039;ve done the hard work of reaching the next level.&lt;br /&gt;
&amp;lt;br&amp;gt;In his memoir &amp;lt;i&amp;gt;There&amp;#039;s a Boy in Here&amp;lt;/i&amp;gt;, Sean Barron describes his own autistic fascination with repetition and predictability:&lt;br /&gt;
&amp;lt;br&amp;gt;‘I loved repetition.  Every time I turned on a light I knew what would happen.  When I flipped the switch, the light went on.  It gave me a wonderful feeling of security because it was the same each time….  Even when I knew, it was thrilling to do it over and over.  It was always the same.&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;‘People bothered me.  I didn’t know what they were for or what they would do to me.  They were not always the same and I had no security with them at all….&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid timed events; give the player control of when things happen; whenever possible, prompt the player.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism have difficulty with executive function, that is, in rapidly planning and executing actions in response to sensory inputs.  They have a great deal of skill and often exceed the performance of people without autism -- but it&amp;#039;s a intensely studied and considered, deliberate style of skill, often not expressed under time pressure.  So it&amp;#039;s important to make certain that the timing of events is controlled not by the computer (except in cases where the experiment requires it) but by the player.  Small additions such as a &amp;quot;next&amp;quot; button or a &amp;quot;ready&amp;quot; button can make all the difference.  (An example of the event-driven rather than time-driven structure is the use of the up-arrow key to connect with the wormhole in the Maritime Defender mini-game.)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Do not depend on a player&amp;#039;s memory for instructions; prompt the player every time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	A corollary of the executive planning problem is that the player may have trouble remembering a sequence of steps.  Even if (s)he has learnt in a tutorial that key A triggers action X and key B triggers action Y, these arbitrary associations might not be remembered, unless the player has had a chance to practise these actions actively, many times over.&lt;br /&gt;
&lt;br /&gt;
Another corollary of this memory problem: &amp;#039;&amp;#039;&amp;#039;Do not make input-output mappings depend on the game state.&amp;#039;&amp;#039;&amp;#039;  You might be tempted to hide functions inside submenus, access to which depends on the player&amp;#039;s clicking on the right primary menu, or to make a drag of the mouse do something different after a click than after no click (or even worse, something different after a left-click than after a right-click).  Avoid such sequential logic in the user interface.  Wherever possible, use purely combinational logic.  Some sequential logic is of course unavoidable -- otherwise we wouldn&amp;#039;t be able to have separate mini-games! -- but it ought to be used sparingly and only when absolutely required.&lt;br /&gt;
&lt;br /&gt;
Maintain a consistent mapping between user inputs and game functionality; eschew a confusing multiplicity of modes.  People with autism work best with predictable relationships between action and reaction, that do not change.  A large number of game modes can overtax a player&amp;#039;s short-term memory:  What does this button do at this moment?&amp;quot;  On this screen should I speak my answer, or type it?  Instead of trying to make the game do everything, by partitioning it into many modes, try insofar as is possible to flatten the design so that all functions and modalities appear side by side and simultaneously -- so that it&amp;#039;s up to the player, rather than the computer, at any given juncture to choose how to play.  For instance, in a game in which input can be manual or vocal, do not separate these two input modalities into different game phases.  Instead, accept both input modalities on one and the same game screen.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Instead of a sequence of actions, ask for one action at a time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Rapid actions can be difficult enough by themselves, but when people with autism face the additional demand of performing several of these actions rapidly and in the proper sequence thay can feel very much overwhelmed.  (See the previous entries on executive function and memory.)  Instead of requiring sequences of inputs in response to a single prompt, try to prompt separately for each input.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use pictures, not words.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Most people with autism tend to think in pictures rather than words.  Instructions presented as text might not be comprehended -- not because the player is incapable of comprehending but because (s)he&amp;#039;s concentrating so much on decoding the individual words that (s)he can&amp;#039;t spare much effort to put those words together into the meanings of complete sentences and narratives.  Sometimes text is unavoidable; if text is used, avoid verbosity and don&amp;#039;t clutter the display with words.  Reading can be slow; see the entry on &amp;#039;&amp;#039;timed events&amp;#039;&amp;#039; above about waiting and prompting the player to continue.&lt;br /&gt;
&lt;br /&gt;
When designing game player avatars and non-player characters for children, be aware that the &amp;#039;&amp;#039;&amp;#039;anthropomorphised &amp;quot;cute&amp;quot; creatures that work with non-autistic children actually are something of a turn-off for autistic children.&amp;#039;&amp;#039;&amp;#039;  People with autism are stringently matter-of-fact as to what is real and what isn&amp;#039;t.  Imagine your player thinking, &amp;quot;Look, I know that caterpillars don&amp;#039;t have human faces and don&amp;#039;t smile, so why is this game treating me as though I could believe that they do?  Why are you treating me as someone who could be so stupid, so childish?&amp;quot;  Mechanical stimuli such as trains, gears, etc., work much more effectively.  An anecdote might best illustrate this phenomenon: when my autistic niece was about five years old, my sister, sitting with her on a park bench, tried to dispel the boredom by playing a pretend game with her, saying, &amp;quot;Oh the house is on fire; let&amp;#039;s get the fire engines!&amp;quot;  In reality, of course, there was no house, there was no fire, there was only a park bench, and my niece gazed quizzically at my sister as if to say, &amp;quot;What, mum, what kind of an idiot are you?&amp;quot;  Anthropomorphic animals and other counterfactual, imaginary stimuli tend to turn off people with autism.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Players should learn by doing, not just by observing or reading or listening.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	In this regard, people with autism are no different from people without autism: we all learn best when we can be active rather than passive learners.  The challenges faced by people with autism make it even more crucial that game activities involve learning-by-doing, rather than depending on learning-by-reading or learning-by-listening.  This is particularly true of the game tutorials.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid depending on simultaneous or near-simultaneous events in different perceptual channels (e.g. different places on the screen, or different senses such as video with audio).&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism focus intensely and exclusively on one perceptual channel at a time.  When focusing on one point or area of the display, events away from this spatial focus of attention may not register.  Anathema for a person with autism would be a cockpit display with many gauges indicating different quantities which all need to be observed simultaneously -- or a visual display that needs to be observed at the same time as a spoken or other auditory signal.  (Background music is okay because it doesn&amp;#039;t need to be attended; players can just let it go on whilst they focus on the visual display.)  Instead, either information should be displayed in one region of the display or one sensory channel, or ample time should be allowed to shift attention between points in visual space or between sensory channels.  Shifts of attention can take 2 to 3 seconds for people with autism, whereas people without autism take 0.2 to 0.3 seconds.  Think about what it would be like to be looking at the display through a long telescope that magnifies a small area but shuts out the periphery.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid evoking unnecessary anxiety.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism are &amp;#039;&amp;#039;&amp;#039;much&amp;#039;&amp;#039;&amp;#039; more prone to anxiety than people without autism -- especially when faced with a new and unpractised task, or with a timed task, or with an interactive situation that&amp;#039;s out of their control.  (See entries above on avoiding timed events and giving prompting, pictures, and practice.)  Do everything possible to make certain that the player, not the computer, is the one controlling what happens next, and that the player has every opportunity to practise and to become comfortable with the demands of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For repeating events, vary the timing slightly so that the time between two successive instances of the event is not constant.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This consideration actually isn&amp;#039;t about accommodating people with autism; rather, it&amp;#039;s about accommodating EEG analysis.  Those of you who know something about signal processing will be familiar with the phenomenon of &amp;#039;&amp;#039;&amp;#039;aliasing&amp;#039;&amp;#039;&amp;#039; in which a discrete sampling of a high-frequency signal at too low a sampling rate produces an artefactual low-frequency oscillation.  The problem here has a lot in common with aliasing.  Consider as an example the situation that exists when the firing button is pressed and held: the weapons will fire at a certain rate, say, once every 500 ms.  Suppose that we&amp;#039;re interested in the brain response to the combined auditory and visual effects associated with weapons firing.  Suppose also, though, that there is an ongoing, endogenous (that is, internally driven) 10 hz oscillation in the player&amp;#039;s brain that has nothing to do with these exogenous stimuli.  Since 500 ms is an integral multiple of the 100 ms period of this oscillation, when we sample the exogenous brain response to each weapons firing we&amp;#039;re going to end up also sampling the endogenous oscillation at the same point in its phase every time, and we will thus misattribute the endogenous signal as an exogenous response to the weapons firing.  To forestall this ambiguity in EEG analysis, we can add a small amount of temporal jitter to the intervals between firings - not so much as to make them seem unnaturally jittery to the player, but enough to get rid of this phase artefact.  The exact amount depends on what seems natural given the event separation; in this example of a 500 ms event we might deem that any variation more than 10% of the interval in either direction would seem unnatural, so we might then choose to vary the intervals over a uniform distribution from 450 ms to 550 ms.  Given the frequencies of the signals in which we&amp;#039;re interested, it isn&amp;#039;t ever necessary to add more than 150 ms (that is, 75 ms in either direction) of temporal jitter.  Add as much temporal jitter as you can, up to this 150 ms limit - but don&amp;#039;t sacrifice playability.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Log event codes for everything - absolutely everything.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This is another consideration for EEG analysis.  Did the weapons just fire (even though the firing key is being held down constantly)?  That&amp;#039;s an event.  Did some sort of motion start or stop or change speed?  That&amp;#039;s an event.  Absolutely everything that happens in the game should be reported with an event code.  (See &amp;quot;Game/Engine/Logger.cs&amp;quot;.)  We can always ignore event codes if we decide that they aren&amp;#039;t of interest in our analysis.  What we can&amp;#039;t do is go back and insert event codes after the data have been recorded.  So put everything in.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;SEE ALSO&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
http://www.gamasutra.com/view/feature/3538/designing_games_that_are_.php&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Designing Games that are Accessible to Everyone&amp;quot; by Eitan Glinert&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=630</id>
		<title>Important Neuroscientific Considerations in Game Design for Autism</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=630"/>
				<updated>2012-08-23T17:37:27Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added a caution to maintain a consistent action-reaction mapping and to avoid a proliferation of different game &amp;quot;modes&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Neuroscientific Considerations in Game Design for Autism&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If there&amp;#039;s a way to use a game feature as an object of repetitive behaviour, a player with autism will find it..&amp;#039;&amp;#039;&amp;#039;  Players with autism often find predictable sensory contingencies more rewarding than unpredictable, surprising events.  So whereas non-autistic players could be expected to self-motivate to &amp;#039;level up&amp;#039; or in general to proceed through the game narrative, autistic players often are more content to keep on repeating the same feature, or causing the game to produce the same sound or visual effect.  These purely &amp;lt;u&amp;gt;sensory&amp;lt;/u&amp;gt; effects can be much more salient and motivating to a person with autism than the less tangible and immediate, more abstract and future-oriented effect of, say, a game score or a power-up.  So, for instance, an autistic player might become fascinated with the sound effect that takes place when their avatar is destroyed, and therefore keep &amp;#039;dying&amp;#039; on purpose, just to hear the sound effect - clearly a strategy that thwarts the intended game mechanic!  When designing and implementing a game, put yourself in the place of the player with autism, asking yourself, &amp;quot;What sensory aspects of this game could a person become fixated on?&amp;quot;  Try to move the player through the game, nudging them away from such repetitive behaviours and into new experiences.  At the same time, though, you can use &amp;lt;u&amp;gt;limited&amp;lt;/u&amp;gt;, &amp;lt;u&amp;gt;rationed&amp;lt;/u&amp;gt; opportunities for repetitive behaviour as a reward and a motivation for moving through the game - e.g. a game structure that allows a player ten (and only ten) repetitions of their favourite sound effect once they&amp;#039;ve done the hard work of reaching the next level.&lt;br /&gt;
&amp;lt;br&amp;gt;In his memoir &amp;lt;i&amp;gt;There&amp;#039;s a Boy in Here&amp;lt;/i&amp;gt;, Sean Barron describes his own autistic fascination with repetition and predictability:&lt;br /&gt;
&amp;lt;br&amp;gt;‘I loved repetition.  Every time I turned on a light I knew what would happen.  When I flipped the switch, the light went on.  It gave me a wonderful feeling of security because it was the same each time….  Even when I knew, it was thrilling to do it over and over.  It was always the same.&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;‘People bothered me.  I didn’t know what they were for or what they would do to me.  They were not always the same and I had no security with them at all….&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid timed events; give the player control of when things happen; whenever possible, prompt the player.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism have difficulty with executive function, that is, in rapidly planning and executing actions in response to sensory inputs.  They have a great deal of skill and often exceed the performance of people without autism -- but it&amp;#039;s a intensely studied and considered, deliberate style of skill, often not expressed under time pressure.  So it&amp;#039;s important to make certain that the timing of events is controlled not by the computer (except in cases where the experiment requires it) but by the player.  Small additions such as a &amp;quot;next&amp;quot; button or a &amp;quot;ready&amp;quot; button can make all the difference.  (An example of the event-driven rather than time-driven structure is the use of the up-arrow key to connect with the wormhole in the Maritime Defender mini-game.)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Do not depend on a player&amp;#039;s memory for instructions; prompt the player every time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	A corollary of the executive planning problem is that the player may have trouble remembering a sequence of steps.  Even if (s)he has learnt in a tutorial that key A triggers action X and key B triggers action Y, these arbitrary associations might not be remembered, unless the player has had a chance to practise these actions actively, many times over.&lt;br /&gt;
&lt;br /&gt;
Another corollary of this memory problem: &amp;#039;&amp;#039;&amp;#039;Do not make input-output mappings depend on the game state.&amp;#039;&amp;#039;&amp;#039;  You might be tempted to hide functions inside submenus, access to which depends on the player&amp;#039;s clicking on the right primary menu, or to make a drag of the mouse do something different after a click than after no click (or even worse, something different after a left-click than after a right-click).  Avoid such sequential logic in the user interface.  Wherever possible, use purely combinational logic.  Some sequential logic is of course unavoidable -- otherwise we wouldn&amp;#039;t be able to have separate mini-games! -- but it ought to be used sparingly and only when absolutely required.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Instead of a sequence of actions, ask for one action at a time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Rapid actions can be difficult enough by themselves, but when people with autism face the additional demand of performing several of these actions rapidly and in the proper sequence thay can feel very much overwhelmed.  (See the previous entries on executive function and memory.)  Instead of requiring sequences of inputs in response to a single prompt, try to prompt separately for each input.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use pictures, not words.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Most people with autism tend to think in pictures rather than words.  Instructions presented as text might not be comprehended -- not because the player is incapable of comprehending but because (s)he&amp;#039;s concentrating so much on decoding the individual words that (s)he can&amp;#039;t spare much effort to put those words together into the meanings of complete sentences and narratives.  Sometimes text is unavoidable; if text is used, avoid verbosity and don&amp;#039;t clutter the display with words.  Reading can be slow; see the entry on &amp;#039;&amp;#039;timed events&amp;#039;&amp;#039; above about waiting and prompting the player to continue.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Players should learn by doing, not just by observing or reading or listening.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	In this regard, people with autism are no different from people without autism: we all learn best when we can be active rather than passive learners.  The challenges faced by people with autism make it even more crucial that game activities involve learning-by-doing, rather than depending on learning-by-reading or learning-by-listening.  This is particularly true of the game tutorials.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid depending on simultaneous or near-simultaneous events in different perceptual channels (e.g. different places on the screen, or different senses such as video with audio).&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism focus intensely and exclusively on one perceptual channel at a time.  When focusing on one point or area of the display, events away from this spatial focus of attention may not register.  Anathema for a person with autism would be a cockpit display with many gauges indicating different quantities which all need to be observed simultaneously -- or a visual display that needs to be observed at the same time as a spoken or other auditory signal.  (Background music is okay because it doesn&amp;#039;t need to be attended; players can just let it go on whilst they focus on the visual display.)  Instead, either information should be displayed in one region of the display or one sensory channel, or ample time should be allowed to shift attention between points in visual space or between sensory channels.  Shifts of attention can take 2 to 3 seconds for people with autism, whereas people without autism take 0.2 to 0.3 seconds.  Think about what it would be like to be looking at the display through a long telescope that magnifies a small area but shuts out the periphery.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid evoking unnecessary anxiety.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism are &amp;#039;&amp;#039;&amp;#039;much&amp;#039;&amp;#039;&amp;#039; more prone to anxiety than people without autism -- especially when faced with a new and unpractised task, or with a timed task, or with an interactive situation that&amp;#039;s out of their control.  (See entries above on avoiding timed events and giving prompting, pictures, and practice.)  Do everything possible to make certain that the player, not the computer, is the one controlling what happens next, and that the player has every opportunity to practise and to become comfortable with the demands of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Maintain a consistent mapping between user inputs and game functionality; eschew a confusing multiplicity of modes.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
People with autism work best with predictable relationships between action and reaction, that do not change.  A large number of game modes can overtax a player&amp;#039;s short-term memory:  What does this button do at this moment?&amp;quot;  On this screen should I speak my answer, or type it?  Instead of trying to make the game do everything, by partitioning it into many modes, try insofar as is possible to flatten the design so that all functions and modalities appear side by side and simultaneously -- so that it&amp;#039;s up to the player, rather than the computer, at any given juncture to choose how to play.  For instance, in a game in which input can be manual or vocal, do not separate these two input modalities into different game phases.  Instead, accept both input modalities on one and the same game screen.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For repeating events, vary the timing slightly so that the time between two successive instances of the event is not constant.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This consideration actually isn&amp;#039;t about accommodating people with autism; rather, it&amp;#039;s about accommodating EEG analysis.  Those of you who know something about signal processing will be familiar with the phenomenon of &amp;#039;&amp;#039;&amp;#039;aliasing&amp;#039;&amp;#039;&amp;#039; in which a discrete sampling of a high-frequency signal at too low a sampling rate produces an artefactual low-frequency oscillation.  The problem here has a lot in common with aliasing.  Consider as an example the situation that exists when the firing button is pressed and held: the weapons will fire at a certain rate, say, once every 500 ms.  Suppose that we&amp;#039;re interested in the brain response to the combined auditory and visual effects associated with weapons firing.  Suppose also, though, that there is an ongoing, endogenous (that is, internally driven) 10 hz oscillation in the player&amp;#039;s brain that has nothing to do with these exogenous stimuli.  Since 500 ms is an integral multiple of the 100 ms period of this oscillation, when we sample the exogenous brain response to each weapons firing we&amp;#039;re going to end up also sampling the endogenous oscillation at the same point in its phase every time, and we will thus misattribute the endogenous signal as an exogenous response to the weapons firing.  To forestall this ambiguity in EEG analysis, we can add a small amount of temporal jitter to the intervals between firings - not so much as to make them seem unnaturally jittery to the player, but enough to get rid of this phase artefact.  The exact amount depends on what seems natural given the event separation; in this example of a 500 ms event we might deem that any variation more than 10% of the interval in either direction would seem unnatural, so we might then choose to vary the intervals over a uniform distribution from 450 ms to 550 ms.  Given the frequencies of the signals in which we&amp;#039;re interested, it isn&amp;#039;t ever necessary to add more than 150 ms (that is, 75 ms in either direction) of temporal jitter.  Add as much temporal jitter as you can, up to this 150 ms limit - but don&amp;#039;t sacrifice playability.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Log event codes for everything - absolutely everything.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This is another consideration for EEG analysis.  Did the weapons just fire (even though the firing key is being held down constantly)?  That&amp;#039;s an event.  Did some sort of motion start or stop or change speed?  That&amp;#039;s an event.  Absolutely everything that happens in the game should be reported with an event code.  (See &amp;quot;Game/Engine/Logger.cs&amp;quot;.)  We can always ignore event codes if we decide that they aren&amp;#039;t of interest in our analysis.  What we can&amp;#039;t do is go back and insert event codes after the data have been recorded.  So put everything in.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;SEE ALSO&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
http://www.gamasutra.com/view/feature/3538/designing_games_that_are_.php&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Designing Games that are Accessible to Everyone&amp;quot; by Eitan Glinert&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=629</id>
		<title>Data analysis - StarJack</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=629"/>
				<updated>2011-10-16T18:39:59Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: Added a link to Brefczynski-Lewis et al. (2011) on ERP responses to others&amp;#039; blinks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The game begins with unparameterised SJ_START (1) and ends with SJ_END (19) followed by SJ_ENDSCREEN_CONTINUE (7).  The game also is considered to have ended if the begin code for any other mini-game occurs. The game comprises multiple iterations of three phases: the maze task (which can be used as a measure of executive function), the Embedded Figures Test (where reaction times measure perceptual disembedding), and the &amp;quot;Sally-Anne&amp;quot; test of theory-of-mind.&lt;br /&gt;
&lt;br /&gt;
Each level of the maze task begins with parameterised SJ_START (2) and ends with parameterised SJ_END (19).  Each level of the maze task is interrupted by invocations of the Embedded Figures Test, and punctuated by an invocation of the Sally-Anne test.  These latter two tests also can be invoked directly from the menu, without going through the maze test.&lt;br /&gt;
&lt;br /&gt;
The Embedded Figures Test begins with SJ_EFT_START (49) and ends with SJ_EFT_END_FAIL (44) or SJ_EFT_END_SUCCESS (50).&lt;br /&gt;
&lt;br /&gt;
The Sally-Anne test begins with SJ_SAT_START (52) and ends with SJ_SAT_END (53).&lt;br /&gt;
&lt;br /&gt;
Following is a list of all the event codes, then a summary of the relevant behavioural and electrophysiological derived measures to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Event codes (see &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/EventCode.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Screen/SallyAnneScreen.cs&amp;lt;/tt&amp;gt;),&amp;lt;br&amp;gt;&amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/HackingPhase/HackingPhaseScreen.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Dungeon/DungeonScreen.cs&amp;lt;/tt&amp;gt;&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The game has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level_&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;|tutorialLevel Room=Room_&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has entered a new maze level.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;Note that distinct numeric event codes (1 and 2) but one and the same string event descriptor (SJ_START) is used to denote the start of the game as a whole and to denote the start of an individual level of the maze within the game.  The difference is the presence or absence of the parameters.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_MouseClick&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_ENDSCREEN_CONTINUE&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to continue past the game end screen, exiting the game.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;(Note same numeric code as SJ_MENU_INPUT_MouseClick above.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Maze Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	9&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_Start&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has activated the invisibility cloak.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_End&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s invisibility cloak has deactivated on reaching the end of its allowed time.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_TrapPlaced&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has set a trap for the guards.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	12&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_GuardTrapped&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A trap previously set by the player has captured a guard.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Caught_TeleportToStart&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has been seen and caught by a guard or a camera, and teleports back to the starting position.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Esc&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the ESCAPE key to pause the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	15&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_Enter&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the enter key to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	19&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_END&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has reached the end of the current level.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	23&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Up&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the up-arrow to move up.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	24&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Down&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the down-arrow to move down.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	25&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Right&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the right-arrow to move right.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	26&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the left-arrow to move left.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	33&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Interact&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player is interacting with an object or entity.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	34&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_LeftClick&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the left mouse button at the given display coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Embedded Figures Test Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	38&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_Stimulus_Presented&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Key=Key&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt; Figure=Figure&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has been presented with a pair comprising a complex search figure and a smaller search target.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	39&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_HIT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	40&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_REJECT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	41&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_FALSE_ALARM&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	42&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_MISS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	44&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_FAIL&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has given incorrect responses on three trials, ending the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	46&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_NoMatch&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target does not occur within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	47&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Match&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target occurs within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	48&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Proceed&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has started a trial within the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	49&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_START&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The Embedded Figures Test has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	50&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_SUCCESS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has completed the Embedded Figures Test with fewer than three incorrect responses.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Theory-of-Mind Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	52&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	53&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_END&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has ended, after feedback has been given to the player.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	55&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_Video_Stop&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The currently active video has ended, and the player is being prompted to have it repeated or to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;See details of the &amp;lt;A HREF=&amp;quot;http://www.AutismCollaborative.org/wiki_aux/SJ_SAT_video_timecodes.txt&amp;quot;&amp;gt;video event timings&amp;lt;/i&amp;gt;.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	56&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	IGNORE (VideoReplay)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	(This code should not be being transcribed onto the parallel port and thus should not be appearing in the EEG log.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	58&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Continue&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the space bar, signalling readiness to view the next video stimulus.&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;(This same numeric code also can appear with the notation &amp;quot;IGNORE&amp;quot; in which case it should not be being transcribed to the parallel port and this should not be appearing in the EEG log.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	59&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_CargoDrop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the friendly space captain depositing the cargo on one of the planets has started.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	60&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Drop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate depositing the cargo on another planet has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always differ from that of the previous SJ_SAT_VideoStart_Pirate_Theft.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	61&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s theft of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	62&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s scan (but no theft) of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	64&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Top&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the up-arrow key, indicating a course to the TOP planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	65&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Bottom&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the down-arrow key, indicating a course to the BOTTOM planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	66&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the left-arrow key, indicating a course to the LEFT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	67&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Right&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the right-arrow key, indicating a course to the RIGHT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred (probability 1/3), the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has correctly indicated the planet on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 68, also is used by SJ_SAT_FirstOrder_NoTheft_Incorrect below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Incorrect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has indicated a planet other than that on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 68, is incorrect and ought to be 69.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo (probability 1/3), and reports this information to the captain, the player&amp;#039;s correct response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) actually indicates higher-order theory-of-mind: the captain believes that the pirate believes that the captain believes that the cargo remains in the planet where the captain had originally cached it, thus the player&amp;#039;s answer indicating the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop and SJ_SAT_VideoStart_Cruiser_View_Theft is correct.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 70, is incorrect and ought to be 73.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain) (probability 1/3), the player has correctly responded to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating that the captain will go to the planet on which she originally cached the cargo &amp;amp;mdash; that is, the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 70, also is used by SJ_SAT_FirstOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	71&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the true location of the cargo rather than the location believed by the captain.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	72&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	74&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectFakeLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the captain&amp;#039;s original hiding place (as though the admiral had not reported to the captain the pirate&amp;#039;s new hiding place).&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	75&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded correctly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the planet on which the captain cached the cargo.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 76, also is used by SJ_SAT_SecondOrder_NoTheft_&amp;lt;u&amp;gt;In&amp;lt;/u&amp;gt;correct below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the three planets that did &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; harbour the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 76, is incorrect and ought to be 77.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (incorrectly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 78, is incorrect and ought to be 81.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (correctly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 78, also is used by SJ_SAT_SecondOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	79&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (correctly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	82&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (incorrectly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	83&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	n the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	84&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Question_Presented&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Question_Presented&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	After the explanatory text (&amp;quot;The captain wants to pick up the cargo. She will steer her ship to the planet where she thinks the cargo is. The pirate wants to find the captain. He will steer his ship to wherever he thinks the captain will go.&amp;quot;), the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) or the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) has just been asked.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the same numeric event code, 84, is used for both SJ_SAT_FirstOrder_Question_Presented and SJ_SAT_SecondOrder_Question_Presented.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the admiral&amp;#039;s viewing of the theft has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 85, is incorrect and ought to be 86.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_NoScan&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate has stolen and re-cached the cargo, and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain, the video showing only noise and interference on the admiral&amp;#039;s viewscreen has started.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 85, also is used by SJ_SAT_VideoStart_Cruiser_View_Theft above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	87&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the video showing the admiral&amp;#039;s view of the pirate&amp;#039;s scanning but not stealing the cargo has started.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After deletion of codes 255 and greater, and alignment of the behavioural and EEG event sequences just as was done for Maritime Defender, processing should continue by correcting (both in the behavioural log file and in the EEG log file) the numeric event codes that are associated with the following string event descriptors in the behavioural log file (see notes in the table above):&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_FirstOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_FirstOrder_Scan_Correct&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Scan_Correct&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Question_Presented&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_VideoStart_Cruiser_View_Theft&lt;br /&gt;
&lt;br /&gt;
SJ_EFT_INPUT_Match and SJ_EFT_INPUT_NoMatch events should be re-coded as context-free events based on the success flags (SJ_EFT_HIT, SJ_EFT_REJECT, SJ_EFT_FALSE_ALARM, SJ_EFT_MISS) that follow each of them.  The success flags themselves then can be deleted, as they do not mark any actual events distinct from the SJ_EFT_INPUT_Match SJ_EFT_INPUT_NoMatch that they follow.&lt;br /&gt;
&lt;br /&gt;
Similarly, SJ_SAT_INPUT_Response_{Top, Bottom, Left, Right} events should be re-coded as context-free events based on the success flags (SJ_SAT_FirstOrder_{*} and SJ_SAT_SecondOrder_{*}).  In the re-coded events, both the four possible locations of the response (Top, Bottom, Left, Right) and the four possible correctness conditions of the response (Correct, IncorrectTrueLocation, IncorrectFakeLocation, IncorrectOtherLocation) should be preserved, thus there will be 4x4 = 16 possible codes.  The success flags themselves then can be deleted, as they do not mark any actual events distinct from the SJ_SAT_INPUT_Response_{*} events that they follow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to executive function&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
As simple behavioural measures of executive function, the software can compute - for each level separately and for all levels cumulatively - the total number of moves, the total time elapsed from start to finish (excluding time spent in EFT and SAT subtests), and the mean and standard deviation of the time between successive moves.  Other measures are possible; if you think of one, try it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to perceptual disembedding&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
d&amp;#039; (&amp;quot;d prime&amp;quot;) should be computed from tallies of EFT hits, misses, false alarms and correct rejections.  If the tally for any one of these four categories of responses is zero, that tally can be changed to 1 so as to estimate d&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Mean and standard deviation of EFT reaction time, for correct responses only, should be computed.  Also list out the single-trial reaction times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to theory-of-mind&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Single-trial data should be extracted and listed out for first-order and second-order questions in all trials.  Three types of trials exist: the first-order control condition in which the pirate scans but does not steal the cargo (probability 1/3, and note that in this case it doesn&amp;#039;t matter whether or not the admiral observes the pirate; the observed and unobserved cases can be collapsed into a single bin), the first-order theory-of-mind conditions in which the pirate steals the cargo but is not observed by the admiral (probability 1/3), and the second-order theory-of-mind condition in which the pirate steals the cargo but the admiral observes this theft and tells the captain (probability 1/3).  The single-trial data should be listed first for the no-theft condition, then separately for the unobserved theft condition, then separately for the observed theft condition.  The data for each trial comprise three timings and two correctness values: the time taken for the whole trial (SJ_SAT_END minus SJ_SAT_START), the reaction time for response to the first-order question (SJ_SAT_INPUT_Response_{*} minus SJ_SAT_FirstOrder_Question_Presented) and the correctness condition (Correct, IncorrectTrueLocation, IncorrectFakeLocation, IncorrectOtherLocation) of that response, and the reaction time for response to the second-order question (SJ_SAT_INPUT_Response_{*} minus SJ_SAT_SecondOrder_Question_Presented) and the correctness condition of that response.&lt;br /&gt;
&lt;br /&gt;
Summaries of correctness conditions for each of the two question types (first order, second order) for each of the three theft conditions (no theft, unobserved theft, observed theft) should be given both as tallies and as percentages.&lt;br /&gt;
&lt;br /&gt;
For correct responses only, means and standard deviations (where computable) should be given for the following reaction-time differences:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;First-order question:&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus No Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus Observed Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus (No Theft or Observed Theft, pooled)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Second-order question:&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus Unobserved Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus No Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus (Unobserved Theft or No Theft, pooled)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Independent Components Analysis&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
ICA can be applied separately to epochs from the Embedded Figures Test, epochs from the Sally-Anne test, and perhaps continuous EEG for the maze task.&lt;br /&gt;
&lt;br /&gt;
Remember not to include the skin-conductance channel (the greatest-numbered channel) in the ICA!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to perceptual disembedding&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Standard ERP and ERSP analyses can be constructed round the SJ_EFT_Stimulus_Presented event and corresponding SJ_EFT_INPUT_{*} response events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to theory-of-mind&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Some possible fMRI-based contrasts:&lt;br /&gt;
&lt;br /&gt;
Gaze perception (blink events or gaze aversion intervals versus direct gaze intervals)&amp;lt;br&amp;gt;&lt;br /&gt;
See the timecodes file linked from the SAT_SJ_Video_Stop event in the table above.  See also &amp;lt;A HREF=&amp;quot;http://dx.doi.org/10.3389/fnhum.2011.00068&amp;quot;&amp;gt;Brefczynski-Lewis et al. on ERP response to a social partner&amp;#039;s blinks&amp;lt;/A&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Facial expression perception (scowl intervals versus neutral intervals)&lt;br /&gt;
&lt;br /&gt;
Scene perception (egocentric view of person&amp;#039;s face, versus allocentric view of person&amp;#039;s hands on console, versus external view of spaceships)&lt;br /&gt;
&lt;br /&gt;
Perception of body movements (hands) or gestures (nods)&lt;br /&gt;
&lt;br /&gt;
Also note that, because these stimuli are cinematic, useful information can be gleaned from applying Uri Hasson&amp;#039;s approach of correlating individual subjects&amp;#039; voxelwise activation time series against the group mean.  This model-free procedure can identidy consistent activations, localised temporally and anatomically, across subjects.  The timings of such consistent activities then can be correlated with the video timecodes (see link in the table above).&lt;br /&gt;
&lt;br /&gt;
It may be useful to contrast fMRI time series during the video stimuli analogous to the behavioural (reaction-time) contrasts detailed above - that is, Unobserved Theft minus No Theft, Unobserved Theft minus Observed Theft, and so forth.  (For a list of specific contrasts, see the behavioural section above.)&lt;br /&gt;
&lt;br /&gt;
For EEG analyses, given the temporally extended nature of these stimuli spectral and other quantitative-EEG methods may be more appropriate than ERP&amp;#039;s.&lt;br /&gt;
&lt;br /&gt;
For background on cognitive electrophysiology of theory-of-mind, see &amp;lt;A HREF=&amp;quot;http://dx.doi.org/10.1523/JNEUROSCI.1392-11.2011&amp;quot;&amp;gt;McCleery et al., &amp;quot;The Neural and Cognitive Time Course of Theory of Mind&amp;quot;, &amp;lt;i&amp;gt;Journal of Neuroscience,&amp;lt;/i&amp;gt; 7 September 2011, 31(36):12849-12854&amp;lt;/A&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to executive function&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Here again, quantitative-EEG methods may be most appropriate.  In addition, specific time-locked events may generate specific ERP&amp;#039;s of interest, for example error-related negativity on SJ_INPUT_Move_{*} events that immediately precede SJ_Caught_TeleportToStart events.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=628</id>
		<title>Data analysis - StarJack</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=628"/>
				<updated>2011-09-08T04:51:54Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added reference to McCleery et al. on theory-of-mind&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The game begins with unparameterised SJ_START (1) and ends with SJ_END (19) followed by SJ_ENDSCREEN_CONTINUE (7).  The game also is considered to have ended if the begin code for any other mini-game occurs. The game comprises multiple iterations of three phases: the maze task (which can be used as a measure of executive function), the Embedded Figures Test (where reaction times measure perceptual disembedding), and the &amp;quot;Sally-Anne&amp;quot; test of theory-of-mind.&lt;br /&gt;
&lt;br /&gt;
Each level of the maze task begins with parameterised SJ_START (2) and ends with parameterised SJ_END (19).  Each level of the maze task is interrupted by invocations of the Embedded Figures Test, and punctuated by an invocation of the Sally-Anne test.  These latter two tests also can be invoked directly from the menu, without going through the maze test.&lt;br /&gt;
&lt;br /&gt;
The Embedded Figures Test begins with SJ_EFT_START (49) and ends with SJ_EFT_END_FAIL (44) or SJ_EFT_END_SUCCESS (50).&lt;br /&gt;
&lt;br /&gt;
The Sally-Anne test begins with SJ_SAT_START (52) and ends with SJ_SAT_END (53).&lt;br /&gt;
&lt;br /&gt;
Following is a list of all the event codes, then a summary of the relevant behavioural and electrophysiological derived measures to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Event codes (see &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/EventCode.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Screen/SallyAnneScreen.cs&amp;lt;/tt&amp;gt;),&amp;lt;br&amp;gt;&amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/HackingPhase/HackingPhaseScreen.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Dungeon/DungeonScreen.cs&amp;lt;/tt&amp;gt;&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The game has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level_&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;|tutorialLevel Room=Room_&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has entered a new maze level.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;Note that distinct numeric event codes (1 and 2) but one and the same string event descriptor (SJ_START) is used to denote the start of the game as a whole and to denote the start of an individual level of the maze within the game.  The difference is the presence or absence of the parameters.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_MouseClick&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_ENDSCREEN_CONTINUE&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to continue past the game end screen, exiting the game.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;(Note same numeric code as SJ_MENU_INPUT_MouseClick above.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Maze Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	9&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_Start&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has activated the invisibility cloak.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_End&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s invisibility cloak has deactivated on reaching the end of its allowed time.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_TrapPlaced&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has set a trap for the guards.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	12&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_GuardTrapped&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A trap previously set by the player has captured a guard.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Caught_TeleportToStart&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has been seen and caught by a guard or a camera, and teleports back to the starting position.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Esc&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the ESCAPE key to pause the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	15&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_Enter&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the enter key to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	19&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_END&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has reached the end of the current level.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	23&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Up&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the up-arrow to move up.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	24&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Down&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the down-arrow to move down.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	25&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Right&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the right-arrow to move right.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	26&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the left-arrow to move left.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	33&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Interact&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player is interacting with an object or entity.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	34&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_LeftClick&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the left mouse button at the given display coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Embedded Figures Test Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	38&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_Stimulus_Presented&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Key=Key&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt; Figure=Figure&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has been presented with a pair comprising a complex search figure and a smaller search target.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	39&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_HIT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	40&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_REJECT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	41&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_FALSE_ALARM&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	42&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_MISS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	44&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_FAIL&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has given incorrect responses on three trials, ending the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	46&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_NoMatch&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target does not occur within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	47&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Match&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target occurs within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	48&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Proceed&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has started a trial within the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	49&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_START&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The Embedded Figures Test has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	50&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_SUCCESS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has completed the Embedded Figures Test with fewer than three incorrect responses.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Theory-of-Mind Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	52&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	53&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_END&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has ended, after feedback has been given to the player.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	55&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_Video_Stop&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The currently active video has ended, and the player is being prompted to have it repeated or to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;See details of the &amp;lt;A HREF=&amp;quot;http://www.AutismCollaborative.org/wiki_aux/SJ_SAT_video_timecodes.txt&amp;quot;&amp;gt;video event timings&amp;lt;/i&amp;gt;.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	56&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	IGNORE (VideoReplay)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	(This code should not be being transcribed onto the parallel port and thus should not be appearing in the EEG log.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	58&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Continue&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the space bar, signalling readiness to view the next video stimulus.&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;(This same numeric code also can appear with the notation &amp;quot;IGNORE&amp;quot; in which case it should not be being transcribed to the parallel port and this should not be appearing in the EEG log.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	59&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_CargoDrop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the friendly space captain depositing the cargo on one of the planets has started.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	60&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Drop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate depositing the cargo on another planet has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always differ from that of the previous SJ_SAT_VideoStart_Pirate_Theft.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	61&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s theft of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	62&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s scan (but no theft) of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	64&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Top&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the up-arrow key, indicating a course to the TOP planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	65&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Bottom&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the down-arrow key, indicating a course to the BOTTOM planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	66&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the left-arrow key, indicating a course to the LEFT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	67&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Right&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the right-arrow key, indicating a course to the RIGHT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred (probability 1/3), the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has correctly indicated the planet on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 68, also is used by SJ_SAT_FirstOrder_NoTheft_Incorrect below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Incorrect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has indicated a planet other than that on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 68, is incorrect and ought to be 69.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo (probability 1/3), and reports this information to the captain, the player&amp;#039;s correct response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) actually indicates higher-order theory-of-mind: the captain believes that the pirate believes that the captain believes that the cargo remains in the planet where the captain had originally cached it, thus the player&amp;#039;s answer indicating the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop and SJ_SAT_VideoStart_Cruiser_View_Theft is correct.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 70, is incorrect and ought to be 73.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain) (probability 1/3), the player has correctly responded to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating that the captain will go to the planet on which she originally cached the cargo &amp;amp;mdash; that is, the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 70, also is used by SJ_SAT_FirstOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	71&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the true location of the cargo rather than the location believed by the captain.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	72&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	74&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectFakeLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the captain&amp;#039;s original hiding place (as though the admiral had not reported to the captain the pirate&amp;#039;s new hiding place).&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	75&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded correctly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the planet on which the captain cached the cargo.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 76, also is used by SJ_SAT_SecondOrder_NoTheft_&amp;lt;u&amp;gt;In&amp;lt;/u&amp;gt;correct below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the three planets that did &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; harbour the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 76, is incorrect and ought to be 77.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (incorrectly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 78, is incorrect and ought to be 81.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (correctly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 78, also is used by SJ_SAT_SecondOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	79&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (correctly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	82&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (incorrectly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	83&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	n the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	84&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Question_Presented&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Question_Presented&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	After the explanatory text (&amp;quot;The captain wants to pick up the cargo. She will steer her ship to the planet where she thinks the cargo is. The pirate wants to find the captain. He will steer his ship to wherever he thinks the captain will go.&amp;quot;), the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) or the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) has just been asked.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the same numeric event code, 84, is used for both SJ_SAT_FirstOrder_Question_Presented and SJ_SAT_SecondOrder_Question_Presented.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the admiral&amp;#039;s viewing of the theft has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 85, is incorrect and ought to be 86.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_NoScan&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate has stolen and re-cached the cargo, and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain, the video showing only noise and interference on the admiral&amp;#039;s viewscreen has started.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 85, also is used by SJ_SAT_VideoStart_Cruiser_View_Theft above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	87&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the video showing the admiral&amp;#039;s view of the pirate&amp;#039;s scanning but not stealing the cargo has started.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After deletion of codes 255 and greater, and alignment of the behavioural and EEG event sequences just as was done for Maritime Defender, processing should continue by correcting (both in the behavioural log file and in the EEG log file) the numeric event codes that are associated with the following string event descriptors in the behavioural log file (see notes in the table above):&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_FirstOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_FirstOrder_Scan_Correct&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Scan_Correct&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Question_Presented&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_VideoStart_Cruiser_View_Theft&lt;br /&gt;
&lt;br /&gt;
SJ_EFT_INPUT_Match and SJ_EFT_INPUT_NoMatch events should be re-coded as context-free events based on the success flags (SJ_EFT_HIT, SJ_EFT_REJECT, SJ_EFT_FALSE_ALARM, SJ_EFT_MISS) that follow each of them.  The success flags themselves then can be deleted, as they do not mark any actual events distinct from the SJ_EFT_INPUT_Match SJ_EFT_INPUT_NoMatch that they follow.&lt;br /&gt;
&lt;br /&gt;
Similarly, SJ_SAT_INPUT_Response_{Top, Bottom, Left, Right} events should be re-coded as context-free events based on the success flags (SJ_SAT_FirstOrder_{*} and SJ_SAT_SecondOrder_{*}).  In the re-coded events, both the four possible locations of the response (Top, Bottom, Left, Right) and the four possible correctness conditions of the response (Correct, IncorrectTrueLocation, IncorrectFakeLocation, IncorrectOtherLocation) should be preserved, thus there will be 4x4 = 16 possible codes.  The success flags themselves then can be deleted, as they do not mark any actual events distinct from the SJ_SAT_INPUT_Response_{*} events that they follow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to executive function&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
As simple behavioural measures of executive function, the software can compute - for each level separately and for all levels cumulatively - the total number of moves, the total time elapsed from start to finish (excluding time spent in EFT and SAT subtests), and the mean and standard deviation of the time between successive moves.  Other measures are possible; if you think of one, try it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to perceptual disembedding&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
d&amp;#039; (&amp;quot;d prime&amp;quot;) should be computed from tallies of EFT hits, misses, false alarms and correct rejections.  If the tally for any one of these four categories of responses is zero, that tally can be changed to 1 so as to estimate d&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Mean and standard deviation of EFT reaction time, for correct responses only, should be computed.  Also list out the single-trial reaction times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to theory-of-mind&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Single-trial data should be extracted and listed out for first-order and second-order questions in all trials.  Three types of trials exist: the first-order control condition in which the pirate scans but does not steal the cargo (probability 1/3, and note that in this case it doesn&amp;#039;t matter whether or not the admiral observes the pirate; the observed and unobserved cases can be collapsed into a single bin), the first-order theory-of-mind conditions in which the pirate steals the cargo but is not observed by the admiral (probability 1/3), and the second-order theory-of-mind condition in which the pirate steals the cargo but the admiral observes this theft and tells the captain (probability 1/3).  The single-trial data should be listed first for the no-theft condition, then separately for the unobserved theft condition, then separately for the observed theft condition.  The data for each trial comprise three timings and two correctness values: the time taken for the whole trial (SJ_SAT_END minus SJ_SAT_START), the reaction time for response to the first-order question (SJ_SAT_INPUT_Response_{*} minus SJ_SAT_FirstOrder_Question_Presented) and the correctness condition (Correct, IncorrectTrueLocation, IncorrectFakeLocation, IncorrectOtherLocation) of that response, and the reaction time for response to the second-order question (SJ_SAT_INPUT_Response_{*} minus SJ_SAT_SecondOrder_Question_Presented) and the correctness condition of that response.&lt;br /&gt;
&lt;br /&gt;
Summaries of correctness conditions for each of the two question types (first order, second order) for each of the three theft conditions (no theft, unobserved theft, observed theft) should be given both as tallies and as percentages.&lt;br /&gt;
&lt;br /&gt;
For correct responses only, means and standard deviations (where computable) should be given for the following reaction-time differences:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;First-order question:&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus No Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus Observed Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus (No Theft or Observed Theft, pooled)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Second-order question:&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus Unobserved Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus No Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus (Unobserved Theft or No Theft, pooled)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Independent Components Analysis&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
ICA can be applied separately to epochs from the Embedded Figures Test, epochs from the Sally-Anne test, and perhaps continuous EEG for the maze task.&lt;br /&gt;
&lt;br /&gt;
Remember not to include the skin-conductance channel (the greatest-numbered channel) in the ICA!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to perceptual disembedding&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Standard ERP and ERSP analyses can be constructed round the SJ_EFT_Stimulus_Presented event and corresponding SJ_EFT_INPUT_{*} response events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to theory-of-mind&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Some possible fMRI-based contrasts:&lt;br /&gt;
&lt;br /&gt;
Gaze perception (blink events or gaze aversion intervals versus direct gaze intervals)&lt;br /&gt;
&lt;br /&gt;
Facial expression perception (scowl intervals versus neutral intervals)&lt;br /&gt;
&lt;br /&gt;
Scene perception (egocentric view of person&amp;#039;s face, versus allocentric view of person&amp;#039;s hands on console, versus external view of spaceships)&lt;br /&gt;
&lt;br /&gt;
Perception of body movements (hands) or gestures (nods)&lt;br /&gt;
&lt;br /&gt;
Also note that, because these stimuli are cinematic, useful information can be gleaned from applying Uri Hasson&amp;#039;s approach of correlating individual subjects&amp;#039; voxelwise activation time series against the group mean.  This model-free procedure can identidy consistent activations, localised temporally and anatomically, across subjects.  The timings of such consistent activities then can be correlated with the video timecodes (see link in the table above).&lt;br /&gt;
&lt;br /&gt;
It may be useful to contrast fMRI time series during the video stimuli analogous to the behavioural (reaction-time) contrasts detailed above - that is, Unobserved Theft minus No Theft, Unobserved Theft minus Observed Theft, and so forth.  (For a list of specific contrasts, see the behavioural section above.)&lt;br /&gt;
&lt;br /&gt;
For EEG analyses, given the temporally extended nature of these stimuli spectral and other quantitative-EEG methods may be more appropriate than ERP&amp;#039;s.&lt;br /&gt;
&lt;br /&gt;
For background on cognitive electrophysiology of theory-of-mind, see &amp;lt;A HREF=&amp;quot;http://dx.doi.org/10.1523/JNEUROSCI.1392-11.2011&amp;quot;&amp;gt;McCleery et al., &amp;quot;The Neural and Cognitive Time Course of Theory of Mind&amp;quot;, &amp;lt;i&amp;gt;Journal of Neuroscience,&amp;lt;/i&amp;gt; 7 September 2011, 31(36):12849-12854&amp;lt;/A&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to executive function&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Here again, quantitative-EEG methods may be most appropriate.  In addition, specific time-locked events may generate specific ERP&amp;#039;s of interest, for example error-related negativity on SJ_INPUT_Move_{*} events that immediately precede SJ_Caught_TeleportToStart events.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Maritime_Defender&amp;diff=627</id>
		<title>Data analysis - Maritime Defender</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Maritime_Defender&amp;diff=627"/>
				<updated>2011-09-05T10:52:56Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added details on extracting the motion coherence threshold from the behavioural log file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Maritime Defender&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The game begins with MD_MaritimeDefenderGameBegin (41) and ends with MD_DotCoherenceEstimate (6).  The game also is considered to have ended if the begin code for any other mini-game occurs.  The game comprises multiple iterations of two phases, the shooter phase (testing go/no-go inhibition) and the navigation phase (testing motion coherence perception).  The shooter phase begins with MD_ShooterPhaseBegin (13) and ends with either MD_DotPhaseBegin (1) or MD_BossPhaseBegin (32).  The navigation phase begins with MD_DotPhaseBegin (1) and ends with either MD_ShooterPhaseBegin (13) or MD_BossPhaseBegin (32).  Any phase also can be terminated with an End_of_log (0) code, which appears in the behavioural log file but not in the EEG log file.  Following is a list of all the event codes, then a summary of the relevant behavioural and electrophysiological derived measures to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotPhaseBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The navigation phase (comprising many motion coherence trials) of the game has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	One individual motion coherence trial (within the navigation phase) has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	3&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialExpire&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A motion coherence trial has timed out without any behavioural response&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	4&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialUserRespondLeft&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the left arrow during a motion coherence trial&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialUserRespondRight&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the right arrow during a motion coherence trial&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	6&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotCoherenceEstimate&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	At the end of a navigation phase, the maximum-likelihood estimator has recalculated the psychophysical perceptual threshold for motion coherence&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierTestBegin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	At the beginning of the game, the friend-or-foe ship identifier dialogue has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	8&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierSelectLeft&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the friend-or-foe ship identifier dialogue, the player has pressed the left arrow&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	9&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierSelectRight&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the friend-or-foe ship identifier dialogue, the player has pressed the right arrow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierConfirmSelection&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the friend-or-foe ship identifier dialogue, the player has pressed the return key to confirm their selection&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierTestEndSuccess&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player&amp;#039;s response in the friend-or-foe ship identifier dialogue is correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	12&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierTestEndFailure&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player&amp;#039;s response in the friend-or-foe ship identifier dialogue is incorrect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPhaseBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The shooter phase (comprising many go/no-go trials) of the game has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateOpenWormholeBeam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the up-arrow to activate the wormhole-opener beam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	15&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseOpenWormholeBeam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the up-arrow to cease the wormhole-opener beam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	16&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterOpenWormholeSuccess&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the wormhole-opener beam has opened the wormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	17&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateMovePort&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the left-arrow to begin moving clockwise&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	18&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseMovePort&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the left-arrow to cease moving clockwise&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	19&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateMoveStarboard&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the right-arrow key to begin moving anticlockwise&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	20&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseMoveStarboard&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the right-arrow key to cease moving anticlockwise&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	21&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPresentFriendly&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a friendly ship has emerged from an opened wormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	22&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPresentEnemy&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a hostile ship has emerged from an opened wormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	23&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPresentWormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a wormhole has appeared&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	24&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateFireWeapon&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the space bar to begin firing&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	25&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseFireWeapon&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the space bar to cease firing&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	26&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPlayerWeaponFired&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the weapon has fired (Multiple WeaponFired events can occur between an ActivateFireWeapon and a CeaseFireWeapon, as the space bar is held down for continuous fire)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	27&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterEnemyWeaponFired&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a hostile ship has fired at the player&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	28&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCollectibleSpawned&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a collectible has emerged from a destroyed asteroid or from a friendly ship&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	29&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPlayerCollectibleCollision&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player&amp;#039;s ship has picked up a collectible&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	30&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterMeteorExplosion&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, an asteroid has exploded&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	31&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPlayerGetsHit&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player&amp;#039;s ship has been hit by hostile fire or by an asteroid&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	32&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_BossPhaseBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The &amp;#039;boss phase&amp;#039; has begun - no scientifically important events here, just entertainment and reward for completing the level&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	33&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_GameSuccess&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	&amp;lt;b&amp;gt;The player has successfully completed the boss phase, beating the game&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	34&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_GameFailure&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	&amp;lt;b&amp;gt;During any game phase (shooter, navigation, or boss), the player&amp;#039;s last of three ships has been destroyed, losing the game&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	35&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DialogSkip&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has skipped a dialogue&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	36&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_MenuSelect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has selected an item in the menu&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	37&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_MenuCancel&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has cancelled the menu&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	38&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Pause&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has paused the game&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	39&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Unpause&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has unpaused the game&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	40&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_OpenConsole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has opened the console&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	41&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_MaritimeDefenderGameBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	&amp;lt;b&amp;gt;The game has begun&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	42&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_CockpitDamageFeedback&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the navigation phase, the cockpit shakes, indicating damage and loss of energy, following a non-response or an incorrect response&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	43&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_TutorialStart&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The optional tutorial has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	44&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	This and the next several codes define the times of entry into the tutorial&amp;#039;s several successive sections:&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	45&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	46&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	47&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section4&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	48&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section5&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	49&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	50&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	51&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section8&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	52&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section9&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	53&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	54&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	55&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	56&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	57&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	58&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	59&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section16&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	60&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_TutorialEnd&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The tutorial has ended&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The processing software should delete all existing event codes greater than or equal to 255.  These codes are inserted by the BioSemi EEG recording hardware and are not needed.&lt;br /&gt;
&lt;br /&gt;
The processing software then must align (both by sequence and by specific temporal offset) the event codes in the EEG record with the event codes in the game log.  The game log is the master copy of the event codes; codes transmitted to the EEG recorder can sometimes be erroneously dropped or, more rarely, erroneously replicated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that because of the rapid play in Maritime Defender in particular, events may occur in bursts.  This is particularly true of events MD_ShooterCollectibleCollision (29) and MD_ShooterMeteorExplosion (30).  These bursts may overwhelm the parallel port&amp;#039;s ability to transmit event codes, as each tranmission takes 5ms plus reset time.  In case alignment is not possible during these rapid bursts (series of N events all of which occur within N*5ms of each other), the first event in the series can be preserved and the subsequent events deleted, or given some alternative event code that would flag that these events are uncertain in their temporal localisation and therefore not to be used to time-lock ERPs.  This is a fine strategy, as stimuli occurring closer together than 5ms are, for all intents and purposes, a single stimulus anyway.  So by preserving only the first event in the rapid series, we mark the onset time of this single, aggregate stimulus.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lastly, the processing software must translate context-sensitive event codes (for example, a stimulus, contextualised by either an incorrect behavioural response or a correct behavioural response following) into context-free event codes as detailed below.  Events that already are context-free should simply be transcribed as is.  All events - both those that are being translated and those that are being transcribed - should be renumbered so that their codes are greater than 255 and in a range dedicated to each mini-game separately.  This constraint could be implemented, for example, by adding 1000 to the transcribed event codes for Maritime Defender, adding 2000 to those for Stellar Prospector, and so on, creating a separate, non-overlapping range of event codes for each mini-game.&lt;br /&gt;
&lt;br /&gt;
These event code translations, and all derived behavioural data as detailed below, should be integrated into Keith Yoder&amp;#039;s Astropolis Processing Toolkit so that they are fully automated and can be performed at the touch of a button by a user who knows nothing of computer programming.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Independent Components Analysis&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For the shooter phase, ICA can be applied to epochs beginning with MD_ShooterOpenWormholeSuccess and ending with MD_ShooterActivateFireWeapon, MD_ShooterEnemyWeaponFired, or MD_ShooterCollectibleSpawned, whichever comes first.&lt;br /&gt;
&lt;br /&gt;
For the navigation phase, ICA can be applied to the entire continuous EEG record from the first MD_DotTrialBegin after the MD_DotPhaseBegin, up till the first event that is NOT any of MD_DotTrialBegin (2), MD_DotTrialExpire (3), MD_UserRespondLeft (4), MD_UserRespondRight (5), or MD_CockpitDamageFeedback (42).&lt;br /&gt;
&lt;br /&gt;
Remember not to include the skin-conductance channel (the greatest-numbered channel) in the ICA!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to behavioural inhibition&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Go trials and no-go trials each can be successful or unsuccessful; there are therefore four categories of events each beginning with an MD_ShooterPresentFriendly (21) which signals a no-go trial or an MD_ShooterPresentEnemy (22) which signals a go trial.  The analysis software should use the context provided by subsequent events to translate these two codes into four codes as follows:&lt;br /&gt;
&lt;br /&gt;
At an MD_ShooterPresentFriendly (21), if there is no MD_ShooterActivateFireWeapon (24) until the next MD_ShooterCollectibleSpawned (28) or until 5 seconds have elapsed, whichever is sooner, then code this event as MD_ShooterNoGoSUCCEED.  Otherwise code MD_ShooterNoGoFAIL.  This new event code replaces the originally logged MD_ShooterPresentFriendly, and is inserted into the data at the time time stamp as the originally logged event.&lt;br /&gt;
&lt;br /&gt;
At an MD_ShooterPresentEnemy (22), if there is no MD_ShooterActivateFireWeapon (24) until the next MD_ShooterEnemyWeaponFired (27) or until 5 seconds have elapsed, whichever is sooner, then code this event as MD_ShooterGoFAIL.  Otherwise code MD_ShooterGoSUCCEED.  This new event code replaces the originally logged MD_ShooterPresentFriendly, and is inserted into the data at the time time stamp as the originally logged event.&lt;br /&gt;
&lt;br /&gt;
MD_ShooterActivateFireWeapon events within MD_ShooterNoGoFAIL sequences should be re-coded as MD_ShooterWeaponFALSE_ALARM.  MD_ShooterActivateFireWeapon events within MD_ShooterGoSUCCEED sequences should be re-coded as MD_ShooterWeaponHIT.&lt;br /&gt;
&lt;br /&gt;
The following behavioural measures can be computed:&amp;lt;br&amp;gt;&lt;br /&gt;
1. &amp;lt;b&amp;gt;Reaction time&amp;lt;/b&amp;gt;: The mean and standard deviation of reaction time for MD_ShooterGoSUCCEED can be calculated from the intervals between the relevant MD_ShooterPresentEnemy and MD_ShooterActivateFireWeapon events.&amp;lt;br&amp;gt;&lt;br /&gt;
2. &amp;lt;b&amp;gt;Accuracy&amp;lt;/b&amp;gt;: d&amp;#039; can be calculated where hits are MD_ShooterGoSUCCEED, misses are MD_ShooterGoFAIL, false alarms are MD_ShooterNoGoFAIL, and correct rejections are MD_ShooterNoGoSUCCEED.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Motor and preparatory potentials&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For the events MD_ShooterActivateMovePort (17), MD_ShooterActivateMoveStarboard (19), and MD_ShooterActivateOpenWormholeBeam (14), both the bereitschaftspotential (readiness potential, from supplementary motor area) ERP and the event-related desynchronisation of the mu rhythm near the hand area (lateral central electrodes) can be computed.&lt;br /&gt;
&lt;br /&gt;
The interval between MD_ShooterOpenWormholeSuccess (16) and MD_ShooterGoSUCCEED will evoke a Contingent Negative Variation at frontocentral electrodes which resolves into a motor execution.  The interval between MD_ShooterOpenWormholeSuccess (16) and MD_ShooterNoGoSUCCEED will evoke the same Contingent Negative Variation, followed by a further inhibition-related negativity instead of by motor execution.  Both the CNV beginning at the time of MD_ShooterOpenWormholeSuccess and the response-related activities time-locked to MD_ShooterGoSUCCEED and MD_ShooterNoGoSUCCEED are of interest.&lt;br /&gt;
&lt;br /&gt;
The following behavioural measures can be computed:&lt;br /&gt;
1. Between each pair of MD_ShooterPresentWormhole (23) and MD_ShooterOpenWormholeSuccess (16):&amp;lt;br&amp;gt;&lt;br /&gt;
1A. Elapsed time (mean and SD)&amp;lt;br&amp;gt;&lt;br /&gt;
1B. Number of distinct movement commands (MD_ShooterActivateMovePort (17) or MD_ShooterActivateMoveStarboard (19)), and also the mean and SD of this quantity after Anscombe transformation or other Poisson-to-normal transformation.&amp;lt;br&amp;gt;&lt;br /&gt;
2. A detailed curve, with a sequence number (1, 2, 3, ...) of the wormhole event on the x axis and the number of movement commands on the y axis; does the player improve as time goes on?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to attention and context updating&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
P3 on MD_ShooterNoGoSUCCEED, and separately on MD_ShooterGoSUCCEED: mean half-integral amplitude and latency.&lt;br /&gt;
&lt;br /&gt;
Frontal negativity following MD_ShooterNoGoSUCCEED (contrast to the same following MD_ShooterGoSUCCEED).&lt;br /&gt;
&lt;br /&gt;
P1 on MD_ShooterNoGoSUCCEED and MD_ShooterGoSUCCEED pooled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to motion perception&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Leftward-drifting trials and rightward-drifting trials each can be successful or unsuccessful; there are therefore four categories of events each beginning with an MD_DotTrialBegin (2).  The analysis software should use the context provided by subsequent events to translate this code into six codes as follows:&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left followed by MD_UserRespondLeft as the very next event, code MD_DotLeftHIT, and similarly at an MD_DotTrialBegin Direction=Right followed by MD_UserRespondRight as the very next event, code MD_DotRightHIT.&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left followed by MD_UserRespondRight as the very next event, code MD_DotLeftFALSE_ALARM, and similarly at an MD_DotTrialBegin Direction=Right followed by MD_UserRespondLeft as the very next event, code MD_DotRightFALSE_ALARM.&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left whose next event is neither MD_UserRespondLeft nor MD_UserRespondRight is an MD_DotLeftMISS, and similarly an MD_DotTrialBegin Direction=Right whose next event is neither MD_UserRespondLeft nor MD_UserRespondRight is an MD_DotRightMISS.&lt;br /&gt;
&lt;br /&gt;
MD_UserRespondLeft events following MD_DotLeftHIT, and MD_UserRespondRight events following MD_DotRightHIT, should be re-coded as MD_DotResponseHIT.&lt;br /&gt;
&lt;br /&gt;
MD_UserRespondRight events following MD_DotLeftFALSE_ALARM, and MD_UserRespondLeft events following MD_DotRightFALSE_ALARM, should be re-coded as MD_DotResponseFALSE_ALARM.&lt;br /&gt;
&lt;br /&gt;
MD_CockpitDamageFeedback events immediately following MD_DotResponseFALSE_ALARM events should be re-coded as MD_DotFeedbackFALSE_ALARM.  MD_CockpitDamageFeedback events immediately following MD_DotTrialBegin events should be re-coded as MD_DotFeedbackMISS.&lt;br /&gt;
&lt;br /&gt;
ERPs and ERSPs time-locked to each of the six MD_Dot stimulus onset events can be compared; pilot data indicate that the ERSPs would show event-related desynchronisations in occipital generators.  (There might not be sufficient FALSE_ALARM events for reliable averaging, in which case just the HIT and MISS events can be compared.)  Likewise, ERPs and ERSPs time-locked to each of the three (or two, if there are insufficient numbers of false alarms) MD_DotResponse events can be compared.&lt;br /&gt;
&lt;br /&gt;
The following behavioural measure can be computed:&amp;lt;br&amp;gt;&lt;br /&gt;
1. The latest of the several coherence perceptual threshold estimates can be extracted from the last MD_DotCoherenceEstimate (6) in the behavioural log file.  In case this event is missing because of a crashed game or otherwise corrupted log file, the coherence parameter from the latest (last in the file) MD_DotTrialBegin (2) can be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to reward&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
MD_ShooterCollectibleCollision (29) and MD_ShooterMeteorExplosion (30) both can be examined for a cingulate negativity related to reward value which occurs between 250 and 350 ms post-stimulus; see Yeung et al. http://dx.doi.org/10.1093/cercor/bhh153&lt;br /&gt;
&lt;br /&gt;
Skin conductance response (recorded on the highest-numbered channel) may also be of particular interest during these events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to error processing&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
MD_ShooterWeaponFALSE_ALARM events should generate a cingulate error-related negativity; this error-related negativity can be most straightforwardly visualised by computing a difference wave: subtract the ERP associated with MD_ShooterWeaponHIT events from the ERP associated with MD_ShooterWeaponFALSE_ALARM events.&lt;br /&gt;
&lt;br /&gt;
During the navigation phase, a couple of strategies might be applied to discern the error-related negativity associated with erroneous responses:  The right way to do it, if there were enough MD_DotResponseFALSE_ALARM events available for reliable ERP averaging, would be to subtract the ERP associated with MD_DotResponseHIT events from the ERP associated with MD_DotResponseFALSE_ALARM events.  But there probably won&amp;#039;t be sufficient numbers of false-alarm responses for that.  Instead of false alarms, subjects who are unable to discern the motion direction probably will generate misses - that is, no overt behavioural response at all.  So we can look at the ERP associated with MD_DotFeedbackMISS (without any subtraction).&lt;br /&gt;
&lt;br /&gt;
Skin conductance response (recorded on the highest-numbered channel) may also be of particular interest during these events.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Maritime_Defender&amp;diff=626</id>
		<title>Data analysis - Maritime Defender</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Maritime_Defender&amp;diff=626"/>
				<updated>2011-08-20T02:55:56Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added a note on handling uncertain time offsets in rapid stimulus series for events 29 and 30&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Maritime Defender&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The game begins with MD_MaritimeDefenderGameBegin (41) and ends with MD_DotCoherenceEstimate (6).  The game also is considered to have ended if the begin code for any other mini-game occurs.  The game comprises multiple iterations of two phases, the shooter phase (testing go/no-go inhibition) and the navigation phase (testing motion coherence perception).  The shooter phase begins with MD_ShooterPhaseBegin (13) and ends with either MD_DotPhaseBegin (1) or MD_BossPhaseBegin (32).  The navigation phase begins with MD_DotPhaseBegin (1) and ends with either MD_ShooterPhaseBegin (13) or MD_BossPhaseBegin (32).  Any phase also can be terminated with an End_of_log (0) code, which appears in the behavioural log file but not in the EEG log file.  Following is a list of all the event codes, then a summary of the relevant behavioural and electrophysiological derived measures to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotPhaseBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The navigation phase (comprising many motion coherence trials) of the game has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	One individual motion coherence trial (within the navigation phase) has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	3&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialExpire&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A motion coherence trial has timed out without any behavioural response&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	4&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialUserRespondLeft&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the left arrow during a motion coherence trial&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialUserRespondRight&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the right arrow during a motion coherence trial&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	6&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotCoherenceEstimate&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	At the end of a navigation phase, the maximum-likelihood estimator has recalculated the psychophysical perceptual threshold for motion coherence&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierTestBegin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	At the beginning of the game, the friend-or-foe ship identifier dialogue has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	8&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierSelectLeft&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the friend-or-foe ship identifier dialogue, the player has pressed the left arrow&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	9&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierSelectRight&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the friend-or-foe ship identifier dialogue, the player has pressed the right arrow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierConfirmSelection&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the friend-or-foe ship identifier dialogue, the player has pressed the return key to confirm their selection&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierTestEndSuccess&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player&amp;#039;s response in the friend-or-foe ship identifier dialogue is correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	12&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierTestEndFailure&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player&amp;#039;s response in the friend-or-foe ship identifier dialogue is incorrect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPhaseBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The shooter phase (comprising many go/no-go trials) of the game has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateOpenWormholeBeam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the up-arrow to activate the wormhole-opener beam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	15&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseOpenWormholeBeam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the up-arrow to cease the wormhole-opener beam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	16&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterOpenWormholeSuccess&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the wormhole-opener beam has opened the wormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	17&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateMovePort&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the left-arrow to begin moving clockwise&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	18&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseMovePort&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the left-arrow to cease moving clockwise&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	19&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateMoveStarboard&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the right-arrow key to begin moving anticlockwise&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	20&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseMoveStarboard&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the right-arrow key to cease moving anticlockwise&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	21&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPresentFriendly&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a friendly ship has emerged from an opened wormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	22&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPresentEnemy&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a hostile ship has emerged from an opened wormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	23&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPresentWormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a wormhole has appeared&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	24&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateFireWeapon&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the space bar to begin firing&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	25&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseFireWeapon&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the space bar to cease firing&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	26&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPlayerWeaponFired&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the weapon has fired (Multiple WeaponFired events can occur between an ActivateFireWeapon and a CeaseFireWeapon, as the space bar is held down for continuous fire)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	27&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterEnemyWeaponFired&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a hostile ship has fired at the player&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	28&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCollectibleSpawned&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a collectible has emerged from a destroyed asteroid or from a friendly ship&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	29&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPlayerCollectibleCollision&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player&amp;#039;s ship has picked up a collectible&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	30&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterMeteorExplosion&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, an asteroid has exploded&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	31&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPlayerGetsHit&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player&amp;#039;s ship has been hit by hostile fire or by an asteroid&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	32&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_BossPhaseBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The &amp;#039;boss phase&amp;#039; has begun - no scientifically important events here, just entertainment and reward for completing the level&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	33&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_GameSuccess&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	&amp;lt;b&amp;gt;The player has successfully completed the boss phase, beating the game&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	34&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_GameFailure&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	&amp;lt;b&amp;gt;During any game phase (shooter, navigation, or boss), the player&amp;#039;s last of three ships has been destroyed, losing the game&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	35&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DialogSkip&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has skipped a dialogue&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	36&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_MenuSelect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has selected an item in the menu&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	37&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_MenuCancel&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has cancelled the menu&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	38&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Pause&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has paused the game&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	39&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Unpause&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has unpaused the game&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	40&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_OpenConsole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has opened the console&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	41&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_MaritimeDefenderGameBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	&amp;lt;b&amp;gt;The game has begun&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	42&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_CockpitDamageFeedback&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the navigation phase, the cockpit shakes, indicating damage and loss of energy, following a non-response or an incorrect response&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	43&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_TutorialStart&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The optional tutorial has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	44&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	This and the next several codes define the times of entry into the tutorial&amp;#039;s several successive sections:&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	45&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	46&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	47&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section4&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	48&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section5&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	49&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	50&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	51&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section8&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	52&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section9&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	53&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	54&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	55&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	56&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	57&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	58&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	59&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section16&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	60&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_TutorialEnd&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The tutorial has ended&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The processing software should delete all existing event codes greater than or equal to 255.  These codes are inserted by the BioSemi EEG recording hardware and are not needed.&lt;br /&gt;
&lt;br /&gt;
The processing software then must align (both by sequence and by specific temporal offset) the event codes in the EEG record with the event codes in the game log.  The game log is the master copy of the event codes; codes transmitted to the EEG recorder can sometimes be erroneously dropped or, more rarely, erroneously replicated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Note that because of the rapid play in Maritime Defender in particular, events may occur in bursts.  This is particularly true of events MD_ShooterCollectibleCollision (29) and MD_ShooterMeteorExplosion (30).  These bursts may overwhelm the parallel port&amp;#039;s ability to transmit event codes, as each tranmission takes 5ms plus reset time.  In case alignment is not possible during these rapid bursts (series of N events all of which occur within N*5ms of each other), the first event in the series can be preserved and the subsequent events deleted, or given some alternative event code that would flag that these events are uncertain in their temporal localisation and therefore not to be used to time-lock ERPs.  This is a fine strategy, as stimuli occurring closer together than 5ms are, for all intents and purposes, a single stimulus anyway.  So by preserving only the first event in the rapid series, we mark the onset time of this single, aggregate stimulus.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lastly, the processing software must translate context-sensitive event codes (for example, a stimulus, contextualised by either an incorrect behavioural response or a correct behavioural response following) into context-free event codes as detailed below.  Events that already are context-free should simply be transcribed as is.  All events - both those that are being translated and those that are being transcribed - should be renumbered so that their codes are greater than 255 and in a range dedicated to each mini-game separately.  This constraint could be implemented, for example, by adding 1000 to the transcribed event codes for Maritime Defender, adding 2000 to those for Stellar Prospector, and so on, creating a separate, non-overlapping range of event codes for each mini-game.&lt;br /&gt;
&lt;br /&gt;
These event code translations, and all derived behavioural data as detailed below, should be integrated into Keith Yoder&amp;#039;s Astropolis Processing Toolkit so that they are fully automated and can be performed at the touch of a button by a user who knows nothing of computer programming.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Independent Components Analysis&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For the shooter phase, ICA can be applied to epochs beginning with MD_ShooterOpenWormholeSuccess and ending with MD_ShooterActivateFireWeapon, MD_ShooterEnemyWeaponFired, or MD_ShooterCollectibleSpawned, whichever comes first.&lt;br /&gt;
&lt;br /&gt;
For the navigation phase, ICA can be applied to the entire continuous EEG record from the first MD_DotTrialBegin after the MD_DotPhaseBegin, up till the first event that is NOT any of MD_DotTrialBegin (2), MD_DotTrialExpire (3), MD_UserRespondLeft (4), MD_UserRespondRight (5), or MD_CockpitDamageFeedback (42).&lt;br /&gt;
&lt;br /&gt;
Remember not to include the skin-conductance channel (the greatest-numbered channel) in the ICA!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to behavioural inhibition&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Go trials and no-go trials each can be successful or unsuccessful; there are therefore four categories of events each beginning with an MD_ShooterPresentFriendly (21) which signals a no-go trial or an MD_ShooterPresentEnemy (22) which signals a go trial.  The analysis software should use the context provided by subsequent events to translate these two codes into four codes as follows:&lt;br /&gt;
&lt;br /&gt;
At an MD_ShooterPresentFriendly (21), if there is no MD_ShooterActivateFireWeapon (24) until the next MD_ShooterCollectibleSpawned (28) or until 5 seconds have elapsed, whichever is sooner, then code this event as MD_ShooterNoGoSUCCEED.  Otherwise code MD_ShooterNoGoFAIL.  This new event code replaces the originally logged MD_ShooterPresentFriendly, and is inserted into the data at the time time stamp as the originally logged event.&lt;br /&gt;
&lt;br /&gt;
At an MD_ShooterPresentEnemy (22), if there is no MD_ShooterActivateFireWeapon (24) until the next MD_ShooterEnemyWeaponFired (27) or until 5 seconds have elapsed, whichever is sooner, then code this event as MD_ShooterGoFAIL.  Otherwise code MD_ShooterGoSUCCEED.  This new event code replaces the originally logged MD_ShooterPresentFriendly, and is inserted into the data at the time time stamp as the originally logged event.&lt;br /&gt;
&lt;br /&gt;
MD_ShooterActivateFireWeapon events within MD_ShooterNoGoFAIL sequences should be re-coded as MD_ShooterWeaponFALSE_ALARM.  MD_ShooterActivateFireWeapon events within MD_ShooterGoSUCCEED sequences should be re-coded as MD_ShooterWeaponHIT.&lt;br /&gt;
&lt;br /&gt;
The following behavioural measures can be computed:&amp;lt;br&amp;gt;&lt;br /&gt;
1. &amp;lt;b&amp;gt;Reaction time&amp;lt;/b&amp;gt;: The mean and standard deviation of reaction time for MD_ShooterGoSUCCEED can be calculated from the intervals between the relevant MD_ShooterPresentEnemy and MD_ShooterActivateFireWeapon events.&amp;lt;br&amp;gt;&lt;br /&gt;
2. &amp;lt;b&amp;gt;Accuracy&amp;lt;/b&amp;gt;: d&amp;#039; can be calculated where hits are MD_ShooterGoSUCCEED, misses are MD_ShooterGoFAIL, false alarms are MD_ShooterNoGoFAIL, and correct rejections are MD_ShooterNoGoSUCCEED.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Motor and preparatory potentials&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For the events MD_ShooterActivateMovePort (17), MD_ShooterActivateMoveStarboard (19), and MD_ShooterActivateOpenWormholeBeam (14), both the bereitschaftspotential (readiness potential, from supplementary motor area) ERP and the event-related desynchronisation of the mu rhythm near the hand area (lateral central electrodes) can be computed.&lt;br /&gt;
&lt;br /&gt;
The interval between MD_ShooterOpenWormholeSuccess (16) and MD_ShooterGoSUCCEED will evoke a Contingent Negative Variation at frontocentral electrodes which resolves into a motor execution.  The interval between MD_ShooterOpenWormholeSuccess (16) and MD_ShooterNoGoSUCCEED will evoke the same Contingent Negative Variation, followed by a further inhibition-related negativity instead of by motor execution.  Both the CNV beginning at the time of MD_ShooterOpenWormholeSuccess and the response-related activities time-locked to MD_ShooterGoSUCCEED and MD_ShooterNoGoSUCCEED are of interest.&lt;br /&gt;
&lt;br /&gt;
The following behavioural measures can be computed:&lt;br /&gt;
1. Between each pair of MD_ShooterPresentWormhole (23) and MD_ShooterOpenWormholeSuccess (16):&amp;lt;br&amp;gt;&lt;br /&gt;
1A. Elapsed time (mean and SD)&amp;lt;br&amp;gt;&lt;br /&gt;
1B. Number of distinct movement commands (MD_ShooterActivateMovePort (17) or MD_ShooterActivateMoveStarboard (19)), and also the mean and SD of this quantity after Anscombe transformation or other Poisson-to-normal transformation.&amp;lt;br&amp;gt;&lt;br /&gt;
2. A detailed curve, with a sequence number (1, 2, 3, ...) of the wormhole event on the x axis and the number of movement commands on the y axis; does the player improve as time goes on?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to attention and context updating&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
P3 on MD_ShooterNoGoSUCCEED, and separately on MD_ShooterGoSUCCEED: mean half-integral amplitude and latency.&lt;br /&gt;
&lt;br /&gt;
Frontal negativity following MD_ShooterNoGoSUCCEED (contrast to the same following MD_ShooterGoSUCCEED).&lt;br /&gt;
&lt;br /&gt;
P1 on MD_ShooterNoGoSUCCEED and MD_ShooterGoSUCCEED pooled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to motion perception&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Leftward-drifting trials and rightward-drifting trials each can be successful or unsuccessful; there are therefore four categories of events each beginning with an MD_DotTrialBegin (2).  The analysis software should use the context provided by subsequent events to translate this code into six codes as follows:&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left followed by MD_UserRespondLeft as the very next event, code MD_DotLeftHIT, and similarly at an MD_DotTrialBegin Direction=Right followed by MD_UserRespondRight as the very next event, code MD_DotRightHIT.&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left followed by MD_UserRespondRight as the very next event, code MD_DotLeftFALSE_ALARM, and similarly at an MD_DotTrialBegin Direction=Right followed by MD_UserRespondLeft as the very next event, code MD_DotRightFALSE_ALARM.&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left whose next event is neither MD_UserRespondLeft nor MD_UserRespondRight is an MD_DotLeftMISS, and similarly an MD_DotTrialBegin Direction=Right whose next event is neither MD_UserRespondLeft nor MD_UserRespondRight is an MD_DotRightMISS.&lt;br /&gt;
&lt;br /&gt;
MD_UserRespondLeft events following MD_DotLeftHIT, and MD_UserRespondRight events following MD_DotRightHIT, should be re-coded as MD_DotResponseHIT.&lt;br /&gt;
&lt;br /&gt;
MD_UserRespondRight events following MD_DotLeftFALSE_ALARM, and MD_UserRespondLeft events following MD_DotRightFALSE_ALARM, should be re-coded as MD_DotResponseFALSE_ALARM.&lt;br /&gt;
&lt;br /&gt;
MD_CockpitDamageFeedback events immediately following MD_DotResponseFALSE_ALARM events should be re-coded as MD_DotFeedbackFALSE_ALARM.  MD_CockpitDamageFeedback events immediately following MD_DotTrialBegin events should be re-coded as MD_DotFeedbackMISS.&lt;br /&gt;
&lt;br /&gt;
ERPs and ERSPs time-locked to each of the six MD_Dot stimulus onset events can be compared; pilot data indicate that the ERSPs would show event-related desynchronisations in occipital generators.  (There might not be sufficient FALSE_ALARM events for reliable averaging, in which case just the HIT and MISS events can be compared.)  Likewise, ERPs and ERSPs time-locked to each of the three (or two, if there are insufficient numbers of false alarms) MD_DotResponse events can be compared.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to reward&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
MD_ShooterCollectibleCollision (29) and MD_ShooterMeteorExplosion (30) both can be examined for a cingulate negativity related to reward value which occurs between 250 and 350 ms post-stimulus; see Yeung et al. http://dx.doi.org/10.1093/cercor/bhh153&lt;br /&gt;
&lt;br /&gt;
Skin conductance response (recorded on the highest-numbered channel) may also be of particular interest during these events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to error processing&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
MD_ShooterWeaponFALSE_ALARM events should generate a cingulate error-related negativity; this error-related negativity can be most straightforwardly visualised by computing a difference wave: subtract the ERP associated with MD_ShooterWeaponHIT events from the ERP associated with MD_ShooterWeaponFALSE_ALARM events.&lt;br /&gt;
&lt;br /&gt;
During the navigation phase, a couple of strategies might be applied to discern the error-related negativity associated with erroneous responses:  The right way to do it, if there were enough MD_DotResponseFALSE_ALARM events available for reliable ERP averaging, would be to subtract the ERP associated with MD_DotResponseHIT events from the ERP associated with MD_DotResponseFALSE_ALARM events.  But there probably won&amp;#039;t be sufficient numbers of false-alarm responses for that.  Instead of false alarms, subjects who are unable to discern the motion direction probably will generate misses - that is, no overt behavioural response at all.  So we can look at the ERP associated with MD_DotFeedbackMISS (without any subtraction).&lt;br /&gt;
&lt;br /&gt;
Skin conductance response (recorded on the highest-numbered channel) may also be of particular interest during these events.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_auditory_stimuli&amp;diff=625</id>
		<title>Data analysis - auditory stimuli</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_auditory_stimuli&amp;diff=625"/>
				<updated>2011-06-13T17:35:21Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: New page: &amp;#039;&amp;#039;&amp;#039;Auditory Stimuli&amp;#039;&amp;#039;&amp;#039;  This is not a game, but rather a passive stimulation paradigm comprising a 50 ms tone (consisting of several frequency components) played at various dB SPL intensit...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Auditory Stimuli&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This is not a game, but rather a passive stimulation paradigm comprising a 50 ms tone (consisting of several frequency components) played at various dB SPL intensities, at intervals of 1000 ms plus a random jitter uniformly distributed over [0, 500 ms].  The paradigm begins with AS_Start (1).  A tone is signalled by AS_TONE_PLAYED Volume=&amp;lt;i&amp;gt;n&amp;lt;/i&amp;gt;.  The paradigm ends with AS_END.&lt;br /&gt;
&lt;br /&gt;
Postprocessing is straightforward and no event code translation is needed, other than the usual removal of events numbered 255 or greater, and renumbering of events into a unqique range specific to this paradigm.&lt;br /&gt;
&lt;br /&gt;
ERPs and ERSPs to each intensity can be computed, and component amplitudes (both in sensor space and in ICA source space) can be used to construct a response curve of ERP component amplitude as a function of stimulus amplitude that classifies each subject as an augmenter, a reducer, or a flat responder.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Stellar_Prospector&amp;diff=624</id>
		<title>Data analysis - Stellar Prospector</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Stellar_Prospector&amp;diff=624"/>
				<updated>2011-06-13T17:34:00Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: New page: &amp;#039;&amp;#039;&amp;#039;Stellar Prospector&amp;#039;&amp;#039;&amp;#039;  The game begins with SP_Phase1Begin (9) and comprises three phases, in this order:&amp;lt;br&amp;gt; Phase 1: Visual cue-change signal.  Targets only, no distractors.&amp;lt;br&amp;gt; Phase...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Stellar Prospector&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The game begins with SP_Phase1Begin (9) and comprises three phases, in this order:&amp;lt;br&amp;gt;&lt;br /&gt;
Phase 1: Visual cue-change signal.  Targets only, no distractors.&amp;lt;br&amp;gt;&lt;br /&gt;
Phase 2: Visual cue-change signal.  Targets and distractors.&amp;lt;br&amp;gt;&lt;br /&gt;
Phase 3: Auditory-visual cue-change signal.  Targets and distractors.&lt;br /&gt;
&lt;br /&gt;
The task is to respond with a down-arrow key-press to high-value targets at fixation, whilst simultaneously monitoring for lower-value targets in the four sectors surrounding fixation in the upper visual hemifield, and responding with an up-arrow key-press to these.  At any given time, exactly one of the four sectors is the cued sector, in which 80% of targets will appear.&lt;br /&gt;
&lt;br /&gt;
Depending on the numbers of trials available, data can be pooled across Phases 2 and 3, or even across all three phases.  (However, this matter of data pooling is for the experimenters to decide; the processing software should keep the phase-marker events intact.)  For translation of context-sensitive to context-free event codes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;		Original Event		&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;	following event							&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;	classification	&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td ROWSPAN=&amp;quot;3&amp;quot;&amp;gt;	SP_CentralStimulusSpawn	&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_CentralStimulusResponsePressed CentralStimulus=&amp;lt;u&amp;gt;active&amp;lt;/u&amp;gt;	&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	hit		&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;						&amp;lt;td&amp;gt;		SP_PeripheralStimulusResponsePressed CentralStimulus=&amp;lt;u&amp;gt;active&amp;lt;/u&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	response error	&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;						&amp;lt;td&amp;gt;		SP_MissedCentralStimulus					&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	miss		&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td ROWSPAN=&amp;quot;3&amp;quot;&amp;gt;	SP_PeripheralStimulusSpawn&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_CentralStimulusResponsePressed CentralStimulus=&amp;lt;u&amp;gt;inactive&amp;lt;/u&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	response error	&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;						&amp;lt;td&amp;gt;		SP_PeripheralStimulusResponsePressed PeripheralStimulus=&amp;lt;u&amp;gt;active&amp;lt;/u&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	hit		&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;						&amp;lt;td&amp;gt;		SP_MissedPeripheralStimulus					&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	miss		&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td ROWSPAN=&amp;quot;2&amp;quot;&amp;gt;	SP_DistractorSpawn	&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_PeripheralStimulusResponsePressed PeripheralStimulus=&amp;lt;u&amp;gt;inactive&amp;lt;/u&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;false alarm	&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;						&amp;lt;td&amp;gt;		SP_DistractorDisappear						&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	correct rejection&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also re-code the associated response into a hit, a response error, or a miss based on the re-coding of the stimulus.  Response events that are not associated with any stimulus by the above rules and occur with PeripheralStimulus=&amp;lt;u&amp;gt;inactive&amp;lt;/u&amp;gt; should be re-coded as false alarms.  (These will be quite rare in Phase 1, but more common in Phases 2 and 3 which involve distractors.)&lt;br /&gt;
&lt;br /&gt;
For each of the three phases separately, and also for phases 2 and 3 pooled without phase 1, compute the following:&amp;lt;br&amp;gt;&lt;br /&gt;
Trial-by-trial values, mean, and standard deviation of:&amp;lt;br&amp;gt;&lt;br /&gt;
Reaction times to central stimuli&amp;lt;br&amp;gt;&lt;br /&gt;
Reaction times to validly cued peripheral stimuli (where the value of the &amp;lt;u&amp;gt;Sector&amp;lt;/u&amp;gt; parameter for the SP_PeripheralStimulusSpawn event is the same as the value of the &amp;lt;u&amp;gt;Sector&amp;lt;/u&amp;gt; parameter for the most recent SP_CueChange)&amp;lt;br&amp;gt;&lt;br /&gt;
Reaction times to all invalidly cued peripheral stimuli&lt;br /&gt;
&lt;br /&gt;
When listing out the trial-by-trial values for the peripheral stimuli, also list the stimulus&amp;#039;s polar coordinates &amp;lt;i&amp;gt;(r, &amp;amp;theta;)&amp;lt;/i&amp;gt;, the number of the sector in which the stimulus appeared, and the number of the currently cued sector (from the most recent SP_CueChange).  Use this information to compute multiple regression coefficients of reaction time against the stimulus&amp;#039;s &amp;lt;i&amp;gt;r&amp;lt;/i&amp;gt; (its distance from fixation) and against the absolute value of the &amp;lt;u&amp;gt;difference&amp;lt;/u&amp;gt; between the stimulus&amp;#039;s &amp;amp;theta; and the &amp;amp;theta; that runs along the centre of the cued sector (-3&amp;amp;pi;/8, -&amp;amp;pi;/8, pi;/8, 3pi;/8; in general the formula is &amp;lt;u&amp;gt;Sector&amp;lt;/u&amp;gt;&amp;amp;times;&amp;amp;pi;/4 - 3&amp;amp;pi;/8).  Also compute statistical significances for these regression coefficients.&lt;br /&gt;
&lt;br /&gt;
For the peripheral stimluli only (not the central stimuli), in Phases 2 and 3 only (exlcuding Phase 1), in two separate computations one for the currently cued sector and the other for the currently uncued sectors, complute d&amp;#039; (&amp;quot;d prime&amp;quot;) using the tallies of hits, correct rejections, false alarms and misses.  (If any of these tallies is zero, estimate d&amp;#039; by increasing it to 1.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_PeripheralStimulusResponsePressed&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;PeripheralStimulus=&amp;lt;i&amp;gt;{inactive, active}&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;CentralStimulus=&amp;lt;i&amp;gt;{inactive, active}&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Gather=&amp;lt;i&amp;gt;{inactive, active}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The up-arrow key has been pressed, indicating a response to a peripheral stimulus (as this response might be a false alarm, a peripheral stimulus may or may not actually have been active); the parameters indicate the current activity of the central and any peripheral stimuli, and whether the game will be responsive to this key press or whether it&amp;#039;s temporarily inactive as a penalty for a previous, incorrect key press.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_CentralStimulusResponsePressed&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;PeripheralStimulus=&amp;lt;i&amp;gt;{inactive, active}&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;CentralStimulus=&amp;lt;i&amp;gt;{inactive, active}&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Gather=&amp;lt;i&amp;gt;{inactive, active}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The down-arrow key has been pressed, indicating a response to the central (fixation) stimulus (as this response might be a false alarm, the central stimulus may or may not actually have been active); the parameters indicate the current activity of the central and any peripheral stimuli, and whether the game will be responsive to this key press or whether it&amp;#039;s temporarily inactive as a penalty for a previous, incorrect key press.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	5, 6&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_Start_Menu_Action&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	At the beginning of the game, a selection has been made from the menu. (These codes should not be being transcribed onto the parallel port and thus should not be appearing in the EEG log.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_MenuSelectButtonPressed&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the space bar in response to an instruction prompt&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	9&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_Phase1Begin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	Phase 1 of the game has begun: visual cues only (no simultaneous auditory cue), targets only (no distractors)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_Phase2Begin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	Phase 2 of the game has begun: visual cues only (no simultaneous auditory cue), 50% targets and 50% distractors&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_Phase3Begin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	Phase 3 of the game has begun: simultaneous visual and auditory cues, 50% targets and 50% distractors&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	12&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_End&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The game has ended; the player has collected enough peripheral stimuli (and ejected enough central stimuli) to fill the power bar&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_PeripheralStimulusSpawn Sector=&amp;lt;i&amp;gt;{0, 1, 2, 3}&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;{X, Y}=&amp;lt;i&amp;gt;screen coordinates&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;ThetaRadians=&amp;lt;i&amp;gt;angle from fixation in polar coordinates [&amp;amp;mdash;&amp;amp;pi/2;, &amp;amp;pi/2;]&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;RadialDistanceInPixels=&amp;lt;i&amp;gt;display-coordinates distance from fixation&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;ScreenDistanceInCm=&amp;lt;i&amp;gt;linear distance from fixation (cm)&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;RhoRadians=&amp;lt;i&amp;gt;anglular distance from fixation (radians)&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;AzimuthPhiRadians=&amp;lt;i&amp;gt;azimuth from fixation (radians)&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;ElevationLambdaRadians=&amp;lt;i&amp;gt;elevation from fixation (radians)&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A lower-value stimulus in one of the four peripheral sectors, away from fixation, has appeared;&amp;lt;br&amp;gt;the parameters give distance from the fixation point in several redundant coordinate systems&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_CentralStimulusSpawn&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The high-value stimulus at the fixation point has activated&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	15&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_DistractorSpawn&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Sector=&amp;lt;i&amp;gt;{0, 1, 2, 3}&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;{X, Y}=&amp;lt;i&amp;gt;screen coordinates&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;ThetaRadians=&amp;lt;i&amp;gt;angle from fixation in polar coordinates [&amp;amp;mdash;&amp;amp;pi/2;, &amp;amp;pi/2;]&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;RadialDistanceInPixels=&amp;lt;i&amp;gt;display-coordinates distance from fixation&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;ScreenDistanceInCm=&amp;lt;i&amp;gt;linear distance from fixation (cm)&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;RhoRadians=&amp;lt;i&amp;gt;anglular distance from fixation (radians)&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;AzimuthPhiRadians=&amp;lt;i&amp;gt;azimuth from fixation (radians)&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;ElevationLambdaRadians=&amp;lt;i&amp;gt;elevation from fixation (radians)&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A distractor in one of the four peripheral sectors, away from fixation, has appeared;&amp;lt;br&amp;gt;the parameters give distance from the fixation point in several redundant coordinate systems&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	16&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_CueChange&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Sector=&amp;lt;i&amp;gt;{0, 1, 2, 3}&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Sound=&amp;lt;i&amp;gt;{true, false}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The visual cue has changed to the designated sector;&amp;lt;br&amp;gt;it is accompanied by an auditory cue iff Sound=true&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	17&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_MissedPeripheralStimulus&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The currently active peripheral (low-value) stimulus has timed out and disappeared without a response&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	18&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_MissedCentralStimulus&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The currently active central (high-value) stimulus has timed out and disappeared without a response&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	19&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SP_DistractorDisappear&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The currently active distractor has disappeared&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Data can be epoched by the stimulus events SP_CueChange, SP_CentralStimulusSpawn, SP_PeripheralStimulusSpawn, SP_DistractorSpawn.  ICA can be run either separately on each of these classes of epochs, or on all pooled, or on grouped subsets (for example pooling SP_PeripheralStimulusSpawn with SP_DistractorSpawn).  Epochs should be long enough to include the associated behavioural response events.&lt;br /&gt;
&lt;br /&gt;
ERPs and ERSPs can be computed to each of these stimulus events.  Difference waves between SP_PeripheralStimulusSpawn and SP_DistractorSpawn may also be of interest.  In addition, response errors (see above for definitions) can be analysed for the error-related negativity.&lt;br /&gt;
&lt;br /&gt;
(Originally the intent was to flicker the backgrounds in the four sectors at different fundamental frequencies, so that covert attention to a particular sector would be encoded in the EEG frequency spectrum via a slight increase in SSVEP amplitude at that fundamental frequency.  However, many subjects found the flickering distracting, and in addition some autism-spectrum subjects found it painful.  The flickering therefore was disabled for most subjects.)&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Functional_specifications&amp;diff=623</id>
		<title>Functional specifications</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Functional_specifications&amp;diff=623"/>
				<updated>2011-06-13T17:32:49Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added Stellar Prospector and auditory stimuli links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to this game&amp;#039;s functional spec table of contents.  There are two major parts: the colony simulator and the minigames.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Important Neuroscientific Considerations in Game Design for Autism]]&lt;br /&gt;
&lt;br /&gt;
[[Data analysis - Maritime Defender]]&lt;br /&gt;
&lt;br /&gt;
[[Data analysis - Stellar Prospector]]&lt;br /&gt;
&lt;br /&gt;
[[Data analysis - StarJack]]&lt;br /&gt;
&lt;br /&gt;
[[Data analysis - auditory stimuli]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Colony Simulator&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Colony Mode]]&lt;br /&gt;
&lt;br /&gt;
[[Factions]]&lt;br /&gt;
&lt;br /&gt;
[[Structures]]&lt;br /&gt;
&lt;br /&gt;
[[Consumables]]&lt;br /&gt;
&lt;br /&gt;
[[Tasks]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Minigames&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Meteor Madness]] / Maritime Defender&lt;br /&gt;
&lt;br /&gt;
[[Star Jack]] / Starjack&lt;br /&gt;
&lt;br /&gt;
[[Stellar Prospector]]&lt;br /&gt;
&lt;br /&gt;
[[Face Off]]&lt;br /&gt;
&lt;br /&gt;
[[Factory Frenzy]] (Deprecated)&lt;br /&gt;
&lt;br /&gt;
[[Mini Game Rewards]]&lt;br /&gt;
&lt;br /&gt;
[[Mini Game Scenarios]]&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=622</id>
		<title>Data analysis - StarJack</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=622"/>
				<updated>2011-06-10T07:26:08Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added a suggestion on fMRI contrasts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The game begins with unparameterised SJ_START (1) and ends with SJ_END (19) followed by SJ_ENDSCREEN_CONTINUE (7).  The game also is considered to have ended if the begin code for any other mini-game occurs. The game comprises multiple iterations of three phases: the maze task (which can be used as a measure of executive function), the Embedded Figures Test (where reaction times measure perceptual disembedding), and the &amp;quot;Sally-Anne&amp;quot; test of theory-of-mind.&lt;br /&gt;
&lt;br /&gt;
Each level of the maze task begins with parameterised SJ_START (2) and ends with parameterised SJ_END (19).  Each level of the maze task is interrupted by invocations of the Embedded Figures Test, and punctuated by an invocation of the Sally-Anne test.  These latter two tests also can be invoked directly from the menu, without going through the maze test.&lt;br /&gt;
&lt;br /&gt;
The Embedded Figures Test begins with SJ_EFT_START (49) and ends with SJ_EFT_END_FAIL (44) or SJ_EFT_END_SUCCESS (50).&lt;br /&gt;
&lt;br /&gt;
The Sally-Anne test begins with SJ_SAT_START (52) and ends with SJ_SAT_END (53).&lt;br /&gt;
&lt;br /&gt;
Following is a list of all the event codes, then a summary of the relevant behavioural and electrophysiological derived measures to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Event codes (see &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/EventCode.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Screen/SallyAnneScreen.cs&amp;lt;/tt&amp;gt;),&amp;lt;br&amp;gt;&amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/HackingPhase/HackingPhaseScreen.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Dungeon/DungeonScreen.cs&amp;lt;/tt&amp;gt;&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The game has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level_&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;|tutorialLevel Room=Room_&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has entered a new maze level.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;Note that distinct numeric event codes (1 and 2) but one and the same string event descriptor (SJ_START) is used to denote the start of the game as a whole and to denote the start of an individual level of the maze within the game.  The difference is the presence or absence of the parameters.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_MouseClick&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_ENDSCREEN_CONTINUE&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to continue past the game end screen, exiting the game.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;(Note same numeric code as SJ_MENU_INPUT_MouseClick above.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Maze Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	9&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_Start&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has activated the invisibility cloak.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_End&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s invisibility cloak has deactivated on reaching the end of its allowed time.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_TrapPlaced&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has set a trap for the guards.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	12&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_GuardTrapped&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A trap previously set by the player has captured a guard.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Caught_TeleportToStart&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has been seen and caught by a guard or a camera, and teleports back to the starting position.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Esc&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the ESCAPE key to pause the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	15&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_Enter&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the enter key to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	19&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_END&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has reached the end of the current level.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	23&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Up&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the up-arrow to move up.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	24&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Down&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the down-arrow to move down.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	25&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Right&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the right-arrow to move right.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	26&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the left-arrow to move left.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	33&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Interact&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player is interacting with an object or entity.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	34&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_LeftClick&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the left mouse button at the given display coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Embedded Figures Test Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	38&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_Stimulus_Presented&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Key=Key&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt; Figure=Figure&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has been presented with a pair comprising a complex search figure and a smaller search target.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	39&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_HIT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	40&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_REJECT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	41&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_FALSE_ALARM&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	42&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_MISS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	44&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_FAIL&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has given incorrect responses on three trials, ending the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	46&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_NoMatch&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target does not occur within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	47&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Match&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target occurs within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	48&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Proceed&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has started a trial within the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	49&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_START&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The Embedded Figures Test has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	50&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_SUCCESS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has completed the Embedded Figures Test with fewer than three incorrect responses.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Theory-of-Mind Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	52&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	53&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_END&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has ended, after feedback has been given to the player.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	55&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_Video_Stop&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The currently active video has ended, and the player is being prompted to have it repeated or to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;See details of the &amp;lt;A HREF=&amp;quot;http://www.AutismCollaborative.org/wiki_aux/SJ_SAT_video_timecodes.txt&amp;quot;&amp;gt;video event timings&amp;lt;/i&amp;gt;.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	56&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	IGNORE (VideoReplay)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	(This code should not be being transcribed onto the parallel port and thus should not be appearing in the EEG log.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	58&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Continue&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the space bar, signalling readiness to view the next video stimulus.&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;(This same numeric code also can appear with the notation &amp;quot;IGNORE&amp;quot; in which case it should not be being transcribed to the parallel port and this should not be appearing in the EEG log.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	59&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_CargoDrop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the friendly space captain depositing the cargo on one of the planets has started.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	60&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Drop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate depositing the cargo on another planet has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always differ from that of the previous SJ_SAT_VideoStart_Pirate_Theft.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	61&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s theft of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	62&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s scan (but no theft) of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	64&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Top&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the up-arrow key, indicating a course to the TOP planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	65&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Bottom&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the down-arrow key, indicating a course to the BOTTOM planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	66&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the left-arrow key, indicating a course to the LEFT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	67&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Right&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the right-arrow key, indicating a course to the RIGHT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred (probability 1/3), the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has correctly indicated the planet on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 68, also is used by SJ_SAT_FirstOrder_NoTheft_Incorrect below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Incorrect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has indicated a planet other than that on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 68, is incorrect and ought to be 69.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo (probability 1/3), and reports this information to the captain, the player&amp;#039;s correct response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) actually indicates higher-order theory-of-mind: the captain believes that the pirate believes that the captain believes that the cargo remains in the planet where the captain had originally cached it, thus the player&amp;#039;s answer indicating the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop and SJ_SAT_VideoStart_Cruiser_View_Theft is correct.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 70, is incorrect and ought to be 73.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain) (probability 1/3), the player has correctly responded to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating that the captain will go to the planet on which she originally cached the cargo &amp;amp;mdash; that is, the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 70, also is used by SJ_SAT_FirstOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	71&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the true location of the cargo rather than the location believed by the captain.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	72&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	74&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectFakeLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the captain&amp;#039;s original hiding place (as though the admiral had not reported to the captain the pirate&amp;#039;s new hiding place).&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	75&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded correctly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the planet on which the captain cached the cargo.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 76, also is used by SJ_SAT_SecondOrder_NoTheft_&amp;lt;u&amp;gt;In&amp;lt;/u&amp;gt;correct below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the three planets that did &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; harbour the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 76, is incorrect and ought to be 77.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (incorrectly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 78, is incorrect and ought to be 81.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (correctly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 78, also is used by SJ_SAT_SecondOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	79&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (correctly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	82&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (incorrectly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	83&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	n the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	84&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Question_Presented&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Question_Presented&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	After the explanatory text (&amp;quot;The captain wants to pick up the cargo. She will steer her ship to the planet where she thinks the cargo is. The pirate wants to find the captain. He will steer his ship to wherever he thinks the captain will go.&amp;quot;), the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) or the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) has just been asked.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the same numeric event code, 84, is used for both SJ_SAT_FirstOrder_Question_Presented and SJ_SAT_SecondOrder_Question_Presented.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the admiral&amp;#039;s viewing of the theft has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 85, is incorrect and ought to be 86.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_NoScan&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate has stolen and re-cached the cargo, and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain, the video showing only noise and interference on the admiral&amp;#039;s viewscreen has started.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 85, also is used by SJ_SAT_VideoStart_Cruiser_View_Theft above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	87&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the video showing the admiral&amp;#039;s view of the pirate&amp;#039;s scanning but not stealing the cargo has started.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After deletion of codes 255 and greater, and alignment of the behavioural and EEG event sequences just as was done for Maritime Defender, processing should continue by correcting (both in the behavioural log file and in the EEG log file) the numeric event codes that are associated with the following string event descriptors in the behavioural log file (see notes in the table above):&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_FirstOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_FirstOrder_Scan_Correct&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Scan_Correct&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Question_Presented&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_VideoStart_Cruiser_View_Theft&lt;br /&gt;
&lt;br /&gt;
SJ_EFT_INPUT_Match and SJ_EFT_INPUT_NoMatch events should be re-coded as context-free events based on the success flags (SJ_EFT_HIT, SJ_EFT_REJECT, SJ_EFT_FALSE_ALARM, SJ_EFT_MISS) that follow each of them.  The success flags themselves then can be deleted, as they do not mark any actual events distinct from the SJ_EFT_INPUT_Match SJ_EFT_INPUT_NoMatch that they follow.&lt;br /&gt;
&lt;br /&gt;
Similarly, SJ_SAT_INPUT_Response_{Top, Bottom, Left, Right} events should be re-coded as context-free events based on the success flags (SJ_SAT_FirstOrder_{*} and SJ_SAT_SecondOrder_{*}).  In the re-coded events, both the four possible locations of the response (Top, Bottom, Left, Right) and the four possible correctness conditions of the response (Correct, IncorrectTrueLocation, IncorrectFakeLocation, IncorrectOtherLocation) should be preserved, thus there will be 4x4 = 16 possible codes.  The success flags themselves then can be deleted, as they do not mark any actual events distinct from the SJ_SAT_INPUT_Response_{*} events that they follow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to executive function&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
As simple behavioural measures of executive function, the software can compute - for each level separately and for all levels cumulatively - the total number of moves, the total time elapsed from start to finish (excluding time spent in EFT and SAT subtests), and the mean and standard deviation of the time between successive moves.  Other measures are possible; if you think of one, try it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to perceptual disembedding&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
d&amp;#039; (&amp;quot;d prime&amp;quot;) should be computed from tallies of EFT hits, misses, false alarms and correct rejections.  If the tally for any one of these four categories of responses is zero, that tally can be changed to 1 so as to estimate d&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Mean and standard deviation of EFT reaction time, for correct responses only, should be computed.  Also list out the single-trial reaction times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to theory-of-mind&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Single-trial data should be extracted and listed out for first-order and second-order questions in all trials.  Three types of trials exist: the first-order control condition in which the pirate scans but does not steal the cargo (probability 1/3, and note that in this case it doesn&amp;#039;t matter whether or not the admiral observes the pirate; the observed and unobserved cases can be collapsed into a single bin), the first-order theory-of-mind conditions in which the pirate steals the cargo but is not observed by the admiral (probability 1/3), and the second-order theory-of-mind condition in which the pirate steals the cargo but the admiral observes this theft and tells the captain (probability 1/3).  The single-trial data should be listed first for the no-theft condition, then separately for the unobserved theft condition, then separately for the observed theft condition.  The data for each trial comprise three timings and two correctness values: the time taken for the whole trial (SJ_SAT_END minus SJ_SAT_START), the reaction time for response to the first-order question (SJ_SAT_INPUT_Response_{*} minus SJ_SAT_FirstOrder_Question_Presented) and the correctness condition (Correct, IncorrectTrueLocation, IncorrectFakeLocation, IncorrectOtherLocation) of that response, and the reaction time for response to the second-order question (SJ_SAT_INPUT_Response_{*} minus SJ_SAT_SecondOrder_Question_Presented) and the correctness condition of that response.&lt;br /&gt;
&lt;br /&gt;
Summaries of correctness conditions for each of the two question types (first order, second order) for each of the three theft conditions (no theft, unobserved theft, observed theft) should be given both as tallies and as percentages.&lt;br /&gt;
&lt;br /&gt;
For correct responses only, means and standard deviations (where computable) should be given for the following reaction-time differences:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;First-order question:&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus No Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus Observed Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus (No Theft or Observed Theft, pooled)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Second-order question:&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus Unobserved Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus No Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus (Unobserved Theft or No Theft, pooled)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Independent Components Analysis&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
ICA can be applied separately to epochs from the Embedded Figures Test, epochs from the Sally-Anne test, and perhaps continuous EEG for the maze task.&lt;br /&gt;
&lt;br /&gt;
Remember not to include the skin-conductance channel (the greatest-numbered channel) in the ICA!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to perceptual disembedding&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Standard ERP and ERSP analyses can be constructed round the SJ_EFT_Stimulus_Presented event and corresponding SJ_EFT_INPUT_{*} response events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to theory-of-mind&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Some possible fMRI-based contrasts:&lt;br /&gt;
&lt;br /&gt;
Gaze perception (blink events or gaze aversion intervals versus direct gaze intervals)&lt;br /&gt;
&lt;br /&gt;
Facial expression perception (scowl intervals versus neutral intervals)&lt;br /&gt;
&lt;br /&gt;
Scene perception (egocentric view of person&amp;#039;s face, versus allocentric view of person&amp;#039;s hands on console, versus external view of spaceships)&lt;br /&gt;
&lt;br /&gt;
Perception of body movements (hands) or gestures (nods)&lt;br /&gt;
&lt;br /&gt;
Also note that, because these stimuli are cinematic, useful information can be gleaned from applying Uri Hasson&amp;#039;s approach of correlating individual subjects&amp;#039; voxelwise activation time series against the group mean.  This model-free procedure can identidy consistent activations, localised temporally and anatomically, across subjects.  The timings of such consistent activities then can be correlated with the video timecodes (see link in the table above).&lt;br /&gt;
&lt;br /&gt;
It may be useful to contrast fMRI time series during the video stimuli analogous to the behavioural (reaction-time) contrasts detailed above - that is, Unobserved Theft minus No Theft, Unobserved Theft minus Observed Theft, and so forth.  (For a list of specific contrasts, see the behavioural section above.)&lt;br /&gt;
&lt;br /&gt;
For EEG analyses, given the temporally extended nature of these stimuli spectral and other quantitative-EEG methods may be more appropriate than ERP&amp;#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to executive function&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Here again, quantitative-EEG methods may be most appropriate.  In addition, specific time-locked events may generate specific ERP&amp;#039;s of interest, for example error-related negativity on SJ_INPUT_Move_{*} events that immediately precede SJ_Caught_TeleportToStart events.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=621</id>
		<title>Data analysis - StarJack</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=621"/>
				<updated>2011-06-08T10:43:17Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added details on computation of derived behavioural measures, and basic information on physiological analyses&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The game begins with unparameterised SJ_START (1) and ends with SJ_END (19) followed by SJ_ENDSCREEN_CONTINUE (7).  The game also is considered to have ended if the begin code for any other mini-game occurs. The game comprises multiple iterations of three phases: the maze task (which can be used as a measure of executive function), the Embedded Figures Test (where reaction times measure perceptual disembedding), and the &amp;quot;Sally-Anne&amp;quot; test of theory-of-mind.&lt;br /&gt;
&lt;br /&gt;
Each level of the maze task begins with parameterised SJ_START (2) and ends with parameterised SJ_END (19).  Each level of the maze task is interrupted by invocations of the Embedded Figures Test, and punctuated by an invocation of the Sally-Anne test.  These latter two tests also can be invoked directly from the menu, without going through the maze test.&lt;br /&gt;
&lt;br /&gt;
The Embedded Figures Test begins with SJ_EFT_START (49) and ends with SJ_EFT_END_FAIL (44) or SJ_EFT_END_SUCCESS (50).&lt;br /&gt;
&lt;br /&gt;
The Sally-Anne test begins with SJ_SAT_START (52) and ends with SJ_SAT_END (53).&lt;br /&gt;
&lt;br /&gt;
Following is a list of all the event codes, then a summary of the relevant behavioural and electrophysiological derived measures to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Event codes (see &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/EventCode.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Screen/SallyAnneScreen.cs&amp;lt;/tt&amp;gt;),&amp;lt;br&amp;gt;&amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/HackingPhase/HackingPhaseScreen.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Dungeon/DungeonScreen.cs&amp;lt;/tt&amp;gt;&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The game has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level_&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;|tutorialLevel Room=Room_&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has entered a new maze level.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;Note that distinct numeric event codes (1 and 2) but one and the same string event descriptor (SJ_START) is used to denote the start of the game as a whole and to denote the start of an individual level of the maze within the game.  The difference is the presence or absence of the parameters.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_MouseClick&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_ENDSCREEN_CONTINUE&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to continue past the game end screen, exiting the game.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;(Note same numeric code as SJ_MENU_INPUT_MouseClick above.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Maze Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	9&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_Start&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has activated the invisibility cloak.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_End&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s invisibility cloak has deactivated on reaching the end of its allowed time.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_TrapPlaced&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has set a trap for the guards.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	12&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_GuardTrapped&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A trap previously set by the player has captured a guard.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Caught_TeleportToStart&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has been seen and caught by a guard or a camera, and teleports back to the starting position.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Esc&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the ESCAPE key to pause the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	15&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_Enter&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the enter key to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	19&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_END&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has reached the end of the current level.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	23&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Up&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the up-arrow to move up.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	24&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Down&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the down-arrow to move down.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	25&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Right&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the right-arrow to move right.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	26&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the left-arrow to move left.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	33&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Interact&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player is interacting with an object or entity.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	34&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_LeftClick&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the left mouse button at the given display coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Embedded Figures Test Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	38&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_Stimulus_Presented&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Key=Key&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt; Figure=Figure&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has been presented with a pair comprising a complex search figure and a smaller search target.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	39&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_HIT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	40&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_REJECT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	41&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_FALSE_ALARM&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	42&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_MISS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	44&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_FAIL&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has given incorrect responses on three trials, ending the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	46&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_NoMatch&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target does not occur within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	47&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Match&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target occurs within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	48&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Proceed&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has started a trial within the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	49&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_START&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The Embedded Figures Test has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	50&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_SUCCESS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has completed the Embedded Figures Test with fewer than three incorrect responses.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Theory-of-Mind Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	52&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	53&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_END&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has ended, after feedback has been given to the player.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	55&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_Video_Stop&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The currently active video has ended, and the player is being prompted to have it repeated or to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;See details of the &amp;lt;A HREF=&amp;quot;http://www.AutismCollaborative.org/wiki_aux/SJ_SAT_video_timecodes.txt&amp;quot;&amp;gt;video event timings&amp;lt;/i&amp;gt;.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	56&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	IGNORE (VideoReplay)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	(This code should not be being transcribed onto the parallel port and thus should not be appearing in the EEG log.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	58&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Continue&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the space bar, signalling readiness to view the next video stimulus.&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;(This same numeric code also can appear with the notation &amp;quot;IGNORE&amp;quot; in which case it should not be being transcribed to the parallel port and this should not be appearing in the EEG log.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	59&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_CargoDrop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the friendly space captain depositing the cargo on one of the planets has started.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	60&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Drop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate depositing the cargo on another planet has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always differ from that of the previous SJ_SAT_VideoStart_Pirate_Theft.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	61&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s theft of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	62&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s scan (but no theft) of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	64&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Top&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the up-arrow key, indicating a course to the TOP planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	65&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Bottom&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the down-arrow key, indicating a course to the BOTTOM planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	66&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the left-arrow key, indicating a course to the LEFT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	67&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Right&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the right-arrow key, indicating a course to the RIGHT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred (probability 1/3), the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has correctly indicated the planet on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 68, also is used by SJ_SAT_FirstOrder_NoTheft_Incorrect below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Incorrect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has indicated a planet other than that on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 68, is incorrect and ought to be 69.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo (probability 1/3), and reports this information to the captain, the player&amp;#039;s correct response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) actually indicates higher-order theory-of-mind: the captain believes that the pirate believes that the captain believes that the cargo remains in the planet where the captain had originally cached it, thus the player&amp;#039;s answer indicating the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop and SJ_SAT_VideoStart_Cruiser_View_Theft is correct.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 70, is incorrect and ought to be 73.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain) (probability 1/3), the player has correctly responded to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating that the captain will go to the planet on which she originally cached the cargo &amp;amp;mdash; that is, the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 70, also is used by SJ_SAT_FirstOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	71&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the true location of the cargo rather than the location believed by the captain.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	72&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	74&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectFakeLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the captain&amp;#039;s original hiding place (as though the admiral had not reported to the captain the pirate&amp;#039;s new hiding place).&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	75&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded correctly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the planet on which the captain cached the cargo.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 76, also is used by SJ_SAT_SecondOrder_NoTheft_&amp;lt;u&amp;gt;In&amp;lt;/u&amp;gt;correct below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the three planets that did &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; harbour the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 76, is incorrect and ought to be 77.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (incorrectly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 78, is incorrect and ought to be 81.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (correctly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 78, also is used by SJ_SAT_SecondOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	79&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (correctly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	82&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (incorrectly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	83&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	n the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	84&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Question_Presented&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Question_Presented&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	After the explanatory text (&amp;quot;The captain wants to pick up the cargo. She will steer her ship to the planet where she thinks the cargo is. The pirate wants to find the captain. He will steer his ship to wherever he thinks the captain will go.&amp;quot;), the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) or the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) has just been asked.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the same numeric event code, 84, is used for both SJ_SAT_FirstOrder_Question_Presented and SJ_SAT_SecondOrder_Question_Presented.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the admiral&amp;#039;s viewing of the theft has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 85, is incorrect and ought to be 86.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_NoScan&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate has stolen and re-cached the cargo, and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain, the video showing only noise and interference on the admiral&amp;#039;s viewscreen has started.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 85, also is used by SJ_SAT_VideoStart_Cruiser_View_Theft above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	87&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the video showing the admiral&amp;#039;s view of the pirate&amp;#039;s scanning but not stealing the cargo has started.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After deletion of codes 255 and greater, and alignment of the behavioural and EEG event sequences just as was done for Maritime Defender, processing should continue by correcting (both in the behavioural log file and in the EEG log file) the numeric event codes that are associated with the following string event descriptors in the behavioural log file (see notes in the table above):&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_FirstOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_FirstOrder_Scan_Correct&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Scan_Correct&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Question_Presented&lt;br /&gt;
&amp;lt;br&amp;gt;SJ_SAT_VideoStart_Cruiser_View_Theft&lt;br /&gt;
&lt;br /&gt;
SJ_EFT_INPUT_Match and SJ_EFT_INPUT_NoMatch events should be re-coded as context-free events based on the success flags (SJ_EFT_HIT, SJ_EFT_REJECT, SJ_EFT_FALSE_ALARM, SJ_EFT_MISS) that follow each of them.  The success flags themselves then can be deleted, as they do not mark any actual events distinct from the SJ_EFT_INPUT_Match SJ_EFT_INPUT_NoMatch that they follow.&lt;br /&gt;
&lt;br /&gt;
Similarly, SJ_SAT_INPUT_Response_{Top, Bottom, Left, Right} events should be re-coded as context-free events based on the success flags (SJ_SAT_FirstOrder_{*} and SJ_SAT_SecondOrder_{*}).  In the re-coded events, both the four possible locations of the response (Top, Bottom, Left, Right) and the four possible correctness conditions of the response (Correct, IncorrectTrueLocation, IncorrectFakeLocation, IncorrectOtherLocation) should be preserved, thus there will be 4x4 = 16 possible codes.  The success flags themselves then can be deleted, as they do not mark any actual events distinct from the SJ_SAT_INPUT_Response_{*} events that they follow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to executive function&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
As simple behavioural measures of executive function, the software can compute - for each level separately and for all levels cumulatively - the total number of moves, the total time elapsed from start to finish (excluding time spent in EFT and SAT subtests), and the mean and standard deviation of the time between successive moves.  Other measures are possible; if you think of one, try it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to perceptual disembedding&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
d&amp;#039; (&amp;quot;d prime&amp;quot;) should be computed from tallies of EFT hits, misses, false alarms and correct rejections.  If the tally for any one of these four categories of responses is zero, that tally can be changed to 1 so as to estimate d&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Mean and standard deviation of EFT reaction time, for correct responses only, should be computed.  Also list out the single-trial reaction times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Behavioural measures related to theory-of-mind&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Single-trial data should be extracted and listed out for first-order and second-order questions in all trials.  Three types of trials exist: the first-order control condition in which the pirate scans but does not steal the cargo (probability 1/3, and note that in this case it doesn&amp;#039;t matter whether or not the admiral observes the pirate; the observed and unobserved cases can be collapsed into a single bin), the first-order theory-of-mind conditions in which the pirate steals the cargo but is not observed by the admiral (probability 1/3), and the second-order theory-of-mind condition in which the pirate steals the cargo but the admiral observes this theft and tells the captain (probability 1/3).  The single-trial data should be listed first for the no-theft condition, then separately for the unobserved theft condition, then separately for the observed theft condition.  The data for each trial comprise three timings and two correctness values: the time taken for the whole trial (SJ_SAT_END minus SJ_SAT_START), the reaction time for response to the first-order question (SJ_SAT_INPUT_Response_{*} minus SJ_SAT_FirstOrder_Question_Presented) and the correctness condition (Correct, IncorrectTrueLocation, IncorrectFakeLocation, IncorrectOtherLocation) of that response, and the reaction time for response to the second-order question (SJ_SAT_INPUT_Response_{*} minus SJ_SAT_SecondOrder_Question_Presented) and the correctness condition of that response.&lt;br /&gt;
&lt;br /&gt;
Summaries of correctness conditions for each of the two question types (first order, second order) for each of the three theft conditions (no theft, unobserved theft, observed theft) should be given both as tallies and as percentages.&lt;br /&gt;
&lt;br /&gt;
For correct responses only, means and standard deviations (where computable) should be given for the following reaction-time differences:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;First-order question:&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus No Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus Observed Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Unobserved Theft minus (No Theft or Observed Theft, pooled)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Second-order question:&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus Unobserved Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus No Theft&lt;br /&gt;
&amp;lt;br&amp;gt;Observed Theft minus (Unobserved Theft or No Theft, pooled)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Independent Components Analysis&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
ICA can be applied separately to epochs from the Embedded Figures Test, epochs from the Sally-Anne test, and perhaps continuous EEG for the maze task.&lt;br /&gt;
&lt;br /&gt;
Remember not to include the skin-conductance channel (the greatest-numbered channel) in the ICA!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to perceptual disembedding&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Standard ERP and ERSP analyses can be constructed round the SJ_EFT_Stimulus_Presented event and corresponding SJ_EFT_INPUT_{*} response events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to theory-of-mind&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Some possible fMRI-based contrasts:&lt;br /&gt;
&lt;br /&gt;
Gaze perception (blink events or gaze aversion intervals versus direct gaze intervals)&lt;br /&gt;
&lt;br /&gt;
Facial expression perception (scowl intervals versus neutral intervals)&lt;br /&gt;
&lt;br /&gt;
Scene perception (egocentric view of person&amp;#039;s face, versus allocentric view of person&amp;#039;s hands on console, versus external view of spaceships)&lt;br /&gt;
&lt;br /&gt;
Perception of body movements (hands) or gestures (nods)&lt;br /&gt;
&lt;br /&gt;
Also note that, because these stimuli are cinematic, useful information can be gleaned from applying Uri Hasson&amp;#039;s approach of correlating individual subjects&amp;#039; voxelwise activation time series against the group mean.  This model-free procedure can identidy consistent activations, localised temporally and anatomically, across subjects.  The timings of such consistent activities then can be correlated with the video timecodes (see link in the table above).&lt;br /&gt;
&lt;br /&gt;
For EEG analyses, given the temporally extended nature of these stimuli spectral and other quantitative-EEG methods may be more appropriate than ERP&amp;#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Physiological measures related to executive function&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Here again, quantitative-EEG methods may be most appropriate.  In addition, specific time-locked events may generate specific ERP&amp;#039;s of interest, for example error-related negativity on SJ_INPUT_Move_{*} events that immediately precede SJ_Caught_TeleportToStart events.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=620</id>
		<title>Data analysis - StarJack</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_StarJack&amp;diff=620"/>
				<updated>2011-06-07T10:57:00Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: new page, added all event codes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The game begins with unparameterised SJ_START (1) and ends with SJ_END (19) followed by SJ_ENDSCREEN_CONTINUE (7).  The game also is considered to have ended if the begin code for any other mini-game occurs. The game comprises multiple iterations of three phases: the maze task (which can be used as a measure of executive function), the Embedded Figures Test (where reaction times measure perceptual disembedding), and the &amp;quot;Sally-Anne&amp;quot; test of theory-of-mind.&lt;br /&gt;
&lt;br /&gt;
Each level of the maze task begins with parameterised SJ_START (2) and ends with parameterised SJ_END (19).  Each level of the maze task is interrupted by invocations of the Embedded Figures Test, and punctuated by an invocation of the Sally-Anne test.  These latter two tests also can be invoked directly from the menu, without going through the maze test.&lt;br /&gt;
&lt;br /&gt;
The Embedded Figures Test begins with SJ_EFT_START (49) and ends with SJ_EFT_END_FAIL (44) or SJ_EFT_END_SUCCESS (50).&lt;br /&gt;
&lt;br /&gt;
The Sally-Anne test begins with SJ_SAT_START (52) and ends with SJ_SAT_END (53).&lt;br /&gt;
&lt;br /&gt;
Following is a list of all the event codes, then a summary of the relevant behavioural and electrophysiological derived measures to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Event codes (see &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/EventCode.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Screen/SallyAnneScreen.cs&amp;lt;/tt&amp;gt;),&amp;lt;br&amp;gt;&amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/HackingPhase/HackingPhaseScreen.cs&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;autism_collaborative/Game/StarJack/Dungeon/DungeonScreen.cs&amp;lt;/tt&amp;gt;&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The game has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_START&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level_&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;|tutorialLevel Room=Room_&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has entered a new maze level.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;Note that distinct numeric event codes (1 and 2) but one and the same string event descriptor (SJ_START) is used to denote the start of the game as a whole and to denote the start of an individual level of the maze within the game.  The difference is the presence or absence of the parameters.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_MouseClick&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_ENDSCREEN_CONTINUE&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the mouse to continue past the game end screen, exiting the game.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;(Note same numeric code as SJ_MENU_INPUT_MouseClick above.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Maze Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	9&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_Start&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has activated the invisibility cloak.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Cloak_End&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s invisibility cloak has deactivated on reaching the end of its allowed time.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_TrapPlaced&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player&amp;#039;s avatar has set a trap for the guards.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	12&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_GuardTrapped&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A trap previously set by the player has captured a guard.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_Caught_TeleportToStart&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has been seen and caught by a guard or a camera, and teleports back to the starting position.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Esc&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the ESCAPE key to pause the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	15&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_MENU_INPUT_Enter&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the enter key to select a sub-portion of the game.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	19&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_END&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Level=Level&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has reached the end of the current level.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	23&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Up&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the up-arrow to move up.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	24&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Down&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the down-arrow to move down.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	25&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Right&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the right-arrow to move right.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	26&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Move_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player has pressed the left-arrow to move left.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	33&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_Interact&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the maze, the player is interacting with an object or entity.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	34&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_INPUT_LeftClick&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;(X, Y)=&amp;lt;i&amp;gt;display coordinates&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has clicked the left mouse button at the given display coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Embedded Figures Test Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	38&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_Stimulus_Presented&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Key=Key&amp;lt;i&amp;gt;N&amp;lt;/i&amp;gt; Figure=Figure&amp;lt;i&amp;gt;M&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has been presented with a pair comprising a complex search figure and a smaller search target.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	39&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_HIT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	40&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_REJECT&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was a correct response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	41&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_FALSE_ALARM&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_Match event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	42&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_MISS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the SJ_EFT_INPUT_NoMatch event immediately preceding was an incorrect response.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	44&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_FAIL&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has given incorrect responses on three trials, ending the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	46&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_NoMatch&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target does not occur within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	47&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Match&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the Embedded Figures Test, the player has indicated that the target occurs within the given figure.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	48&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_INPUT_Proceed&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has started a trial within the Embedded Figures Test.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	49&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_START&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The Embedded Figures Test has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	50&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_EFT_END_SUCCESS&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has completed the Embedded Figures Test with fewer than three incorrect responses.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td COLSPAN=&amp;quot;3&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Theory-of-Mind Task Events&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	52&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_START&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has begun.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	53&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_END&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The theory-of-mind test (a.k.a. the &amp;quot;Sally-Anne test&amp;quot;) has ended, after feedback has been given to the player.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	55&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_Video_Stop&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The currently active video has ended, and the player is being prompted to have it repeated or to continue.&lt;br /&gt;
&amp;lt;br&amp;gt;		&amp;lt;i&amp;gt;See details of the &amp;lt;A HREF=&amp;quot;http://www.AutismCollaborative.org/wiki_aux/SJ_SAT_video_timecodes.txt&amp;quot;&amp;gt;video event timings&amp;lt;/i&amp;gt;.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	56&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	IGNORE (VideoReplay)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	(This code should not be being transcribed onto the parallel port and thus should not be appearing in the EEG log.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	58&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Continue&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the space bar, signalling readiness to view the next video stimulus.&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;(This same numeric code also can appear with the notation &amp;quot;IGNORE&amp;quot; in which case it should not be being transcribed to the parallel port and this should not be appearing in the EEG log.)&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	59&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_CargoDrop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the friendly space captain depositing the cargo on one of the planets has started.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	60&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Drop&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate depositing the cargo on another planet has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always differ from that of the previous SJ_SAT_VideoStart_Pirate_Theft.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	61&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s theft of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	62&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Pirate_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the pirate&amp;#039;s scan (but no theft) of the cargo has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	64&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Top&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the up-arrow key, indicating a course to the TOP planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	65&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Bottom&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the down-arrow key, indicating a course to the BOTTOM planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	66&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Left&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the left-arrow key, indicating a course to the LEFT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	67&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_INPUT_Response_Right&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In response to a request to plot an intercept course, the player has pressed the right-arrow key, indicating a course to the RIGHT planet.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred (probability 1/3), the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has correctly indicated the planet on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 68, also is used by SJ_SAT_FirstOrder_NoTheft_Incorrect below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	68&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_NoTheft_Incorrect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the player&amp;#039;s response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) has indicated a planet other than that on which the cargo was originally cached by the captain (and on which it remains cached).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 68, is incorrect and ought to be 69.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo (probability 1/3), and reports this information to the captain, the player&amp;#039;s correct response to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) actually indicates higher-order theory-of-mind: the captain believes that the pirate believes that the captain believes that the cargo remains in the planet where the captain had originally cached it, thus the player&amp;#039;s answer indicating the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop and SJ_SAT_VideoStart_Cruiser_View_Theft is correct.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 70, is incorrect and ought to be 73.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	70&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain) (probability 1/3), the player has correctly responded to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating that the captain will go to the planet on which she originally cached the cargo &amp;amp;mdash; that is, the same &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; as in the preceding SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 70, also is used by SJ_SAT_FirstOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	71&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the true location of the cargo rather than the location believed by the captain.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	72&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Theft_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	74&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectFakeLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the captain&amp;#039;s original hiding place (as though the admiral had not reported to the captain the pirate&amp;#039;s new hiding place).&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	75&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded correctly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating the planet on which the captain cached the cargo.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 76, also is used by SJ_SAT_SecondOrder_NoTheft_&amp;lt;u&amp;gt;In&amp;lt;/u&amp;gt;correct below.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	76&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_NoTheft_Incorrect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which the pirate scans but does not steal the cargo, the player has responded incorrectly to the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) by indicating one of the three planets that did &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; harbour the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 76, is incorrect and ought to be 77.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_Correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (incorrectly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 78, is incorrect and ought to be 81.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	78&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_Correct&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player has responded correctly to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) by indicating the planet on which the captain had originally cached the cargo.  Because the pirate wants to find the captain, and the pirate believes (correctly) that the captain believes that the cargo remains where the captain originally cached it, the pirate will indeed go to the planet where the cargo was originally cached.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 78, also is used by SJ_SAT_SecondOrder_Scan_Correct above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	79&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Theft_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate steals and re-caches the cargo (and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain), the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (correctly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	82&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectTrueLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports the planet to which the cargo was moved by the pirate, instead of the planet on which the captain originally cached the cargo.  Although the captain wants to find the &amp;lt;u&amp;gt;cargo&amp;lt;/u&amp;gt;, the pirate wants to find the &amp;lt;u&amp;gt;captain&amp;lt;/u&amp;gt;.  Thus the pirate will move not to the planet on which he cached the cargo, but to the planet that he (incorrectly) believes that the captain believes the cargo is on, that is, the planet on which the captain originally cached the cargo.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	83&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_SecondOrder_Scan_IncorrectOtherLocation&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	n the scenario in which the admiral scans the pirate stealing and re-caching the cargo, and reports this information to the captain, the player&amp;#039;s response to the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) incorrectly reports one of the two planets that harbours neither the captain&amp;#039;s original cache nor the pirate&amp;#039;s subsequent cache.  (This should hardly ever happen, and when it does happen it&amp;#039;s as likely to be a consequence of keypress error as any other factor.)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	84&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_FirstOrder_Question_Presented&amp;lt;br&amp;gt;SJ_SAT_SecondOrder_Question_Presented&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	After the explanatory text (&amp;quot;The captain wants to pick up the cargo. She will steer her ship to the planet where she thinks the cargo is. The pirate wants to find the captain. He will steer his ship to wherever he thinks the captain will go.&amp;quot;), the first-order question (&amp;quot;Where will you send a ship to meet up with the captain?&amp;quot;) or the second-order question (&amp;quot;Where will you send a ship to intercept the pirate?&amp;quot;) has just been asked.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the same numeric event code, 84, is used for both SJ_SAT_FirstOrder_Question_Presented and SJ_SAT_SecondOrder_Question_Presented.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_Theft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The video showing the admiral&amp;#039;s viewing of the theft has started. The &amp;lt;i&amp;gt;PLANET&amp;lt;/i&amp;gt; parameter will always be the same as that of the previous SJ_SAT_VideoStart_CargoDrop.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated with this event, 85, is incorrect and ought to be 86.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	85&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_NoScan&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the scenario in which the pirate has stolen and re-cached the cargo, and the admiral cannot scan this activity and thus can&amp;#039;t report anything to the captain, the video showing only noise and interference on the admiral&amp;#039;s viewscreen has started.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Note that the numeric event code associated correctly with this event, 85, also is used by SJ_SAT_VideoStart_Cruiser_View_Theft above.  This error is the result of a bug in SallyAnneScreen.cs.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	87&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	SJ_SAT_VideoStart_Cruiser_View_NoTheft&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Planet=&amp;lt;i&amp;gt;{TOP, RIGHT, BOTTOM, LEFT}&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	In the control condition in which no theft has occurred, the video showing the admiral&amp;#039;s view of the pirate&amp;#039;s scanning but not stealing the cargo has started.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Functional_specifications&amp;diff=619</id>
		<title>Functional specifications</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Functional_specifications&amp;diff=619"/>
				<updated>2011-06-07T10:37:01Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: Inserted a link to &amp;#039;Data Analysis - StarJack&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to this game&amp;#039;s functional spec table of contents.  There are two major parts: the colony simulator and the minigames.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Important Neuroscientific Considerations in Game Design for Autism]]&lt;br /&gt;
&lt;br /&gt;
[[Data analysis - Maritime Defender]]&lt;br /&gt;
&lt;br /&gt;
[[Data analysis - StarJack]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Colony Simulator&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Colony Mode]]&lt;br /&gt;
&lt;br /&gt;
[[Factions]]&lt;br /&gt;
&lt;br /&gt;
[[Structures]]&lt;br /&gt;
&lt;br /&gt;
[[Consumables]]&lt;br /&gt;
&lt;br /&gt;
[[Tasks]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Minigames&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Meteor Madness]] / Maritime Defender&lt;br /&gt;
&lt;br /&gt;
[[Star Jack]] / Starjack&lt;br /&gt;
&lt;br /&gt;
[[Stellar Prospector]]&lt;br /&gt;
&lt;br /&gt;
[[Face Off]]&lt;br /&gt;
&lt;br /&gt;
[[Factory Frenzy]] (Deprecated)&lt;br /&gt;
&lt;br /&gt;
[[Mini Game Rewards]]&lt;br /&gt;
&lt;br /&gt;
[[Mini Game Scenarios]]&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Maritime_Defender&amp;diff=618</id>
		<title>Data analysis - Maritime Defender</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Maritime_Defender&amp;diff=618"/>
				<updated>2011-05-16T13:54:38Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: Added details on event codes, event code translations, and derived behavioural and electrophysiological measures&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Maritime Defender&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The game begins with MD_MaritimeDefenderGameBegin (41) and ends with MD_DotCoherenceEstimate (6).  The game also is considered to have ended if the begin code for any other mini-game occurs.  The game comprises multiple iterations of two phases, the shooter phase (testing go/no-go inhibition) and the navigation phase (testing motion coherence perception).  The shooter phase begins with MD_ShooterPhaseBegin (13) and ends with either MD_DotPhaseBegin (1) or MD_BossPhaseBegin (32).  The navigation phase begins with MD_DotPhaseBegin (1) and ends with either MD_ShooterPhaseBegin (13) or MD_BossPhaseBegin (32).  Any phase also can be terminated with an End_of_log (0) code, which appears in the behavioural log file but not in the EEG log file.  Following is a list of all the event codes, then a summary of the relevant behavioural and electrophysiological derived measures to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotPhaseBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The navigation phase (comprising many motion coherence trials) of the game has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	One individual motion coherence trial (within the navigation phase) has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	3&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialExpire&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	A motion coherence trial has timed out without any behavioural response&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	4&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialUserRespondLeft&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the left arrow during a motion coherence trial&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotTrialUserRespondRight&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has pressed the right arrow during a motion coherence trial&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	6&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DotCoherenceEstimate&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	At the end of a navigation phase, the maximum-likelihood estimator has recalculated the psychophysical perceptual threshold for motion coherence&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierTestBegin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	At the beginning of the game, the friend-or-foe ship identifier dialogue has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	8&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierSelectLeft&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the friend-or-foe ship identifier dialogue, the player has pressed the left arrow&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	9&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierSelectRight&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the friend-or-foe ship identifier dialogue, the player has pressed the right arrow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierConfirmSelection&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the friend-or-foe ship identifier dialogue, the player has pressed the return key to confirm their selection&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierTestEndSuccess&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player&amp;#039;s response in the friend-or-foe ship identifier dialogue is correct&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	12&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShipIdentifierTestEndFailure&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player&amp;#039;s response in the friend-or-foe ship identifier dialogue is incorrect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPhaseBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The shooter phase (comprising many go/no-go trials) of the game has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateOpenWormholeBeam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the up-arrow to activate the wormhole-opener beam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	15&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseOpenWormholeBeam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the up-arrow to cease the wormhole-opener beam&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	16&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterOpenWormholeSuccess&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the wormhole-opener beam has opened the wormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	17&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateMovePort&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the left-arrow to begin moving clockwise&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	18&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseMovePort&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the left-arrow to cease moving clockwise&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	19&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateMoveStarboard&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the right-arrow key to begin moving anticlockwise&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	20&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseMoveStarboard&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the right-arrow key to cease moving anticlockwise&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	21&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPresentFriendly&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a friendly ship has emerged from an opened wormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	22&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPresentEnemy&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a hostile ship has emerged from an opened wormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	23&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPresentWormhole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a wormhole has appeared&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	24&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterActivateFireWeapon&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has depressed the space bar to begin firing&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	25&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCeaseFireWeapon&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player has released the space bar to cease firing&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	26&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPlayerWeaponFired&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the weapon has fired (Multiple WeaponFired events can occur between an ActivateFireWeapon and a CeaseFireWeapon, as the space bar is held down for continuous fire)&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	27&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterEnemyWeaponFired&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a hostile ship has fired at the player&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	28&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterCollectibleSpawned&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, a collectible has emerged from a destroyed asteroid or from a friendly ship&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	29&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPlayerCollectibleCollision&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player&amp;#039;s ship has picked up a collectible&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	30&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterMeteorExplosion&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, an asteroid has exploded&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	31&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_ShooterPlayerGetsHit&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the shooter phase, the player&amp;#039;s ship has been hit by hostile fire or by an asteroid&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	32&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_BossPhaseBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The &amp;#039;boss phase&amp;#039; has begun - no scientifically important events here, just entertainment and reward for completing the level&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	33&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_GameSuccess&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	&amp;lt;b&amp;gt;The player has successfully completed the boss phase, beating the game&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	34&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_GameFailure&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	&amp;lt;b&amp;gt;During any game phase (shooter, navigation, or boss), the player&amp;#039;s last of three ships has been destroyed, losing the game&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	35&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_DialogSkip&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has skipped a dialogue&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	36&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_MenuSelect&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has selected an item in the menu&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	37&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_MenuCancel&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has cancelled the menu&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	38&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Pause&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has paused the game&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	39&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Unpause&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has unpaused the game&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	40&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_OpenConsole&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The player has opened the console&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	41&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_MaritimeDefenderGameBegin&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	&amp;lt;b&amp;gt;The game has begun&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	42&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_CockpitDamageFeedback&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	During the navigation phase, the cockpit shakes, indicating damage and loss of energy, following a non-response or an incorrect response&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	43&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_TutorialStart&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The optional tutorial has begun&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	44&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section1&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	This and the next several codes define the times of entry into the tutorial&amp;#039;s several successive sections:&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	45&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section2&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	46&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	47&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section4&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	48&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section5&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	49&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	50&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section7&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	51&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section8&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	52&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section9&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	53&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section10&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	54&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section11&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	55&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	56&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section13&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	57&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section14&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	58&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section15&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	59&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_Section16&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;	60&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	MD_TutorialEnd&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;	The tutorial has ended&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The processing software should delete all existing event codes greater than or equal to 255.  These codes are inserted by the BioSemi EEG recording hardware and are not needed.&lt;br /&gt;
&lt;br /&gt;
The processing software then must align (both by sequence and by specific temporal offset) the event codes in the EEG record with the event codes in the game log.  The game log is the master copy of the event codes; codes transmitted to the EEG recorder can sometimes be erroneously dropped or, more rarely, erroneously replicated.&lt;br /&gt;
&lt;br /&gt;
Lastly, the processing software must translate context-sensitive event codes (for example, a stimulus, contextualised by either an incorrect behavioural response or a correct behavioural response following) into context-free event codes as detailed below.  Events that already are context-free should simply be transcribed as is.  All events - both those that are being translated and those that are being transcribed - should be renumbered so that their codes are greater than 255 and in a range dedicated to each mini-game separately.  This constraint could be implemented, for example, by adding 1000 to the transcribed event codes for Maritime Defender, adding 2000 to those for Stellar Prospector, and so on, creating a separate, non-overlapping range of event codes for each mini-game.&lt;br /&gt;
&lt;br /&gt;
These event code translations, and all derived behavioural data as detailed below, should be integrated into Keith Yoder&amp;#039;s Astropolis Processing Toolkit so that they are fully automated and can be performed at the touch of a button by a user who knows nothing of computer programming.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Independent Components Analysis&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For the shooter phase, ICA can be applied to epochs beginning with MD_ShooterOpenWormholeSuccess and ending with MD_ShooterActivateFireWeapon, MD_ShooterEnemyWeaponFired, or MD_ShooterCollectibleSpawned, whichever comes first.&lt;br /&gt;
&lt;br /&gt;
For the navigation phase, ICA can be applied to the entire continuous EEG record from the first MD_DotTrialBegin after the MD_DotPhaseBegin, up till the first event that is NOT any of MD_DotTrialBegin (2), MD_DotTrialExpire (3), MD_UserRespondLeft (4), MD_UserRespondRight (5), or MD_CockpitDamageFeedback (42).&lt;br /&gt;
&lt;br /&gt;
Remember not to include the skin-conductance channel (the greatest-numbered channel) in the ICA!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to behavioural inhibition&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Go trials and no-go trials each can be successful or unsuccessful; there are therefore four categories of events each beginning with an MD_ShooterPresentFriendly (21) which signals a no-go trial or an MD_ShooterPresentEnemy (22) which signals a go trial.  The analysis software should use the context provided by subsequent events to translate these two codes into four codes as follows:&lt;br /&gt;
&lt;br /&gt;
At an MD_ShooterPresentFriendly (21), if there is no MD_ShooterActivateFireWeapon (24) until the next MD_ShooterCollectibleSpawned (28) or until 5 seconds have elapsed, whichever is sooner, then code this event as MD_ShooterNoGoSUCCEED.  Otherwise code MD_ShooterNoGoFAIL.  This new event code replaces the originally logged MD_ShooterPresentFriendly, and is inserted into the data at the time time stamp as the originally logged event.&lt;br /&gt;
&lt;br /&gt;
At an MD_ShooterPresentEnemy (22), if there is no MD_ShooterActivateFireWeapon (24) until the next MD_ShooterEnemyWeaponFired (27) or until 5 seconds have elapsed, whichever is sooner, then code this event as MD_ShooterGoFAIL.  Otherwise code MD_ShooterGoSUCCEED.  This new event code replaces the originally logged MD_ShooterPresentFriendly, and is inserted into the data at the time time stamp as the originally logged event.&lt;br /&gt;
&lt;br /&gt;
MD_ShooterActivateFireWeapon events within MD_ShooterNoGoFAIL sequences should be re-coded as MD_ShooterWeaponFALSE_ALARM.  MD_ShooterActivateFireWeapon events within MD_ShooterGoSUCCEED sequences should be re-coded as MD_ShooterWeaponHIT.&lt;br /&gt;
&lt;br /&gt;
The following behavioural measures can be computed:&amp;lt;br&amp;gt;&lt;br /&gt;
1. &amp;lt;b&amp;gt;Reaction time&amp;lt;/b&amp;gt;: The mean and standard deviation of reaction time for MD_ShooterGoSUCCEED can be calculated from the intervals between the relevant MD_ShooterPresentEnemy and MD_ShooterActivateFireWeapon events.&amp;lt;br&amp;gt;&lt;br /&gt;
2. &amp;lt;b&amp;gt;Accuracy&amp;lt;/b&amp;gt;: d&amp;#039; can be calculated where hits are MD_ShooterGoSUCCEED, misses are MD_ShooterGoFAIL, false alarms are MD_ShooterNoGoFAIL, and correct rejections are MD_ShooterNoGoSUCCEED.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Motor and preparatory potentials&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For the events MD_ShooterActivateMovePort (17), MD_ShooterActivateMoveStarboard (19), and MD_ShooterActivateOpenWormholeBeam (14), both the bereitschaftspotential (readiness potential, from supplementary motor area) ERP and the event-related desynchronisation of the mu rhythm near the hand area (lateral central electrodes) can be computed.&lt;br /&gt;
&lt;br /&gt;
The interval between MD_ShooterOpenWormholeSuccess (16) and MD_ShooterGoSUCCEED will evoke a Contingent Negative Variation at frontocentral electrodes which resolves into a motor execution.  The interval between MD_ShooterOpenWormholeSuccess (16) and MD_ShooterNoGoSUCCEED will evoke the same Contingent Negative Variation, followed by a further inhibition-related negativity instead of by motor execution.  Both the CNV beginning at the time of MD_ShooterOpenWormholeSuccess and the response-related activities time-locked to MD_ShooterGoSUCCEED and MD_ShooterNoGoSUCCEED are of interest.&lt;br /&gt;
&lt;br /&gt;
The following behavioural measures can be computed:&lt;br /&gt;
1. Between each pair of MD_ShooterPresentWormhole (23) and MD_ShooterOpenWormholeSuccess (16):&amp;lt;br&amp;gt;&lt;br /&gt;
1A. Elapsed time (mean and SD)&amp;lt;br&amp;gt;&lt;br /&gt;
1B. Number of distinct movement commands (MD_ShooterActivateMovePort (17) or MD_ShooterActivateMoveStarboard (19)), and also the mean and SD of this quantity after Anscombe transformation or other Poisson-to-normal transformation.&amp;lt;br&amp;gt;&lt;br /&gt;
2. A detailed curve, with a sequence number (1, 2, 3, ...) of the wormhole event on the x axis and the number of movement commands on the y axis; does the player improve as time goes on?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to attention and context updating&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
P3 on MD_ShooterNoGoSUCCEED, and separately on MD_ShooterGoSUCCEED: mean half-integral amplitude and latency.&lt;br /&gt;
&lt;br /&gt;
Frontal negativity following MD_ShooterNoGoSUCCEED (contrast to the same following MD_ShooterGoSUCCEED).&lt;br /&gt;
&lt;br /&gt;
P1 on MD_ShooterNoGoSUCCEED and MD_ShooterGoSUCCEED pooled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to motion perception&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Leftward-drifting trials and rightward-drifting trials each can be successful or unsuccessful; there are therefore four categories of events each beginning with an MD_DotTrialBegin (2).  The analysis software should use the context provided by subsequent events to translate this code into six codes as follows:&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left followed by MD_UserRespondLeft as the very next event, code MD_DotLeftHIT, and similarly at an MD_DotTrialBegin Direction=Right followed by MD_UserRespondRight as the very next event, code MD_DotRightHIT.&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left followed by MD_UserRespondRight as the very next event, code MD_DotLeftFALSE_ALARM, and similarly at an MD_DotTrialBegin Direction=Right followed by MD_UserRespondLeft as the very next event, code MD_DotRightFALSE_ALARM.&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left whose next event is neither MD_UserRespondLeft nor MD_UserRespondRight is an MD_DotLeftMISS, and similarly an MD_DotTrialBegin Direction=Right whose next event is neither MD_UserRespondLeft nor MD_UserRespondRight is an MD_DotRightMISS.&lt;br /&gt;
&lt;br /&gt;
MD_UserRespondLeft events following MD_DotLeftHIT, and MD_UserRespondRight events following MD_DotRightHIT, should be re-coded as MD_DotResponseHIT.&lt;br /&gt;
&lt;br /&gt;
MD_UserRespondRight events following MD_DotLeftFALSE_ALARM, and MD_UserRespondLeft events following MD_DotRightFALSE_ALARM, should be re-coded as MD_DotResponseFALSE_ALARM.&lt;br /&gt;
&lt;br /&gt;
MD_CockpitDamageFeedback events immediately following MD_DotResponseFALSE_ALARM events should be re-coded as MD_DotFeedbackFALSE_ALARM.  MD_CockpitDamageFeedback events immediately following MD_DotTrialBegin events should be re-coded as MD_DotFeedbackMISS.&lt;br /&gt;
&lt;br /&gt;
ERPs and ERSPs time-locked to each of the six MD_Dot stimulus onset events can be compared; pilot data indicate that the ERSPs would show event-related desynchronisations in occipital generators.  (There might not be sufficient FALSE_ALARM events for reliable averaging, in which case just the HIT and MISS events can be compared.)  Likewise, ERPs and ERSPs time-locked to each of the three (or two, if there are insufficient numbers of false alarms) MD_DotResponse events can be compared.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to reward&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
MD_ShooterCollectibleCollision (29) and MD_ShooterMeteorExplosion (30) both can be examined for a cingulate negativity related to reward value which occurs between 250 and 350 ms post-stimulus; see Yeung et al. http://dx.doi.org/10.1093/cercor/bhh153&lt;br /&gt;
&lt;br /&gt;
Skin conductance response (recorded on the highest-numbered channel) may also be of particular interest during these events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to error processing&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
MD_ShooterWeaponFALSE_ALARM events should generate a cingulate error-related negativity; this error-related negativity can be most straightforwardly visualised by computing a difference wave: subtract the ERP associated with MD_ShooterWeaponHIT events from the ERP associated with MD_ShooterWeaponFALSE_ALARM events.&lt;br /&gt;
&lt;br /&gt;
During the navigation phase, a couple of strategies might be applied to discern the error-related negativity associated with erroneous responses:  The right way to do it, if there were enough MD_DotResponseFALSE_ALARM events available for reliable ERP averaging, would be to subtract the ERP associated with MD_DotResponseHIT events from the ERP associated with MD_DotResponseFALSE_ALARM events.  But there probably won&amp;#039;t be sufficient numbers of false-alarm responses for that.  Instead of false alarms, subjects who are unable to discern the motion direction probably will generate misses - that is, no overt behavioural response at all.  So we can look at the ERP associated with MD_DotFeedbackMISS (without any subtraction).&lt;br /&gt;
&lt;br /&gt;
Skin conductance response (recorded on the highest-numbered channel) may also be of particular interest during these events.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=617</id>
		<title>Important Neuroscientific Considerations in Game Design for Autism</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=617"/>
				<updated>2011-05-16T04:07:53Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: add a caution on repetitive behaviours&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Neuroscientific Considerations in Game Design for Autism&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If there&amp;#039;s a way to use a game feature as an object of repetitive behaviour, a player with autism will find it..&amp;#039;&amp;#039;&amp;#039;  Players with autism often find predictable sensory contingencies more rewarding than unpredictable, surprising events.  So whereas non-autistic players could be expected to self-motivate to &amp;#039;level up&amp;#039; or in general to proceed through the game narrative, autistic players often are more content to keep on repeating the same feature, or causing the game to produce the same sound or visual effect.  These purely &amp;lt;u&amp;gt;sensory&amp;lt;/u&amp;gt; effects can be much more salient and motivating to a person with autism than the less tangible and immediate, more abstract and future-oriented effect of, say, a game score or a power-up.  So, for instance, an autistic player might become fascinated with the sound effect that takes place when their avatar is destroyed, and therefore keep &amp;#039;dying&amp;#039; on purpose, just to hear the sound effect - clearly a strategy that thwarts the intended game mechanic!  When designing and implementing a game, put yourself in the place of the player with autism, asking yourself, &amp;quot;What sensory aspects of this game could a person become fixated on?&amp;quot;  Try to move the player through the game, nudging them away from such repetitive behaviours and into new experiences.  At the same time, though, you can use &amp;lt;u&amp;gt;limited&amp;lt;/u&amp;gt;, &amp;lt;u&amp;gt;rationed&amp;lt;/u&amp;gt; opportunities for repetitive behaviour as a reward and a motivation for moving through the game - e.g. a game structure that allows a player ten (and only ten) repetitions of their favourite sound effect once they&amp;#039;ve done the hard work of reaching the next level.&lt;br /&gt;
&amp;lt;br&amp;gt;In his memoir &amp;lt;i&amp;gt;There&amp;#039;s a Boy in Here&amp;lt;/i&amp;gt;, Sean Barron describes his own autistic fascination with repetition and predictability:&lt;br /&gt;
&amp;lt;br&amp;gt;‘I loved repetition.  Every time I turned on a light I knew what would happen.  When I flipped the switch, the light went on.  It gave me a wonderful feeling of security because it was the same each time….  Even when I knew, it was thrilling to do it over and over.  It was always the same.&amp;#039;&lt;br /&gt;
&amp;lt;br&amp;gt;‘People bothered me.  I didn’t know what they were for or what they would do to me.  They were not always the same and I had no security with them at all….&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid timed events; give the player control of when things happen; whenever possible, prompt the player.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism have difficulty with executive function, that is, in rapidly planning and executing actions in response to sensory inputs.  They have a great deal of skill and often exceed the performance of people without autism -- but it&amp;#039;s a intensely studied and considered, deliberate style of skill, often not expressed under time pressure.  So it&amp;#039;s important to make certain that the timing of events is controlled not by the computer (except in cases where the experiment requires it) but by the player.  Small additions such as a &amp;quot;next&amp;quot; button or a &amp;quot;ready&amp;quot; button can make all the difference.  (An example of the event-driven rather than time-driven structure is the use of the up-arrow key to connect with the wormhole in the Maritime Defender mini-game.)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Do not depend on a player&amp;#039;s memory for instructions; prompt the player every time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	A corollary of the executive planning problem is that the player may have trouble remembering a sequence of steps.  Even if (s)he has learnt in a tutorial that key A triggers action X and key B triggers action Y, these arbitrary associations might not be remembered, unless the player has had a chance to practise these actions actively, many times over.&lt;br /&gt;
&lt;br /&gt;
Another corollary of this memory problem: &amp;#039;&amp;#039;&amp;#039;Do not make input-output mappings depend on the game state.&amp;#039;&amp;#039;&amp;#039;  You might be tempted to hide functions inside submenus, access to which depends on the player&amp;#039;s clicking on the right primary menu, or to make a drag of the mouse do something different after a click than after no click (or even worse, something different after a left-click than after a right-click).  Avoid such sequential logic in the user interface.  Wherever possible, use purely combinational logic.  Some sequential logic is of course unavoidable -- otherwise we wouldn&amp;#039;t be able to have separate mini-games! -- but it ought to be used sparingly and only when absolutely required.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Instead of a sequence of actions, ask for one action at a time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Rapid actions can be difficult enough by themselves, but when people with autism face the additional demand of performing several of these actions rapidly and in the proper sequence thay can feel very much overwhelmed.  (See the previous entries on executive function and memory.)  Instead of requiring sequences of inputs in response to a single prompt, try to prompt separately for each input.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use pictures, not words.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Most people with autism tend to think in pictures rather than words.  Instructions presented as text might not be comprehended -- not because the player is incapable of comprehending but because (s)he&amp;#039;s concentrating so much on decoding the individual words that (s)he can&amp;#039;t spare much effort to put those words together into the meanings of complete sentences and narratives.  Sometimes text is unavoidable; if text is used, avoid verbosity and don&amp;#039;t clutter the display with words.  Reading can be slow; see the entry on &amp;#039;&amp;#039;timed events&amp;#039;&amp;#039; above about waiting and prompting the player to continue.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Players should learn by doing, not just by observing or reading or listening.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	In this regard, people with autism are no different from people without autism: we all learn best when we can be active rather than passive learners.  The challenges faced by people with autism make it even more crucial that game activities involve learning-by-doing, rather than depending on learning-by-reading or learning-by-listening.  This is particularly true of the game tutorials.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid depending on simultaneous or near-simultaneous events in different perceptual channels (e.g. different places on the screen, or different senses such as video with audio).&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism focus intensely and exclusively on one perceptual channel at a time.  When focusing on one point or area of the display, events away from this spatial focus of attention may not register.  Anathema for a person with autism would be a cockpit display with many gauges indicating different quantities which all need to be observed simultaneously -- or a visual display that needs to be observed at the same time as a spoken or other auditory signal.  (Background music is okay because it doesn&amp;#039;t need to be attended; players can just let it go on whilst they focus on the visual display.)  Instead, either information should be displayed in one region of the display or one sensory channel, or ample time should be allowed to shift attention between points in visual space or between sensory channels.  Shifts of attention can take 2 to 3 seconds for people with autism, whereas people without autism take 0.2 to 0.3 seconds.  Think about what it would be like to be looking at the display through a long telescope that magnifies a small area but shuts out the periphery.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid evoking unnecessary anxiety.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism are &amp;#039;&amp;#039;&amp;#039;much&amp;#039;&amp;#039;&amp;#039; more prone to anxiety than people without autism -- especially when faced with a new and unpractised task, or with a timed task, or with an interactive situation that&amp;#039;s out of their control.  (See entries above on avoiding timed events and giving prompting, pictures, and practice.)  Do everything possible to make certain that the player, not the computer, is the one controlling what happens next, and that the player has every opportunity to practise and to become comfortable with the demands of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For repeating events, vary the timing slightly so that the time between two successive instances of the event is not constant.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This consideration actually isn&amp;#039;t about accommodating people with autism; rather, it&amp;#039;s about accommodating EEG analysis.  Those of you who know something about signal processing will be familiar with the phenomenon of &amp;#039;&amp;#039;&amp;#039;aliasing&amp;#039;&amp;#039;&amp;#039; in which a discrete sampling of a high-frequency signal at too low a sampling rate produces an artefactual low-frequency oscillation.  The problem here has a lot in common with aliasing.  Consider as an example the situation that exists when the firing button is pressed and held: the weapons will fire at a certain rate, say, once every 500 ms.  Suppose that we&amp;#039;re interested in the brain response to the combined auditory and visual effects associated with weapons firing.  Suppose also, though, that there is an ongoing, endogenous (that is, internally driven) 10 hz oscillation in the player&amp;#039;s brain that has nothing to do with these exogenous stimuli.  Since 500 ms is an integral multiple of the 100 ms period of this oscillation, when we sample the exogenous brain response to each weapons firing we&amp;#039;re going to end up also sampling the endogenous oscillation at the same point in its phase every time, and we will thus misattribute the endogenous signal as an exogenous response to the weapons firing.  To forestall this ambiguity in EEG analysis, we can add a small amount of temporal jitter to the intervals between firings - not so much as to make them seem unnaturally jittery to the player, but enough to get rid of this phase artefact.  The exact amount depends on what seems natural given the event separation; in this example of a 500 ms event we might deem that any variation more than 10% of the interval in either direction would seem unnatural, so we might then choose to vary the intervals over a uniform distribution from 450 ms to 550 ms.  Given the frequencies of the signals in which we&amp;#039;re interested, it isn&amp;#039;t ever necessary to add more than 150 ms (that is, 75 ms in either direction) of temporal jitter.  Add as much temporal jitter as you can, up to this 150 ms limit - but don&amp;#039;t sacrifice playability.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Log event codes for everything - absolutely everything.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This is another consideration for EEG analysis.  Did the weapons just fire (even though the firing key is being held down constantly)?  That&amp;#039;s an event.  Did some sort of motion start or stop or change speed?  That&amp;#039;s an event.  Absolutely everything that happens in the game should be reported with an event code.  (See &amp;quot;Game/Engine/Logger.cs&amp;quot;.)  We can always ignore event codes if we decide that they aren&amp;#039;t of interest in our analysis.  What we can&amp;#039;t do is go back and insert event codes after the data have been recorded.  So put everything in.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;SEE ALSO&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
http://www.gamasutra.com/view/feature/3538/designing_games_that_are_.php&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Designing Games that are Accessible to Everyone&amp;quot; by Eitan Glinert&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Maritime_Defender&amp;diff=616</id>
		<title>Data analysis - Maritime Defender</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Data_analysis_-_Maritime_Defender&amp;diff=616"/>
				<updated>2011-03-19T16:27:39Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: New page: &amp;#039;&amp;#039;&amp;#039;Maritime Defender&amp;#039;&amp;#039;&amp;#039;  The game begins with MD_MaritimeDefenderGameBegin (41) and ends with MD_DotCoherenceEstimate (6).  The game also is considered to have ended if the begin code for ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Maritime Defender&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The game begins with MD_MaritimeDefenderGameBegin (41) and ends with MD_DotCoherenceEstimate (6).  The game also is considered to have ended if the begin code for any other mini-game occurs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Independent Components Analysis&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For the shooter phase, ICA can be applied to epochs beginning with MD_ShooterOpenWormholeSuccess and ending with MD_ShooterActivateFireWeapon, MD_ShooterEnemyWeaponFired, or MD_ShooterCollectibleSpawned, whichever comes first.&lt;br /&gt;
&lt;br /&gt;
For the navigation phase, ICA can be applied to the entire continuous EEG record from the first MD_DotTrialBegin after the MD_DotPhaseBegin, up till the first event that is NOT any of MD_DotTrialBegin (2), MD_DotTrialExpire (3), MD_UserRespondLeft (4), MD_UserRespondRight (5), or MD_CockpitDamageFeedback (42).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to behavioural inhibition&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Go trials and no-go trials each can be successful or unsuccessful; there are therefore four categories of events each beginning with an MD_ShooterPresentFriendly (21) which signals a no-go trial or an MD_ShooterPresentEnemy (22) which signals a go trial.  The analysis software should use the context provided by subsequent events to translate these two codes into four codes as follows:&lt;br /&gt;
&lt;br /&gt;
At an MD_ShooterPresentFriendly (21), if there is no MD_ShooterActivateFireWeapon (24) until the next MD_ShooterCollectibleSpawned (28) or until 5 seconds have elapsed, whichever is sooner, then code this event as MD_ShooterNoGoSUCCEED.  Otherwise code MD_ShooterNoGoFAIL.  This new event code replaces the originally logged D_ShooterPresentFriendly, and is inserted into the data at the time time stamp as the originally logged event.&lt;br /&gt;
&lt;br /&gt;
At an MD_ShooterPresentEnemy (22), if there is no MD_ShooterActivateFireWeapon (24) until the next MD_ShooterEnemyWeaponFired (27) or until 5 seconds have elapsed, whichever is sooner, then code this event as MD_ShooterGoFAIL.  Otherwise code MD_ShooterGoSUCCEED.  This new event code replaces the originally logged D_ShooterPresentFriendly, and is inserted into the data at the time time stamp as the originally logged event.&lt;br /&gt;
&lt;br /&gt;
MD_ShooterActivateFireWeapon events within MD_ShooterNoGoFAIL sequences should be re-coded as MD_ShooterWeaponFALSE_ALARM.  MD_ShooterActivateFireWeapon events within MD_ShooterGoSUCCEED sequences should be re-coded as MD_ShooterWeaponHIT.&lt;br /&gt;
&lt;br /&gt;
As a behavioural measure, the mean and standard deviation of reaction time for MD_ShooterGoSUCCEED can be calculated from the intervals between the relevant MD_ShooterPresentEnemy and MD_ShooterActivateFireWeapon events.  Also, d&amp;#039; can be calculated where hits are MD_ShooterGoSUCCEED, misses are MD_ShooterGoFAIL, false alarms are MD_ShooterNoGoFAIL, and correct rejections are MD_ShooterNoGoSUCCEED.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Motor and preparatory potentials&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For the events MD_ShooterActivateMovePort (17), MD_ShooterActivateMoveStarboard (19), and MD_ShooterActivateOpenWormholeBeam (14), both the bereitschaftspotential (readiness potential, from supplementary motor area) ERP and the event-related desynchronisation of the mu rhythm near the hand area (lateral central electrodes) can be computed.&lt;br /&gt;
&lt;br /&gt;
The interval between MD_ShooterOpenWormholeSuccess (16) and MD_ShooterGoSUCCEED will evoke a Contingent Negative Variation at frontocentral electrodes which resolves into a motor execution.  The interval between MD_ShooterOpenWormholeSuccess (16) and MD_ShooterNoGoSUCCEED will evoke the same Contingent Negative Variation, followed by a further inhibition-related negativity instead of by motor execution.  Both the CNV beginning at the time of MD_ShooterOpenWormholeSuccess and the response-related activities time-locked to MD_ShooterGoSUCCEED and MD_ShooterNoGoSUCCEED are of interest.&lt;br /&gt;
&lt;br /&gt;
As a behavioural measure, between each pair of MD_ShooterPresentWormhole (23) and MD_ShooterOpenWormholeSuccess (16), both the elapsed time and the number of distinct movement commands (MD_ShooterActivateMovePort (17) or MD_ShooterActivateMoveStarboard (19)) can be computed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to motion perception&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Leftward-drifting trials and rightward-drifting trials each can be successful or unsuccessful; there are therefore four categories of events each beginning with an MD_DotTrialBegin (2).  The analysis software should use the context provided by subsequent events to translate this code into six codes as follows:&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left followed by MD_UserRespondLeft as the very next event, code MD_DotLeftHIT, and similarly at an MD_DotTrialBegin Direction=Right followed by MD_UserRespondRight as the very next event, code MD_DotRightHIT.&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left followed by MD_UserRespondRight as the very next event, code MD_DotLeftFALSE_ALARM, and similarly at an MD_DotTrialBegin Direction=Right followed by MD_UserRespondLeft as the very next event, code MD_DotRightFALSE_ALARM.&lt;br /&gt;
&lt;br /&gt;
At an MD_DotTrialBegin Direction=Left whose next event is neither MD_UserRespondLeft nor MD_UserRespondRight is an MD_DotLeftMISS, and similarly an MD_DotTrialBegin Direction=Right whose next event is neither MD_UserRespondLeft nor MD_UserRespondRight is an MD_DotRightMISS.&lt;br /&gt;
&lt;br /&gt;
MD_UserRespondLeft events following MD_DotLeftHIT, and MD_UserRespondRight events following MD_DotRightHIT, should be re-coded as MD_DotResponseHIT.&lt;br /&gt;
&lt;br /&gt;
MD_UserRespondRight events following MD_DotLeftFALSE_ALARM, and MD_UserRespondLeft events following MD_DotRightFALSE_ALARM, should be re-coded as MD_DotResponseFALSE_ALARM.&lt;br /&gt;
&lt;br /&gt;
MD_CockpitDamageFeedback events immediately following MD_DotResponseFALSE_ALARM events should be re-coded as MD_DotFeedbackFALSE_ALARM.  MD_CockpitDamageFeedback events immediately following MD_DotTrialBegin events should be re-coded as MD_DotFeedbackMISS.&lt;br /&gt;
&lt;br /&gt;
ERPs and ERSPs time-locked to each of the six MD_Dot stimulus onset events can be compared; pilot data indicate that the ERSPs would show event-related desynchronisations in occipital generators.  (There might not be sufficient FALSE_ALARM events for reliable averaging, in which case just the HIT and MISS events can be compared.)  Likewise, ERPs and ERSPs time-locked to each of the three (or two, if there are insufficient numbers of false alarms) MD_DotResponse events can be compared.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to reward&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
MD_ShooterCollectibleCollision (29) and MD_ShooterMeteorExplosion (30) both can be examined for a cingulate negativity related to reward value which occurs between 250 and 350 ms post-stimulus; see Yeung et al. http://dx.doi.org/10.1093/cercor/bhh153&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Potentials related to error processing&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
MD_ShooterWeaponFALSE_ALARM events should generate a cingulate error-related negativity; this error-related negativity can be most straightforwardly visualised by computing a difference wave: subtract the ERP associated with MD_ShooterWeaponHIT events from the ERP associated with MD_ShooterWeaponFALSE_ALARM events.&lt;br /&gt;
&lt;br /&gt;
During the navigation phase, a couple of strategies might be applied to discern the error-related negativity associated with erroneous responses:  The right way to do it, if there were enough MD_DotResponseFALSE_ALARM events available for reliable ERP averaging, would be to subtract the ERP associated with MD_DotResponseHIT events from the ERP associated with MD_DotResponseFALSE_ALARM events.  But there probably won&amp;#039;t be sufficient numbers of false-alarm responses for that.  Instead of false alarms, subjects who are unable to discern the motion direction probably will generate misses - that is, no overt behavioural response at all.  So we can look at the ERP associated with MD_DotFeedbackMISS (without any subtraction).&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Functional_specifications&amp;diff=615</id>
		<title>Functional specifications</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Functional_specifications&amp;diff=615"/>
				<updated>2011-03-19T16:26:47Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to this game&amp;#039;s functional spec table of contents.  There are two major parts: the colony simulator and the minigames.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Important Neuroscientific Considerations in Game Design for Autism]]&lt;br /&gt;
&lt;br /&gt;
[[Data analysis - Maritime Defender]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Colony Simulator&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Colony Mode]]&lt;br /&gt;
&lt;br /&gt;
[[Factions]]&lt;br /&gt;
&lt;br /&gt;
[[Structures]]&lt;br /&gt;
&lt;br /&gt;
[[Consumables]]&lt;br /&gt;
&lt;br /&gt;
[[Tasks]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Minigames&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Meteor Madness]] / Maritime Defender&lt;br /&gt;
&lt;br /&gt;
[[Star Jack]] / Starjack&lt;br /&gt;
&lt;br /&gt;
[[Stellar Prospector]]&lt;br /&gt;
&lt;br /&gt;
[[Face Off]]&lt;br /&gt;
&lt;br /&gt;
[[Factory Frenzy]] (Deprecated)&lt;br /&gt;
&lt;br /&gt;
[[Mini Game Rewards]]&lt;br /&gt;
&lt;br /&gt;
[[Mini Game Scenarios]]&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Functional_specifications&amp;diff=614</id>
		<title>Functional specifications</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Functional_specifications&amp;diff=614"/>
				<updated>2011-03-19T13:15:38Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added a link to a new section on data analysis&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to this game&amp;#039;s functional spec table of contents.  There are two major parts: the colony simulator and the minigames.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Important Neuroscientific Considerations in Game Design for Autism]]&lt;br /&gt;
&lt;br /&gt;
[[Analysis of behavioural and physiological data from game play]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Colony Simulator&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Colony Mode]]&lt;br /&gt;
&lt;br /&gt;
[[Factions]]&lt;br /&gt;
&lt;br /&gt;
[[Structures]]&lt;br /&gt;
&lt;br /&gt;
[[Consumables]]&lt;br /&gt;
&lt;br /&gt;
[[Tasks]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Minigames&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Meteor Madness]] / Maritime Defender&lt;br /&gt;
&lt;br /&gt;
[[Star Jack]] / Starjack&lt;br /&gt;
&lt;br /&gt;
[[Stellar Prospector]]&lt;br /&gt;
&lt;br /&gt;
[[Face Off]]&lt;br /&gt;
&lt;br /&gt;
[[Factory Frenzy]] (Deprecated)&lt;br /&gt;
&lt;br /&gt;
[[Mini Game Rewards]]&lt;br /&gt;
&lt;br /&gt;
[[Mini Game Scenarios]]&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=613</id>
		<title>End-user Setup</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=613"/>
				<updated>2011-03-05T10:33:21Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added details on where to find individual users&amp;#039; experiment logs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each Minigame has a variety of settings that can be configured individually.&lt;br /&gt;
&lt;br /&gt;
==Config==&lt;br /&gt;
&lt;br /&gt;
The Config.script file holds general settings. It can be opened with any general text editor, such as Notepad or Vim. Each line ending with a semicolon (;) indicates a command for the game to follow. Lines beginning with two forward slashes (//) are considered comments, and will not be processed. A block comment is a section beginning with (/*) and ending at (*/).&lt;br /&gt;
&lt;br /&gt;
===Lab, Home and Debug configurations===&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. The program will automatically use the LabConfig.script file if it exists; otherwise it will use Config.script. To run the program in the lab, simply make certain that the LabConfig.script file is present.&lt;br /&gt;
&lt;br /&gt;
(When the game is being run from within the debugger, a third configuration script, DebugConfig.script, is used.)&lt;br /&gt;
&lt;br /&gt;
These config files will be found in &amp;quot;[Game Install Directory]\Configs\&amp;quot; (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
See also: [[Differences in Home vs Lab Configuration]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Location===&lt;br /&gt;
&lt;br /&gt;
[Installation Directory]\Configs\Config.script (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The Global Config.script can be found in the Configs folder under the Autism Collaborative folder -- typically C:\Program Files\Autism Collaborative\Configs\Config.script.  This holds global settings that will be applied automatically when the game starts.  Individual minigames may have individual configurations specific to those minigames.  This individual config file is also called Config.script, and can be found in the Configs folder under the minigame&amp;#039;s folder -- typically C:\Program Files\Autism Collaborative\Minigames\[MiniGameName]\Configs\Config.script.&lt;br /&gt;
&lt;br /&gt;
===Global===&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetResolution([horizontal],[vertical]);&lt;br /&gt;
* Set the screen resolution this game will be played at, for example, Util.Settings.SetResolution(1024,768);&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.FullScreen = [true/false];&lt;br /&gt;
* Set whether the game window will be fullscreen, for example, Util.Settings.FullScreen = true;&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPortEnabled = [true/false];&lt;br /&gt;
* Set whether codes should be written out the Parallel Port, for example, Util.Settings.ParallelEnabled = true; If not specified, this will default to False.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPort = ParallelPort.Port1;&lt;br /&gt;
* Set which Parallel Port codes should be written to, if enabled. Valid values are Port1, Port2, and Port3. Defaults to Port1.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetScreenDimensions([Width], [Height], [Distance]);&lt;br /&gt;
* Width is the width of the display, in centimeters. Height is as height of the display, in centimeters. Distance is the distance between the display and the viewer&amp;#039;s eyes, in centimeters. For the dot coherence phase of Maritime Defender, the dots are based on the size of the visual display as it appears to the player. For example, Util.Settings.SetScreenDimensions(8.5, 6.25, 24.0);&lt;br /&gt;
&lt;br /&gt;
===Maritime Defender===&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareDegree = [Number];&lt;br /&gt;
* For the dot coherence phase, the dots are based on the size of the visual display as it appears to the player. This sets the density of the dots as they appear on the screen. Either measure, radians or degrees, may be used. For example, MaritimeDefender.Settings.DotsPerSquareRadian = 10000.0;&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerDegree = [Number];&lt;br /&gt;
* Specify the dot density as the number of dots within a circular patch of screen space with a diameter of one radian or degree of visual angle as it appears to the user.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.NumberDots = [Number];&lt;br /&gt;
* Override the above settings, specifying exactly the number of dots that should be drawn on the screen. This setting is optional.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotDiameter = System.Math.PI / 1028;&lt;br /&gt;
* Affects the average size of the coherence dots in terms of radians.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotSpeed = System.Math.PI / 16;&lt;br /&gt;
* Affects how fast the coherence dots appear to move across the screen in terms of radians per second.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotLifeSpan = 4 / 60.0;&lt;br /&gt;
* How long each dot exists on the screen. 4 / 60.0 reflects 4 frames on a 60 hertz display.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelay = 1;&lt;br /&gt;
* Additional Delay in seconds between each dot test, for the EEG readings. This is in addition to a random jitter of, by default, between 0 and 150ms; this jitter is controlled by the DotRefreshDelayJitter.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelayJitter = 0.15;&lt;br /&gt;
* A random amount of jitter between 0 and [value] seconds will added to the DotRefreshDelay so that the time between two successive coherence trials is not constant. The default is 0.15 of a second, or 150 milliseconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotResponseWait = 0.5;&lt;br /&gt;
* The duration of time in seconds immediately after a trial with no response in which late responses can be excepted.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotTrialLength = 2;&lt;br /&gt;
* The average duration of a dot test trial in seconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.SetPhaseQueue(2, &amp;quot;IdentityTest, 1, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 1, Boss, 0&amp;quot;);&lt;br /&gt;
* The game phases for Maritime Defender. A list of pairs, a name and a value. Currently, the Game must start with an IdentityTest phase. The Shooter value is how many wormholes must be opened and ships identified in order to move on to the next Phase. The DotTest value is how many dot trials will take place during that phase, where a trial may be a motion of dots, or an absence of motion.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.HaveNonCoherentTrials = false;&lt;br /&gt;
* Whether NonCoherentTrials should be included. If false, there will be coherent motion to the left or right for every trial.&lt;br /&gt;
&lt;br /&gt;
===Stellar Prospector===&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMax = 1500f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a stimulus must appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMin = 500f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a stimulus can appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a distractor must appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a distractor can appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds that a distractor can live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds that a distactor must live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusLifeMax = 6000f;&lt;br /&gt;
* The maximum time in milliseconds that a stimulus can be displayed.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMin = 1;&lt;br /&gt;
* The minimum number of stimuli that must appear before the cued sector can change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMax = 1;&lt;br /&gt;
* The maximum number of stimuli that can appear before the cued sector must change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.MaxProgress = 100;&lt;br /&gt;
* The amount of progress needed to completely finish the game. This is in arbitrary units.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.PeripheralProgress = 5;&lt;br /&gt;
* The maximum amount of progress the player can receive from correctly responding to peripheral stimuli. In the same arbitrary units as max progress.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.ProgressLostPerMiss = 1;&lt;br /&gt;
* The amount of progress lost anytime an incorrect response is given&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CentralStimulusProgressDrain = 1;&lt;br /&gt;
* Amount of progress drained every 2 seconds during a central stimulus&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.UseFlickering = true;&lt;br /&gt;
* Determines whether or not to use flickering&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.AutoCalculateFlickering = true;&lt;br /&gt;
* Whether the frames on/off and intensities of the flickering effect are automatically calculated by the frequency or are just taken from the manually set values.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterHertz = 6.67;&lt;br /&gt;
* The rate at which the center sector flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOnFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOffFrames = 5;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterIntensity = 1.25;&lt;br /&gt;
* The percentage of intensity of the center sector when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Hertz = 8.57;&lt;br /&gt;
* The rate at which sector one flickers per second&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OffFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Intensity = 1.33;&lt;br /&gt;
* The percentage of intensity of sector one when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Hertz = 10;&lt;br /&gt;
* The rate at which sector two flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector two when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3Hertz = 12;&lt;br /&gt;
* The rate at which sector three flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered off&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.Sector3Intensity = 1.5;&lt;br /&gt;
* The percentage of intensity of sector three when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Hertz = 15;&lt;br /&gt;
* The rate at which sector four flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OffFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector four when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Audio Stimuli Experiment===&lt;br /&gt;
&lt;br /&gt;
Tones will played at intervals based on the sound delay (AS_SOUND_DELAY) and max jitter (AS_MAX_JITTER) as specified in the config file, in floating-point units of seconds.  The stimulus onset asynchrony between tones is calculated by adding AS_SOUND_DELAY to a random number in the range of 0 to AS_MAX_JITTER.  The tone is the same each time, but the volume is chosen at random from the volumes specifiend in the config file.&lt;br /&gt;
&lt;br /&gt;
Volumes are in arbitrary units on a linear (not dB) scale between 0 and 1.0.  Experimenters should calibrate these units using a sound level meter to measure actual volumes in dB SPL produced by their sound card and speaker system, and modify AS_VOLUME1, AS_VOLUME2, AS_VOLUME3 and AS_VOLUME4 so that they produce the desired levels.&lt;br /&gt;
&lt;br /&gt;
Each time a tone is played, an event is written to the log.  See the next section for all possible event codes and formats.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Event Codes&lt;br /&gt;
&lt;br /&gt;
AS_START &lt;br /&gt;
&lt;br /&gt;
AS_TONE_PLAYED Volume=[volume] Tone=[tone # refers to the number n in the AS_VOLUMEn parameter] &lt;br /&gt;
&lt;br /&gt;
AS_END &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Config File Format&lt;br /&gt;
&lt;br /&gt;
AS_SOUND_DELAY = [stimulus onset asynchrony, in seconds]&lt;br /&gt;
&lt;br /&gt;
AS_MAX_JITTER = [maximum range of random jitter added AS_SOUND_DELAY]&lt;br /&gt;
&lt;br /&gt;
AS_MAX_PLAYS = [total number of times that each tones is played]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME1 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME2 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME3 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME4 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_SOUND = [80dBl_Right or 80dBlLeft]&lt;br /&gt;
&lt;br /&gt;
Important Notes:&lt;br /&gt;
&lt;br /&gt;
- All spaces in the config file are necessary for the program to parse&lt;br /&gt;
&lt;br /&gt;
- Make sure there is no white space after the final line&lt;br /&gt;
&lt;br /&gt;
- all volumes must be expressed in double format (must include decimal, ex. 1.0 is correct, 1 is not)&lt;br /&gt;
&lt;br /&gt;
==Keyboard Configuration==&lt;br /&gt;
&lt;br /&gt;
Keyboard bindings are stored in a separate file, also specific to each minigame. For example, the keyboard bindings for the ColonySim could be found at [Installation Directory]\testkeybindings.txt (Default: &amp;quot;C:\Program Files\Autism Collaborative\testkeybindings.txt&amp;quot;). It is stored as a list of in-game events, each followed by the action that triggers it.&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Logging==&lt;br /&gt;
&lt;br /&gt;
The current default path for the log file is in the Application Data folder. The exact location will vary depending on the operating system installed.&lt;br /&gt;
&lt;br /&gt;
Vista: C:\Users\[WindowsLoginName]\Documents\Roaming\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
XP: C:\Documents and Settings\[WindowsLoginName]\My Documents\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
Although it may seem natural to look in the &amp;quot;LogFiles&amp;quot; directory, the user-specific log file containing each individual&amp;#039;s log data is instead found in each individual user&amp;#039;s subdirectory within the &amp;quot;Users&amp;quot; directory:&lt;br /&gt;
&lt;br /&gt;
Users\[AstropolisUserName]\LogFiles\ExperimentLog.txt&lt;br /&gt;
&lt;br /&gt;
The documentation for the building placement log for the Colony Simulation can be found here -&amp;gt; [[Building_Placement_Log_Specification]].&lt;br /&gt;
&lt;br /&gt;
If the computer has a parallel port, the 8-bit numeric event codes in the log file are also placed on the parallel port as 5ms pulses (bounded by 5ms of zeroes on all eight data lines).  Codes then can be read from a physiological or behavioural data recorder such as an EEG recorder, an MRI scanner, or a gaze tracker, and the full record from the log file can be synchronised to the event-code sequence in the data recorder, allowing examination of physiological or behavioural events as a function of stimuli and responses that occur during game play.  The parallel port is used in compatibility mode only; enhanced mode is not used.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=612</id>
		<title>End-user Setup</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=612"/>
				<updated>2011-02-26T06:34:29Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added parallel-port information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each Minigame has a variety of settings that can be configured individually.&lt;br /&gt;
&lt;br /&gt;
==Config==&lt;br /&gt;
&lt;br /&gt;
The Config.script file holds general settings. It can be opened with any general text editor, such as Notepad or Vim. Each line ending with a semicolon (;) indicates a command for the game to follow. Lines beginning with two forward slashes (//) are considered comments, and will not be processed. A block comment is a section beginning with (/*) and ending at (*/).&lt;br /&gt;
&lt;br /&gt;
===Lab, Home and Debug configurations===&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. The program will automatically use the LabConfig.script file if it exists; otherwise it will use Config.script. To run the program in the lab, simply make certain that the LabConfig.script file is present.&lt;br /&gt;
&lt;br /&gt;
(When the game is being run from within the debugger, a third configuration script, DebugConfig.script, is used.)&lt;br /&gt;
&lt;br /&gt;
These config files will be found in &amp;quot;[Game Install Directory]\Configs\&amp;quot; (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
See also: [[Differences in Home vs Lab Configuration]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Location===&lt;br /&gt;
&lt;br /&gt;
[Installation Directory]\Configs\Config.script (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The Global Config.script can be found in the Configs folder under the Autism Collaborative folder -- typically C:\Program Files\Autism Collaborative\Configs\Config.script.  This holds global settings that will be applied automatically when the game starts.  Individual minigames may have individual configurations specific to those minigames.  This individual config file is also called Config.script, and can be found in the Configs folder under the minigame&amp;#039;s folder -- typically C:\Program Files\Autism Collaborative\Minigames\[MiniGameName]\Configs\Config.script.&lt;br /&gt;
&lt;br /&gt;
===Global===&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetResolution([horizontal],[vertical]);&lt;br /&gt;
* Set the screen resolution this game will be played at, for example, Util.Settings.SetResolution(1024,768);&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.FullScreen = [true/false];&lt;br /&gt;
* Set whether the game window will be fullscreen, for example, Util.Settings.FullScreen = true;&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPortEnabled = [true/false];&lt;br /&gt;
* Set whether codes should be written out the Parallel Port, for example, Util.Settings.ParallelEnabled = true; If not specified, this will default to False.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPort = ParallelPort.Port1;&lt;br /&gt;
* Set which Parallel Port codes should be written to, if enabled. Valid values are Port1, Port2, and Port3. Defaults to Port1.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetScreenDimensions([Width], [Height], [Distance]);&lt;br /&gt;
* Width is the width of the display, in centimeters. Height is as height of the display, in centimeters. Distance is the distance between the display and the viewer&amp;#039;s eyes, in centimeters. For the dot coherence phase of Maritime Defender, the dots are based on the size of the visual display as it appears to the player. For example, Util.Settings.SetScreenDimensions(8.5, 6.25, 24.0);&lt;br /&gt;
&lt;br /&gt;
===Maritime Defender===&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareDegree = [Number];&lt;br /&gt;
* For the dot coherence phase, the dots are based on the size of the visual display as it appears to the player. This sets the density of the dots as they appear on the screen. Either measure, radians or degrees, may be used. For example, MaritimeDefender.Settings.DotsPerSquareRadian = 10000.0;&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerDegree = [Number];&lt;br /&gt;
* Specify the dot density as the number of dots within a circular patch of screen space with a diameter of one radian or degree of visual angle as it appears to the user.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.NumberDots = [Number];&lt;br /&gt;
* Override the above settings, specifying exactly the number of dots that should be drawn on the screen. This setting is optional.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotDiameter = System.Math.PI / 1028;&lt;br /&gt;
* Affects the average size of the coherence dots in terms of radians.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotSpeed = System.Math.PI / 16;&lt;br /&gt;
* Affects how fast the coherence dots appear to move across the screen in terms of radians per second.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotLifeSpan = 4 / 60.0;&lt;br /&gt;
* How long each dot exists on the screen. 4 / 60.0 reflects 4 frames on a 60 hertz display.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelay = 1;&lt;br /&gt;
* Additional Delay in seconds between each dot test, for the EEG readings. This is in addition to a random jitter of, by default, between 0 and 150ms; this jitter is controlled by the DotRefreshDelayJitter.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelayJitter = 0.15;&lt;br /&gt;
* A random amount of jitter between 0 and [value] seconds will added to the DotRefreshDelay so that the time between two successive coherence trials is not constant. The default is 0.15 of a second, or 150 milliseconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotResponseWait = 0.5;&lt;br /&gt;
* The duration of time in seconds immediately after a trial with no response in which late responses can be excepted.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotTrialLength = 2;&lt;br /&gt;
* The average duration of a dot test trial in seconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.SetPhaseQueue(2, &amp;quot;IdentityTest, 1, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 1, Boss, 0&amp;quot;);&lt;br /&gt;
* The game phases for Maritime Defender. A list of pairs, a name and a value. Currently, the Game must start with an IdentityTest phase. The Shooter value is how many wormholes must be opened and ships identified in order to move on to the next Phase. The DotTest value is how many dot trials will take place during that phase, where a trial may be a motion of dots, or an absence of motion.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.HaveNonCoherentTrials = false;&lt;br /&gt;
* Whether NonCoherentTrials should be included. If false, there will be coherent motion to the left or right for every trial.&lt;br /&gt;
&lt;br /&gt;
===Stellar Prospector===&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMax = 1500f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a stimulus must appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMin = 500f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a stimulus can appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a distractor must appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a distractor can appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds that a distractor can live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds that a distactor must live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusLifeMax = 6000f;&lt;br /&gt;
* The maximum time in milliseconds that a stimulus can be displayed.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMin = 1;&lt;br /&gt;
* The minimum number of stimuli that must appear before the cued sector can change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMax = 1;&lt;br /&gt;
* The maximum number of stimuli that can appear before the cued sector must change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.MaxProgress = 100;&lt;br /&gt;
* The amount of progress needed to completely finish the game. This is in arbitrary units.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.PeripheralProgress = 5;&lt;br /&gt;
* The maximum amount of progress the player can receive from correctly responding to peripheral stimuli. In the same arbitrary units as max progress.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.ProgressLostPerMiss = 1;&lt;br /&gt;
* The amount of progress lost anytime an incorrect response is given&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CentralStimulusProgressDrain = 1;&lt;br /&gt;
* Amount of progress drained every 2 seconds during a central stimulus&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.UseFlickering = true;&lt;br /&gt;
* Determines whether or not to use flickering&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.AutoCalculateFlickering = true;&lt;br /&gt;
* Whether the frames on/off and intensities of the flickering effect are automatically calculated by the frequency or are just taken from the manually set values.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterHertz = 6.67;&lt;br /&gt;
* The rate at which the center sector flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOnFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOffFrames = 5;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterIntensity = 1.25;&lt;br /&gt;
* The percentage of intensity of the center sector when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Hertz = 8.57;&lt;br /&gt;
* The rate at which sector one flickers per second&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OffFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Intensity = 1.33;&lt;br /&gt;
* The percentage of intensity of sector one when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Hertz = 10;&lt;br /&gt;
* The rate at which sector two flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector two when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3Hertz = 12;&lt;br /&gt;
* The rate at which sector three flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered off&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.Sector3Intensity = 1.5;&lt;br /&gt;
* The percentage of intensity of sector three when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Hertz = 15;&lt;br /&gt;
* The rate at which sector four flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OffFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector four when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Audio Stimuli Experiment===&lt;br /&gt;
&lt;br /&gt;
Tones will played at intervals based on the sound delay (AS_SOUND_DELAY) and max jitter (AS_MAX_JITTER) as specified in the config file, in floating-point units of seconds.  The stimulus onset asynchrony between tones is calculated by adding AS_SOUND_DELAY to a random number in the range of 0 to AS_MAX_JITTER.  The tone is the same each time, but the volume is chosen at random from the volumes specifiend in the config file.&lt;br /&gt;
&lt;br /&gt;
Volumes are in arbitrary units on a linear (not dB) scale between 0 and 1.0.  Experimenters should calibrate these units using a sound level meter to measure actual volumes in dB SPL produced by their sound card and speaker system, and modify AS_VOLUME1, AS_VOLUME2, AS_VOLUME3 and AS_VOLUME4 so that they produce the desired levels.&lt;br /&gt;
&lt;br /&gt;
Each time a tone is played, an event is written to the log.  See the next section for all possible event codes and formats.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Event Codes&lt;br /&gt;
&lt;br /&gt;
AS_START &lt;br /&gt;
&lt;br /&gt;
AS_TONE_PLAYED Volume=[volume] Tone=[tone # refers to the number n in the AS_VOLUMEn parameter] &lt;br /&gt;
&lt;br /&gt;
AS_END &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Config File Format&lt;br /&gt;
&lt;br /&gt;
AS_SOUND_DELAY = [stimulus onset asynchrony, in seconds]&lt;br /&gt;
&lt;br /&gt;
AS_MAX_JITTER = [maximum range of random jitter added AS_SOUND_DELAY]&lt;br /&gt;
&lt;br /&gt;
AS_MAX_PLAYS = [total number of times that each tones is played]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME1 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME2 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME3 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME4 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_SOUND = [80dBl_Right or 80dBlLeft]&lt;br /&gt;
&lt;br /&gt;
Important Notes:&lt;br /&gt;
&lt;br /&gt;
- All spaces in the config file are necessary for the program to parse&lt;br /&gt;
&lt;br /&gt;
- Make sure there is no white space after the final line&lt;br /&gt;
&lt;br /&gt;
- all volumes must be expressed in double format (must include decimal, ex. 1.0 is correct, 1 is not)&lt;br /&gt;
&lt;br /&gt;
==Keyboard Configuration==&lt;br /&gt;
&lt;br /&gt;
Keyboard bindings are stored in a separate file, also specific to each minigame. For example, the keyboard bindings for the ColonySim could be found at [Installation Directory]\testkeybindings.txt (Default: &amp;quot;C:\Program Files\Autism Collaborative\testkeybindings.txt&amp;quot;). It is stored as a list of in-game events, each followed by the action that triggers it.&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Logging==&lt;br /&gt;
&lt;br /&gt;
The current default path for the log file is in the Application Data folder. The exact location will vary depending on the operating system installed.&lt;br /&gt;
&lt;br /&gt;
Vista: C:\Users\[WindowsLoginName]\Documents\Roaming\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
XP: C:\Documents and Settings\[WindowsLoginName]\My Documents\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
The documentation for the building placement log for the Colony Simulation can be found here -&amp;gt; [[Building_Placement_Log_Specification]].&lt;br /&gt;
&lt;br /&gt;
If the computer has a parallel port, the 8-bit numeric event codes in the log file are also placed on the parallel port as 5ms pulses (bounded by 5ms of zeroes on all eight data lines).  Codes then can be read from a physiological or behavioural data recorder such as an EEG recorder, an MRI scanner, or a gaze tracker, and the full record from the log file can be synchronised to the event-code sequence in the data recorder, allowing examination of physiological or behavioural events as a function of stimuli and responses that occur during game play.  The parallel port is used in compatibility mode only; enhanced mode is not used.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=586</id>
		<title>Important Neuroscientific Considerations in Game Design for Autism</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=586"/>
				<updated>2009-08-05T01:34:50Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Neuroscientific Considerations in Game Design for Autism&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid timed events; give the player control of when things happen; whenever possible, prompt the player.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism have difficulty with executive function, that is, in rapidly planning and executing actions in response to sensory inputs.  They have a great deal of skill and often exceed the performance of people without autism -- but it&amp;#039;s a intensely studied and considered, deliberate style of skill, often not expressed under time pressure.  So it&amp;#039;s important to make certain that the timing of events is controlled not by the computer (except in cases where the experiment requires it) but by the player.  Small additions such as a &amp;quot;next&amp;quot; button or a &amp;quot;ready&amp;quot; button can make all the difference.  (An example of the event-driven rather than time-driven structure is the use of the up-arrow key to connect with the wormhole in the Maritime Defender mini-game.)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Do not depend on a player&amp;#039;s memory for instructions; prompt the player every time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	A corollary of the executive planning problem is that the player may have trouble remembering a sequence of steps.  Even if (s)he has learnt in a tutorial that key A triggers action X and key B triggers action Y, these arbitrary associations might not be remembered, unless the player has had a chance to practise these actions actively, many times over.&lt;br /&gt;
&lt;br /&gt;
Another corollary of this memory problem: &amp;#039;&amp;#039;&amp;#039;Do not make input-output mappings depend on the game state.&amp;#039;&amp;#039;&amp;#039;  You might be tempted to hide functions inside submenus, access to which depends on the player&amp;#039;s clicking on the right primary menu, or to make a drag of the mouse do something different after a click than after no click (or even worse, something different after a left-click than after a right-click).  Avoid such sequential logic in the user interface.  Wherever possible, use purely combinational logic.  Some sequential logic is of course unavoidable -- otherwise we wouldn&amp;#039;t be able to have separate mini-games! -- but it ought to be used sparingly and only when absolutely required.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Instead of a sequence of actions, ask for one action at a time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Rapid actions can be difficult enough by themselves, but when people with autism face the additional demand of performing several of these actions rapidly and in the proper sequence thay can feel very much overwhelmed.  (See the previous entries on executive function and memory.)  Instead of requiring sequences of inputs in response to a single prompt, try to prompt separately for each input.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use pictures, not words.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Most people with autism tend to think in pictures rather than words.  Instructions presented as text might not be comprehended -- not because the player is incapable of comprehending but because (s)he&amp;#039;s concentrating so much on decoding the individual words that (s)he can&amp;#039;t spare much effort to put those words together into the meanings of complete sentences and narratives.  Sometimes text is unavoidable; if text is used, avoid verbosity and don&amp;#039;t clutter the display with words.  Reading can be slow; see the entry on &amp;#039;&amp;#039;timed events&amp;#039;&amp;#039; above about waiting and prompting the player to continue.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Players should learn by doing, not just by observing or reading or listening.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	In this regard, people with autism are no different from people without autism: we all learn best when we can be active rather than passive learners.  The challenges faced by people with autism make it even more crucial that game activities involve learning-by-doing, rather than depending on learning-by-reading or learning-by-listening.  This is particularly true of the game tutorials.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid depending on simultaneous or near-simultaneous events in different perceptual channels (e.g. different places on the screen, or different senses such as video with audio).&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism focus intensely and exclusively on one perceptual channel at a time.  When focusing on one point or area of the display, events away from this spatial focus of attention may not register.  Anathema for a person with autism would be a cockpit display with many gauges indicating different quantities which all need to be observed simultaneously -- or a visual display that needs to be observed at the same time as a spoken or other auditory signal.  (Background music is okay because it doesn&amp;#039;t need to be attended; players can just let it go on whilst they focus on the visual display.)  Instead, either information should be displayed in one region of the display or one sensory channel, or ample time should be allowed to shift attention between points in visual space or between sensory channels.  Shifts of attention can take 2 to 3 seconds for people with autism, whereas people without autism take 0.2 to 0.3 seconds.  Think about what it would be like to be looking at the display through a long telescope that magnifies a small area but shuts out the periphery.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid evoking unnecessary anxiety.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism are &amp;#039;&amp;#039;&amp;#039;much&amp;#039;&amp;#039;&amp;#039; more prone to anxiety than people without autism -- especially when faced with a new and unpractised task, or with a timed task, or with an interactive situation that&amp;#039;s out of their control.  (See entries above on avoiding timed events and giving prompting, pictures, and practice.)  Do everything possible to make certain that the player, not the computer, is the one controlling what happens next, and that the player has every opportunity to practise and to become comfortable with the demands of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For repeating events, vary the timing slightly so that the time between two successive instances of the event is not constant.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This consideration actually isn&amp;#039;t about accommodating people with autism; rather, it&amp;#039;s about accommodating EEG analysis.  Those of you who know something about signal processing will be familiar with the phenomenon of &amp;#039;&amp;#039;&amp;#039;aliasing&amp;#039;&amp;#039;&amp;#039; in which a discrete sampling of a high-frequency signal at too low a sampling rate produces an artefactual low-frequency oscillation.  The problem here has a lot in common with aliasing.  Consider as an example the situation that exists when the firing button is pressed and held: the weapons will fire at a certain rate, say, once every 500 ms.  Suppose that we&amp;#039;re interested in the brain response to the combined auditory and visual effects associated with weapons firing.  Suppose also, though, that there is an ongoing, endogenous (that is, internally driven) 10 hz oscillation in the player&amp;#039;s brain that has nothing to do with these exogenous stimuli.  Since 500 ms is an integral multiple of the 100 ms period of this oscillation, when we sample the exogenous brain response to each weapons firing we&amp;#039;re going to end up also sampling the endogenous oscillation at the same point in its phase every time, and we will thus misattribute the endogenous signal as an exogenous response to the weapons firing.  To forestall this ambiguity in EEG analysis, we can add a small amount of temporal jitter to the intervals between firings - not so much as to make them seem unnaturally jittery to the player, but enough to get rid of this phase artefact.  The exact amount depends on what seems natural given the event separation; in this example of a 500 ms event we might deem that any variation more than 10% of the interval in either direction would seem unnatural, so we might then choose to vary the intervals over a uniform distribution from 450 ms to 550 ms.  Given the frequencies of the signals in which we&amp;#039;re interested, it isn&amp;#039;t ever necessary to add more than 150 ms (that is, 75 ms in either direction) of temporal jitter.  Add as much temporal jitter as you can, up to this 150 ms limit - but don&amp;#039;t sacrifice playability.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Log event codes for everything - absolutely everything.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This is another consideration for EEG analysis.  Did the weapons just fire (even though the firing key is being held down constantly)?  That&amp;#039;s an event.  Did some sort of motion start or stop or change speed?  That&amp;#039;s an event.  Absolutely everything that happens in the game should be reported with an event code.  (See &amp;quot;Game/Engine/Logger.cs&amp;quot;.)  We can always ignore event codes if we decide that they aren&amp;#039;t of interest in our analysis.  What we can&amp;#039;t do is go back and insert event codes after the data have been recorded.  So put everything in.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;SEE ALSO&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
http://www.gamasutra.com/view/feature/3538/designing_games_that_are_.php&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Designing Games that are Accessible to Everyone&amp;quot; by Eitan Glinert&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=585</id>
		<title>Important Neuroscientific Considerations in Game Design for Autism</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Important_Neuroscientific_Considerations_in_Game_Design_for_Autism&amp;diff=585"/>
				<updated>2009-08-05T01:34:10Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added a corollary on avoiding sequential logic in the UI&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Neuroscientific Considerations in Game Design for Autism&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid timed events; give the player control of when things happen; whenever possible, prompt the player.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism have difficulty with executive function, that is, in rapidly planning and executing actions in response to sensory inputs.  They have a great deal of skill and often exceed the performance of people without autism -- but it&amp;#039;s a intensely studied and considered, deliberate style of skill, often not expressed under time pressure.  So it&amp;#039;s important to make certain that the timing of events is controlled not by the computer (except in cases where the experiment requires it) but by the player.  Small additions such as a &amp;quot;next&amp;quot; button or a &amp;quot;ready&amp;quot; button can make all the difference.  (An example of the event-driven rather than time-driven structure is the use of the up-arrow key to connect with the wormhole in the Maritime Defender mini-game.)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Do not depend on a player&amp;#039;s memory for instructions; prompt the player every time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	A corrollary of the executive planning problem is that the player may have trouble remembering a sequence of steps.  Even if (s)he has learnt in a tutorial that key A triggers action X and key B triggers action Y, these arbitrary associations might not be remembered, unless the player has had a chance to practise these actions actively, many times over.&lt;br /&gt;
&lt;br /&gt;
Another corollary of this memory problem: &amp;#039;&amp;#039;&amp;#039;Do not make input-output mappings depend on the game state.&amp;#039;&amp;#039;&amp;#039;  You might be tempted to hide functions inside submenus, access to which depends on the player&amp;#039;s clicking on the right primary menu, or to make a drag of the mouse do something different after a click than after no click (or even worse, something different after a left-click than after a right-click).  Avoid such sequential logic in the user interface.  Wherever possible, use purely combinational logic.  Some sequential logic is of course unavoidable -- otherwise we wouldn&amp;#039;t be able to have separate mini-games! -- but it ought to be used sparingly and only when absolutely required.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Instead of a sequence of actions, ask for one action at a time.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Rapid actions can be difficult enough by themselves, but when people with autism face the additional demand of performing several of these actions rapidly and in the proper sequence thay can feel very much overwhelmed.  (See the previous entries on executive function and memory.)  Instead of requiring sequences of inputs in response to a single prompt, try to prompt separately for each input.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Use pictures, not words.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	Most people with autism tend to think in pictures rather than words.  Instructions presented as text might not be comprehended -- not because the player is incapable of comprehending but because (s)he&amp;#039;s concentrating so much on decoding the individual words that (s)he can&amp;#039;t spare much effort to put those words together into the meanings of complete sentences and narratives.  Sometimes text is unavoidable; if text is used, avoid verbosity and don&amp;#039;t clutter the display with words.  Reading can be slow; see the entry on &amp;#039;&amp;#039;timed events&amp;#039;&amp;#039; above about waiting and prompting the player to continue.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Players should learn by doing, not just by observing or reading or listening.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	In this regard, people with autism are no different from people without autism: we all learn best when we can be active rather than passive learners.  The challenges faced by people with autism make it even more crucial that game activities involve learning-by-doing, rather than depending on learning-by-reading or learning-by-listening.  This is particularly true of the game tutorials.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid depending on simultaneous or near-simultaneous events in different perceptual channels (e.g. different places on the screen, or different senses such as video with audio).&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism focus intensely and exclusively on one perceptual channel at a time.  When focusing on one point or area of the display, events away from this spatial focus of attention may not register.  Anathema for a person with autism would be a cockpit display with many gauges indicating different quantities which all need to be observed simultaneously -- or a visual display that needs to be observed at the same time as a spoken or other auditory signal.  (Background music is okay because it doesn&amp;#039;t need to be attended; players can just let it go on whilst they focus on the visual display.)  Instead, either information should be displayed in one region of the display or one sensory channel, or ample time should be allowed to shift attention between points in visual space or between sensory channels.  Shifts of attention can take 2 to 3 seconds for people with autism, whereas people without autism take 0.2 to 0.3 seconds.  Think about what it would be like to be looking at the display through a long telescope that magnifies a small area but shuts out the periphery.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid evoking unnecessary anxiety.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	People with autism are &amp;#039;&amp;#039;&amp;#039;much&amp;#039;&amp;#039;&amp;#039; more prone to anxiety than people without autism -- especially when faced with a new and unpractised task, or with a timed task, or with an interactive situation that&amp;#039;s out of their control.  (See entries above on avoiding timed events and giving prompting, pictures, and practice.)  Do everything possible to make certain that the player, not the computer, is the one controlling what happens next, and that the player has every opportunity to practise and to become comfortable with the demands of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For repeating events, vary the timing slightly so that the time between two successive instances of the event is not constant.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This consideration actually isn&amp;#039;t about accommodating people with autism; rather, it&amp;#039;s about accommodating EEG analysis.  Those of you who know something about signal processing will be familiar with the phenomenon of &amp;#039;&amp;#039;&amp;#039;aliasing&amp;#039;&amp;#039;&amp;#039; in which a discrete sampling of a high-frequency signal at too low a sampling rate produces an artefactual low-frequency oscillation.  The problem here has a lot in common with aliasing.  Consider as an example the situation that exists when the firing button is pressed and held: the weapons will fire at a certain rate, say, once every 500 ms.  Suppose that we&amp;#039;re interested in the brain response to the combined auditory and visual effects associated with weapons firing.  Suppose also, though, that there is an ongoing, endogenous (that is, internally driven) 10 hz oscillation in the player&amp;#039;s brain that has nothing to do with these exogenous stimuli.  Since 500 ms is an integral multiple of the 100 ms period of this oscillation, when we sample the exogenous brain response to each weapons firing we&amp;#039;re going to end up also sampling the endogenous oscillation at the same point in its phase every time, and we will thus misattribute the endogenous signal as an exogenous response to the weapons firing.  To forestall this ambiguity in EEG analysis, we can add a small amount of temporal jitter to the intervals between firings - not so much as to make them seem unnaturally jittery to the player, but enough to get rid of this phase artefact.  The exact amount depends on what seems natural given the event separation; in this example of a 500 ms event we might deem that any variation more than 10% of the interval in either direction would seem unnatural, so we might then choose to vary the intervals over a uniform distribution from 450 ms to 550 ms.  Given the frequencies of the signals in which we&amp;#039;re interested, it isn&amp;#039;t ever necessary to add more than 150 ms (that is, 75 ms in either direction) of temporal jitter.  Add as much temporal jitter as you can, up to this 150 ms limit - but don&amp;#039;t sacrifice playability.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Log event codes for everything - absolutely everything.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This is another consideration for EEG analysis.  Did the weapons just fire (even though the firing key is being held down constantly)?  That&amp;#039;s an event.  Did some sort of motion start or stop or change speed?  That&amp;#039;s an event.  Absolutely everything that happens in the game should be reported with an event code.  (See &amp;quot;Game/Engine/Logger.cs&amp;quot;.)  We can always ignore event codes if we decide that they aren&amp;#039;t of interest in our analysis.  What we can&amp;#039;t do is go back and insert event codes after the data have been recorded.  So put everything in.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;SEE ALSO&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
http://www.gamasutra.com/view/feature/3538/designing_games_that_are_.php&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Designing Games that are Accessible to Everyone&amp;quot; by Eitan Glinert&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=582</id>
		<title>End-user Setup</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=582"/>
				<updated>2009-02-23T03:29:30Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: corrected inaccuracies and resolved ambiguities&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each Minigame has a variety of settings that can be configured individually.&lt;br /&gt;
&lt;br /&gt;
==Config==&lt;br /&gt;
&lt;br /&gt;
The Config.script file holds general settings. It can be opened with any general text editor, such as Notepad or Vim. Each line ending with a semicolon (;) indicates a command for the game to follow. Lines beginning with two forward slashes (//) are considered comments, and will not be processed. A block comment is a section beginning with (/*) and ending at (*/).&lt;br /&gt;
&lt;br /&gt;
===Lab, Home and Debug configurations===&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. The program will automatically use the LabConfig.script file if it exists; otherwise it will use Config.script. To run the program in the lab, simply make certain that the LabConfig.script file is present.&lt;br /&gt;
&lt;br /&gt;
(When the game is being run from within the debugger, a third configuration script, DebugConfig.script, is used.)&lt;br /&gt;
&lt;br /&gt;
These config files will be found in &amp;quot;[Game Install Directory]\Configs\&amp;quot; (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
See also: [[Differences in Home vs Lab Configuration]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Location===&lt;br /&gt;
&lt;br /&gt;
[Installation Directory]\Configs\Config.script (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The Global Config.script can be found in the Configs folder under the Autism Collaborative folder -- typically C:\Program Files\Autism Collaborative\Configs\Config.script.  This holds global settings that will be applied automatically when the game starts.  Individual minigames may have individual configurations specific to those minigames.  This individual config file is also called Config.script, and can be found in the Configs folder under the minigame&amp;#039;s folder -- typically C:\Program Files\Autism Collaborative\Minigames\[MiniGameName]\Configs\Config.script.&lt;br /&gt;
&lt;br /&gt;
===Global===&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetResolution([horizontal],[vertical]);&lt;br /&gt;
* Set the screen resolution this game will be played at, for example, Util.Settings.SetResolution(1024,768);&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.FullScreen = [true/false];&lt;br /&gt;
* Set whether the game window will be fullscreen, for example, Util.Settings.FullScreen = true;&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPortEnabled = [true/false];&lt;br /&gt;
* Set whether codes should be written out the Parallel Port, for example, Util.Settings.ParallelEnabled = true; If not specified, this will default to False.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPort = ParallelPort.Port1;&lt;br /&gt;
* Set which Parallel Port codes should be written to, if enabled. Valid values are Port1, Port2, and Port3. Defaults to Port1.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetScreenDimensions([Width], [Height], [Distance]);&lt;br /&gt;
* Width is the width of the display, in centimeters. Height is as height of the display, in centimeters. Distance is the distance between the display and the viewer&amp;#039;s eyes, in centimeters. For the dot coherence phase of Maritime Defender, the dots are based on the size of the visual display as it appears to the player. For example, Util.Settings.SetScreenDimensions(8.5, 6.25, 24.0);&lt;br /&gt;
&lt;br /&gt;
===Maritime Defender===&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareDegree = [Number];&lt;br /&gt;
* For the dot coherence phase, the dots are based on the size of the visual display as it appears to the player. This sets the density of the dots as they appear on the screen. Either measure, radians or degrees, may be used. For example, MaritimeDefender.Settings.DotsPerSquareRadian = 10000.0;&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerDegree = [Number];&lt;br /&gt;
* Specify the dot density as the number of dots within a circular patch of screen space with a diameter of one radian or degree of visual angle as it appears to the user.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.NumberDots = [Number];&lt;br /&gt;
* Override the above settings, specifying exactly the number of dots that should be drawn on the screen. This setting is optional.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotDiameter = System.Math.PI / 1028;&lt;br /&gt;
* Affects the average size of the coherence dots in terms of radians.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotSpeed = System.Math.PI / 16;&lt;br /&gt;
* Affects how fast the coherence dots appear to move across the screen in terms of radians per second.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotLifeSpan = 4 / 60.0;&lt;br /&gt;
* How long each dot exists on the screen. 4 / 60.0 reflects 4 frames on a 60 hertz display.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelay = 1;&lt;br /&gt;
* Additional Delay in seconds between each dot test, for the EEG readings. This is in addition to a random jitter of, by default, between 0 and 150ms; this jitter is controlled by the DotRefreshDelayJitter.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelayJitter = 0.15;&lt;br /&gt;
* A random amount of jitter between 0 and [value] seconds will added to the DotRefreshDelay so that the time between two successive coherence trials is not constant. The default is 0.15 of a second, or 150 milliseconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotResponseWait = 0.5;&lt;br /&gt;
* The duration of time in seconds immediately after a trial with no response in which late responses can be excepted.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotTrialLength = 2;&lt;br /&gt;
* The average duration of a dot test trial in seconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.SetPhaseQueue(2, &amp;quot;IdentityTest, 1, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 1, Boss, 0&amp;quot;);&lt;br /&gt;
* The game phases for Maritime Defender. A list of pairs, a name and a value. Currently, the Game must start with an IdentityTest phase. The Shooter value is how many wormholes must be opened and ships identified in order to move on to the next Phase. The DotTest value is how many dot trials will take place during that phase, where a trial may be a motion of dots, or an absence of motion.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.HaveNonCoherentTrials = false;&lt;br /&gt;
* Whether NonCoherentTrials should be included. If false, there will be coherent motion to the left or right for every trial.&lt;br /&gt;
&lt;br /&gt;
===Stellar Prospector===&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMax = 1500f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a stimulus must appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMin = 500f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a stimulus can appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a distractor must appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a distractor can appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds that a distractor can live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds that a distactor must live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusLifeMax = 6000f;&lt;br /&gt;
* The maximum time in milliseconds that a stimulus can be displayed.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMin = 1;&lt;br /&gt;
* The minimum number of stimuli that must appear before the cued sector can change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMax = 1;&lt;br /&gt;
* The maximum number of stimuli that can appear before the cued sector must change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.MaxProgress = 100;&lt;br /&gt;
* The amount of progress needed to completely finish the game. This is in arbitrary units.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.PeripheralProgress = 5;&lt;br /&gt;
* The maximum amount of progress the player can receive from correctly responding to peripheral stimuli. In the same arbitrary units as max progress.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.ProgressLostPerMiss = 1;&lt;br /&gt;
* The amount of progress lost anytime an incorrect response is given&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CentralStimulusProgressDrain = 1;&lt;br /&gt;
* Amount of progress drained every 2 seconds during a central stimulus&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.UseFlickering = true;&lt;br /&gt;
* Determines whether or not to use flickering&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.AutoCalculateFlickering = true;&lt;br /&gt;
* Whether the frames on/off and intensities of the flickering effect are automatically calculated by the frequency or are just taken from the manually set values.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterHertz = 6.67;&lt;br /&gt;
* The rate at which the center sector flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOnFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOffFrames = 5;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterIntensity = 1.25;&lt;br /&gt;
* The percentage of intensity of the center sector when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Hertz = 8.57;&lt;br /&gt;
* The rate at which sector one flickers per second&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OffFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Intensity = 1.33;&lt;br /&gt;
* The percentage of intensity of sector one when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Hertz = 10;&lt;br /&gt;
* The rate at which sector two flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector two when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3Hertz = 12;&lt;br /&gt;
* The rate at which sector three flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered off&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.Sector3Intensity = 1.5;&lt;br /&gt;
* The percentage of intensity of sector three when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Hertz = 15;&lt;br /&gt;
* The rate at which sector four flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OffFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector four when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Audio Stimuli Experiment===&lt;br /&gt;
&lt;br /&gt;
Tones will played at intervals based on the sound delay (AS_SOUND_DELAY) and max jitter (AS_MAX_JITTER) as specified in the config file, in floating-point units of seconds.  The stimulus onset asynchrony between tones is calculated by adding AS_SOUND_DELAY to a random number in the range of 0 to AS_MAX_JITTER.  The tone is the same each time, but the volume is chosen at random from the volumes specifiend in the config file.&lt;br /&gt;
&lt;br /&gt;
Volumes are in arbitrary units on a linear (not dB) scale between 0 and 1.0.  Experimenters should calibrate these units using a sound level meter to measure actual volumes in dB SPL produced by their sound card and speaker system, and modify AS_VOLUME1, AS_VOLUME2, AS_VOLUME3 and AS_VOLUME4 so that they produce the desired levels.&lt;br /&gt;
&lt;br /&gt;
Each time a tone is played, an event is written to the log.  See the next section for all possible event codes and formats.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Event Codes&lt;br /&gt;
&lt;br /&gt;
AS_START &lt;br /&gt;
&lt;br /&gt;
AS_TONE_PLAYED Volume=[volume] Tone=[tone # refers to the number n in the AS_VOLUMEn parameter] &lt;br /&gt;
&lt;br /&gt;
AS_END &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Config File Format&lt;br /&gt;
&lt;br /&gt;
AS_SOUND_DELAY = [stimulus onset asynchrony, in seconds]&lt;br /&gt;
&lt;br /&gt;
AS_MAX_JITTER = [maximum range of random jitter added AS_SOUND_DELAY]&lt;br /&gt;
&lt;br /&gt;
AS_MAX_PLAYS = [total number of times that each tones is played]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME1 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME2 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME3 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_VOLUME4 = [volume]&lt;br /&gt;
&lt;br /&gt;
AS_SOUND = [80dBl_Right or 80dBlLeft]&lt;br /&gt;
&lt;br /&gt;
Important Notes:&lt;br /&gt;
&lt;br /&gt;
- All spaces in the config file are necessary for the program to parse&lt;br /&gt;
&lt;br /&gt;
- Make sure there is no white space after the final line&lt;br /&gt;
&lt;br /&gt;
- all volumes must be expressed in double format (must include decimal, ex. 1.0 is correct, 1 is not)&lt;br /&gt;
&lt;br /&gt;
==Keyboard Configuration==&lt;br /&gt;
&lt;br /&gt;
Keyboard bindings are stored in a separate file, also specific to each minigame. For example, the keyboard bindings for the ColonySim could be found at [Installation Directory]\testkeybindings.txt (Default: &amp;quot;C:\Program Files\Autism Collaborative\testkeybindings.txt&amp;quot;). It is stored as a list of in-game events, each followed by the action that triggers it.&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Logging==&lt;br /&gt;
&lt;br /&gt;
The current default path for the log file is in the Application Data folder. The exact location will vary depending on the operating system installed.&lt;br /&gt;
&lt;br /&gt;
Vista: C:\Users\[WindowsLoginName]\Documents\Roaming\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
XP: C:\Documents and Settings\[WindowsLoginName]\My Documents\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
The documentation for the building placement log for the Colony Simulation can be found here -&amp;gt; [[Building_Placement_Log_Specification]].&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=580</id>
		<title>System Specifications and Testing</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=580"/>
				<updated>2009-02-21T05:44:27Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: updated Thinkpad T43 versus T43p&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Requirements ==&lt;br /&gt;
=== Windows XP or Vista ===&lt;br /&gt;
&lt;br /&gt;
    Hardware:&lt;br /&gt;
          o A graphics card that supports DirectX 9.0c and Shader Model 1.1 or newer. &lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o DirectX End-User Runtime or newer.&lt;br /&gt;
          o Microsoft .NET Framework Version 2.0 or newer.&lt;br /&gt;
          o Microsoft XNA Framework Redistributable 2.0 &lt;br /&gt;
&lt;br /&gt;
=== Development ===&lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o Microsoft XNA Game Studio 2.0&lt;br /&gt;
          o Tortoise SVN or other Subversion Client&lt;br /&gt;
&lt;br /&gt;
== Tested Hardware ==&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- PLEASE KEEP THESE ENTRIES IN MAJOR ORDER OF MANUFACTURER, AND MINOR ORDER OF SYSTEM (MOST RECENT FIRST) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#00C000&amp;quot;&amp;gt;FULLY FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Mac Pro 3,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dual Quad-Core Intel Xeon, 2.8 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8800 GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;32 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows Vista Ultimate&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Lenovo Thinkpad T61p&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo T7500, 2.2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia Quadro FX 570M&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T43p&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Pentium-M, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility FIRE GL V3200&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;128 MB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#D0B000&amp;quot;&amp;gt;SLOW&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron e1505&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.83 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X1400&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;MacBook Air 1,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.6 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel GMA X3100 integrated graphics&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#E00000&amp;quot;&amp;gt;NOT FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T43&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Pentium-M, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X300&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;64 MB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T41&amp;lt;/td&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon 7500&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=578</id>
		<title>System Specifications and Testing</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=578"/>
				<updated>2009-02-05T21:17:21Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: /* Tested Hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Requirements ==&lt;br /&gt;
=== Windows XP or Vista ===&lt;br /&gt;
&lt;br /&gt;
    Hardware:&lt;br /&gt;
          o A graphics card that supports DirectX 9.0c and Shader Model 1.1 or newer. &lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o DirectX End-User Runtime or newer.&lt;br /&gt;
          o Microsoft .NET Framework Version 2.0 or newer.&lt;br /&gt;
          o Microsoft XNA Framework Redistributable 2.0 &lt;br /&gt;
&lt;br /&gt;
=== Development ===&lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o Microsoft XNA Game Studio 2.0&lt;br /&gt;
          o Tortoise SVN or other Subversion Client&lt;br /&gt;
&lt;br /&gt;
== Tested Hardware ==&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- PLEASE KEEP THESE ENTRIES IN MAJOR ORDER OF MANUFACTURER, AND MINOR ORDER OF SYSTEM (MOST RECENT FIRST) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#00C000&amp;quot;&amp;gt;FULLY FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Mac Pro 3,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dual Quad-Core Intel Xeon, 2.8 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8800 GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;32 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows Vista Ultimate&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Lenovo Thinkpad T61p&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo T7500, 2.2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia Quadro FX 570M&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T43&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Pentium-M, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X300&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;64 MB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#D0B000&amp;quot;&amp;gt;SLOW&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron e1505&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.83 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X1400&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;MacBook Air 1,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.6 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel GMA X3100 integrated graphics&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#E00000&amp;quot;&amp;gt;NOT FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T41&amp;lt;/td&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon 7500&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=577</id>
		<title>System Specifications and Testing</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=577"/>
				<updated>2009-02-05T21:13:01Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: /* Tested Hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Requirements ==&lt;br /&gt;
=== Windows XP or Vista ===&lt;br /&gt;
&lt;br /&gt;
    Hardware:&lt;br /&gt;
          o A graphics card that supports DirectX 9.0c and Shader Model 1.1 or newer. &lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o DirectX End-User Runtime or newer.&lt;br /&gt;
          o Microsoft .NET Framework Version 2.0 or newer.&lt;br /&gt;
          o Microsoft XNA Framework Redistributable 2.0 &lt;br /&gt;
&lt;br /&gt;
=== Development ===&lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o Microsoft XNA Game Studio 2.0&lt;br /&gt;
          o Tortoise SVN or other Subversion Client&lt;br /&gt;
&lt;br /&gt;
== Tested Hardware ==&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#00C000&amp;quot;&amp;gt;FULLY FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Mac Pro 3,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dual Quad-Core Intel Xeon, 2.8 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8800 GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;32 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows Vista Ultimate&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Lenovo Thinkpad T61p&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo T7500, 2.2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia Quadro FX 570M&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T43&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Pentium-M, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X300&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;64 MB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#D0B000&amp;quot;&amp;gt;SLOW&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron e1505&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.83 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X1400&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;MacBook Air 1,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.6 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel GMA X3100 integrated graphics&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#E00000&amp;quot;&amp;gt;NOT FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T41&amp;lt;/td&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon 7500&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=576</id>
		<title>System Specifications and Testing</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=576"/>
				<updated>2009-02-05T21:11:06Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: moved rows&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Requirements ==&lt;br /&gt;
=== Windows XP or Vista ===&lt;br /&gt;
&lt;br /&gt;
    Hardware:&lt;br /&gt;
          o A graphics card that supports DirectX 9.0c and Shader Model 1.1 or newer. &lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o DirectX End-User Runtime or newer.&lt;br /&gt;
          o Microsoft .NET Framework Version 2.0 or newer.&lt;br /&gt;
          o Microsoft XNA Framework Redistributable 2.0 &lt;br /&gt;
&lt;br /&gt;
=== Development ===&lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o Microsoft XNA Game Studio 2.0&lt;br /&gt;
          o Tortoise SVN or other Subversion Client&lt;br /&gt;
&lt;br /&gt;
== Tested Hardware ==&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#00C000&amp;quot;&amp;gt;FULLY FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Mac Pro 3,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dual Quad-Core Intel Xeon, 2.8 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8800 GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;32 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;nVidia Quadro FX 570M&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows Vista Ultimate&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Lenovo Thinkpad T61p&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo T7500, 2.2 GHz&amp;lt;/td&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T43&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Pentium-M, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X300&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;64 MB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#D0B000&amp;quot;&amp;gt;SLOW&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron e1505&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.83 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X1400&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;MacBook Air 1,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.6 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel GMA X3100 integrated graphics&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#E00000&amp;quot;&amp;gt;NOT FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T41&amp;lt;/td&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon 7500&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=575</id>
		<title>System Specifications and Testing</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=575"/>
				<updated>2009-02-05T21:09:49Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: added Lenovo T61p&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Requirements ==&lt;br /&gt;
=== Windows XP or Vista ===&lt;br /&gt;
&lt;br /&gt;
    Hardware:&lt;br /&gt;
          o A graphics card that supports DirectX 9.0c and Shader Model 1.1 or newer. &lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o DirectX End-User Runtime or newer.&lt;br /&gt;
          o Microsoft .NET Framework Version 2.0 or newer.&lt;br /&gt;
          o Microsoft XNA Framework Redistributable 2.0 &lt;br /&gt;
&lt;br /&gt;
=== Development ===&lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o Microsoft XNA Game Studio 2.0&lt;br /&gt;
          o Tortoise SVN or other Subversion Client&lt;br /&gt;
&lt;br /&gt;
== Tested Hardware ==&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#00C000&amp;quot;&amp;gt;FULLY FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Mac Pro 3,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dual Quad-Core Intel Xeon, 2.8 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8800 GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;32 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Lenovo Thinkpad T61p&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo T7500, 2.2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia Quadro FX 570M&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows Vista Ultimate&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T43&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Pentium-M, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X300&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;64 MB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#D0B000&amp;quot;&amp;gt;SLOW&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron e1505&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.83 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X1400&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;MacBook Air 1,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.6 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel GMA X3100 integrated graphics&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#E00000&amp;quot;&amp;gt;NOT FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T41&amp;lt;/td&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon 7500&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=574</id>
		<title>System Specifications and Testing</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=574"/>
				<updated>2009-02-05T20:57:41Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: corrected Mac Pro details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Requirements ==&lt;br /&gt;
=== Windows XP or Vista ===&lt;br /&gt;
&lt;br /&gt;
    Hardware:&lt;br /&gt;
          o A graphics card that supports DirectX 9.0c and Shader Model 1.1 or newer. &lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o DirectX End-User Runtime or newer.&lt;br /&gt;
          o Microsoft .NET Framework Version 2.0 or newer.&lt;br /&gt;
          o Microsoft XNA Framework Redistributable 2.0 &lt;br /&gt;
&lt;br /&gt;
=== Development ===&lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o Microsoft XNA Game Studio 2.0&lt;br /&gt;
          o Tortoise SVN or other Subversion Client&lt;br /&gt;
&lt;br /&gt;
== Tested Hardware ==&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#00C000&amp;quot;&amp;gt;FULLY FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Mac Pro 3,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dual Quad-Core Intel Xeon, 2.8 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8800 GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;32 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows Vista Ultimate&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T43&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Pentium-M, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X300&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;64 MB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#D0B000&amp;quot;&amp;gt;SLOW&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron e1505&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.83 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X1400&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;MacBook Air 1,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.6 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel GMA X3100 integrated graphics&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#E00000&amp;quot;&amp;gt;NOT FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T41&amp;lt;/td&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon 7500&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=573</id>
		<title>System Specifications and Testing</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=573"/>
				<updated>2009-02-05T15:40:01Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: updated list of tested hardware&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Requirements ==&lt;br /&gt;
=== Windows XP or Vista ===&lt;br /&gt;
&lt;br /&gt;
    Hardware:&lt;br /&gt;
          o A graphics card that supports DirectX 9.0c and Shader Model 1.1 or newer. &lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o DirectX End-User Runtime or newer.&lt;br /&gt;
          o Microsoft .NET Framework Version 2.0 or newer.&lt;br /&gt;
          o Microsoft XNA Framework Redistributable 2.0 &lt;br /&gt;
&lt;br /&gt;
=== Development ===&lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o Microsoft XNA Game Studio 2.0&lt;br /&gt;
          o Tortoise SVN or other Subversion Client&lt;br /&gt;
&lt;br /&gt;
== Tested Hardware ==&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#00C000&amp;quot;&amp;gt;FULLY FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Mac Pro&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;dual Intel Core 2 Duo, 2.4 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8800 GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;32 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron 1720&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows Vista Ultimate&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;nVidia GeForce 8600M GT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T43&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Pentium-M, 2 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X300&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;64 MB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#D0B000&amp;quot;&amp;gt;SLOW&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Dell Inspiron e1505&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.83 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon X1400&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;MacBook Air 1,1&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Windows XP SP2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel Core 2 Duo, 1.6 GHz&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Intel GMA X3100 integrated graphics&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2 GB&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;#E00000&amp;quot;&amp;gt;NOT FUNCTIONAL&amp;lt;/font&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Model&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;System&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Processor&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Graphics&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;RAM&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;IBM Thinkpad T41&amp;lt;/td&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ATI Mobility Radeon 7500&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=569</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=569"/>
				<updated>2009-01-28T20:32:18Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: /* Write to the Experiment Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
For a step by step tutorial with code examples, see [[How_to_Make_a_Mini-Game]]&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewMiniame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing.  (We may want other cameras, too, for whatever reason.)&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from class Camera. At the time of this writing (January 2009) these types are limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now we&amp;#039;ll use a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera, be certain to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039;s initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled&lt;br /&gt;
&lt;br /&gt;
Once this has been done, you&amp;#039;ll have an effect loaded into the Particle Engine object &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; via the Particle Manager. However the Particle Engine isn&amp;#039;t worth much if it&amp;#039;s never called on to do anything, so let&amp;#039;s set up the rest of the code that&amp;#039;s needed for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To accomplish this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order is desired&lt;br /&gt;
&lt;br /&gt;
This will draw and update any particles that have been loaded by the Particle Manager and have been set active.  However, the particle engine that we just created hasn&amp;#039;t yet been set active, so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
The particle engine instance &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; is now active.  If it were already active, its lifetime would have been reset to 0.  (The lifetime of a particle engine starts at zero and increases until its maximum lifetime is reached, in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive.)&lt;br /&gt;
&lt;br /&gt;
This same method can be used to stop the particle engine from creating any more particles, by supplying &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; as its parameter instead:&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false);&lt;br /&gt;
&lt;br /&gt;
A series of methods allow us to modify the drawing of the ParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start the TACParticleEditor program.  This program presents two windows, one containing a Windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whichever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded, the current directory is switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must be added manually to the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experiment Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (My Documents\Autism Collaborative\Users\DefaultUser\LogFiles\ExperimentLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed.  (That&amp;#039;s the whole point of this game!)&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each mini-game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside this range, both positive and negative; these codes may be used in the same way, but will be logged only to the text log file and not to the parallel port.&lt;br /&gt;
** Codes in the negative range are considered debugging codes, and can be omitted from the log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging, thus:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;WeaponFired&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
As these assigned events are local to each InputHandler object, your mini-game&amp;#039;s event code assignments will not interact with the event code assignments of other mini-games.&lt;br /&gt;
&lt;br /&gt;
Every mini-game should start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is true by default only when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
===Event Code Summary===&lt;br /&gt;
&lt;br /&gt;
Event Codes may be any integer value.&lt;br /&gt;
* Less than 0 : Debug events, will only be written in Debug Mode.&lt;br /&gt;
* 0 : Null, no event.&lt;br /&gt;
* 1 - 255 : Experimentation event, will be written to the log and the parallel port.&lt;br /&gt;
* Greater then 255 : Cannot be written to the parallel port, will be written to log only.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\DebugConfig.script&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;DebugConfig.script&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;Release&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
** Select Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Installer\Installer.iss with InnoSetup&lt;br /&gt;
** Select Build-&amp;gt;Compile&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\AstropolisSetupLite.exe&lt;br /&gt;
*** When the compilation is finished, it will ask if you want to test the installer. It is recommended to test it, but not required.&lt;br /&gt;
* Repeat the last step with InstallerFull.iss if desired, this will generate AstropolisSetup.exe, which contains the full offline installers for the dependencies.&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* To transfer the file, use an SSH client such as WinSCP (for a graphical interface) or PuTTY&amp;#039;s PSCP (from the command line)&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Log in to AutismCollaborative.org (port 22)&lt;br /&gt;
* Upload AstropolisSetup.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the web site until the new installer finishes uploading&lt;br /&gt;
* Once the upload is complete, ssh into a shell and enter the command &amp;quot;mv /home/{$user}/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SSH client)&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make certain that your user ID has write and search permission for the autismcollaborative.org/downloads directory.&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (such as when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt.  The user is encouraged to email that file to us so that we can locate the problem.  Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a mini-game. This ability may prove invaluable in debugging based on end-user error reports.  All that you (the programmer) must do is override the string MiniGame.DebugInfo() function.  When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Maritime Defender&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for the space bar to be pressed before disappearing&lt;br /&gt;
**During the navigation-phase tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Navigation phase looks correct: Dots are the correct size and dot correlation fits PEST data. Look for any slowdown or loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly on taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Simulator&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure that you cannot click through things&lt;br /&gt;
**Select each type of building and make sure the pop-up information is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, the player&amp;#039;s money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure that the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that mini-games can be accessed&lt;br /&gt;
**Attempt to play each mini-game through the colony simulator, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through the tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure that event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off the display.&lt;br /&gt;
**Input events still work when the player is prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to the main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e. tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in the game; player remains able to exit through the game menu if ESC is pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through the main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled, and returns to the main menu&lt;br /&gt;
**Make certain that all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=568</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=568"/>
				<updated>2009-01-28T20:24:12Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: moved details on lab and home config files from &amp;quot;Code How To&amp;#039;s&amp;quot; to &amp;quot;End-user Setup&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
For a step by step tutorial with code examples, see [[How_to_Make_a_Mini-Game]]&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewMiniame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing.  (We may want other cameras, too, for whatever reason.)&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from class Camera. At the time of this writing (January 2009) these types are limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now we&amp;#039;ll use a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera, be certain to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039;s initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled&lt;br /&gt;
&lt;br /&gt;
Once this has been done, you&amp;#039;ll have an effect loaded into the Particle Engine object &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; via the Particle Manager. However the Particle Engine isn&amp;#039;t worth much if it&amp;#039;s never called on to do anything, so let&amp;#039;s set up the rest of the code that&amp;#039;s needed for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To accomplish this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order is desired&lt;br /&gt;
&lt;br /&gt;
This will draw and update any particles that have been loaded by the Particle Manager and have been set active.  However, the particle engine that we just created hasn&amp;#039;t yet been set active, so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
The particle engine instance &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; is now active.  If it were already active, its lifetime would have been reset to 0.  (The lifetime of a particle engine starts at zero and increases until its maximum lifetime is reached, in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive.)&lt;br /&gt;
&lt;br /&gt;
This same method can be used to stop the particle engine from creating any more particles, by supplying &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; as its parameter instead:&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false);&lt;br /&gt;
&lt;br /&gt;
A series of methods allow us to modify the drawing of the ParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start the TACParticleEditor program.  This program presents two windows, one containing a Windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whichever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded, the current directory is switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must be added manually to the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experiment Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (My Documents\Autism Collaborative\Users\DefaultUser\LogFiles\ExperimentLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed.  (That&amp;#039;s the whole point of this game!)&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each mini-game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside this range, both positive and negative; these codes may be used in the same way, but will be logged only to the text log file and not to the parallel port.&lt;br /&gt;
** Codes in the negative range are considered debugging codes, and can be omitted from the log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
As these assigned events are local to each InputHandler object, your mini-game&amp;#039;s event code assignments will not interact with the event code assignments of other mini-games.&lt;br /&gt;
&lt;br /&gt;
Every mini-game should start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is true by default only when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
===Event Code Summary===&lt;br /&gt;
&lt;br /&gt;
Event Codes may be any integer value.&lt;br /&gt;
* Less than 0 : Debug events, will only be written in Debug Mode.&lt;br /&gt;
* 0 : Null, no event.&lt;br /&gt;
* 1 - 255 : Experimentation event, will be written to the log and the parallel port.&lt;br /&gt;
* Greater then 255 : Cannot be written to the parallel port, will be written to log only.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\DebugConfig.script&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;DebugConfig.script&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;Release&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
** Select Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Installer\Installer.iss with InnoSetup&lt;br /&gt;
** Select Build-&amp;gt;Compile&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\AstropolisSetupLite.exe&lt;br /&gt;
*** When the compilation is finished, it will ask if you want to test the installer. It is recommended to test it, but not required.&lt;br /&gt;
* Repeat the last step with InstallerFull.iss if desired, this will generate AstropolisSetup.exe, which contains the full offline installers for the dependencies.&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* To transfer the file, use an SSH client such as WinSCP (for a graphical interface) or PuTTY&amp;#039;s PSCP (from the command line)&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Log in to AutismCollaborative.org (port 22)&lt;br /&gt;
* Upload AstropolisSetup.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the web site until the new installer finishes uploading&lt;br /&gt;
* Once the upload is complete, ssh into a shell and enter the command &amp;quot;mv /home/{$user}/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SSH client)&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make certain that your user ID has write and search permission for the autismcollaborative.org/downloads directory.&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (such as when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt.  The user is encouraged to email that file to us so that we can locate the problem.  Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a mini-game. This ability may prove invaluable in debugging based on end-user error reports.  All that you (the programmer) must do is override the string MiniGame.DebugInfo() function.  When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Maritime Defender&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for the space bar to be pressed before disappearing&lt;br /&gt;
**During the navigation-phase tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Navigation phase looks correct: Dots are the correct size and dot correlation fits PEST data. Look for any slowdown or loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly on taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Simulator&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure that you cannot click through things&lt;br /&gt;
**Select each type of building and make sure the pop-up information is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, the player&amp;#039;s money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure that the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that mini-games can be accessed&lt;br /&gt;
**Attempt to play each mini-game through the colony simulator, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through the tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure that event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off the display.&lt;br /&gt;
**Input events still work when the player is prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to the main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e. tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in the game; player remains able to exit through the game menu if ESC is pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through the main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled, and returns to the main menu&lt;br /&gt;
**Make certain that all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=567</id>
		<title>End-user Setup</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=567"/>
				<updated>2009-01-28T20:23:10Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: /* Lab, Home and Debug configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each Minigame has a variety of settings that can be configured individually.&lt;br /&gt;
&lt;br /&gt;
==Config==&lt;br /&gt;
&lt;br /&gt;
The Config.script file holds general settings. It can be opened with any general text editor, such as Notepad or Vim. Each line ending with a semicolon (;) indicates a command for the game to follow. Lines beginning with two forward slashes (//) are considered comments, and will not be processed. A block comment is a section beginning with (/*) and ending at (*/).&lt;br /&gt;
&lt;br /&gt;
===Lab, Home and Debug configurations===&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. The program will automatically use the LabConfig.script file if it exists; otherwise it will use Config.script. To run the program in the lab, simply make certain that the LabConfig.script file is present.&lt;br /&gt;
&lt;br /&gt;
(When the game is being run from within the debugger, a third configuration script, DebugConfig.script, is used.)&lt;br /&gt;
&lt;br /&gt;
These config files will be found in &amp;quot;[Game Install Directory]\Configs\&amp;quot; (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
See also: [[Differences in Home vs Lab Configuration]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Location===&lt;br /&gt;
&lt;br /&gt;
[Installation Directory]\Configs\Config.script (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The Global Config.script can be found in the Configs folder under the Autism Collaborative folder -- typically C:\Program Files\Autism Collaborative\Configs\Config.script.  This holds global settings that will be applied automatically when the game starts.  Individual minigames may have individual configurations specific to those minigames.  This individual config file is also called Config.script, and can be found in the Configs folder under the minigame&amp;#039;s folder -- typically C:\Program Files\Autism Collaborative\Minigames\[MiniGameName]\Configs\Config.script.&lt;br /&gt;
&lt;br /&gt;
===Global===&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetResolution([horizontal],[vertical]);&lt;br /&gt;
* Set the screen resolution this game will be played at, for example, Util.Settings.SetResolution(1024,768);&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.FullScreen = [true/false];&lt;br /&gt;
* Set whether the game window will be fullscreen, for example, Util.Settings.FullScreen = true;&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPortEnabled = [true/false];&lt;br /&gt;
* Set whether codes should be written out the Parallel Port, for example, Util.Settings.ParallelEnabled = true; If not specified, this will default to False.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPort = ParallelPort.Port1;&lt;br /&gt;
* Set which Parallel Port codes should be written to, if enabled. Valid values are Port1, Port2, and Port3. Defaults to Port1.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetScreenDimensions([Width], [Height], [Distance]);&lt;br /&gt;
* Width is the width of the display, in centimeters. Height is as height of the display, in centimeters. Distance is the distance between the display and the viewer&amp;#039;s eyes, in centimeters. For the dot coherence phase of Maritime Defender, the dots are based on the size of the visual display as it appears to the player. For example, Util.Settings.SetScreenDimensions(8.5, 6.25, 24.0);&lt;br /&gt;
&lt;br /&gt;
===Maritime Defender===&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareDegree = [Number];&lt;br /&gt;
* For the dot coherence phase, the dots are based on the size of the visual display as it appears to the player. This sets the density of the dots as they appear on the screen. Either measure, radians or degrees, may be used. For example, MaritimeDefender.Settings.DotsPerSquareRadian = 10000.0;&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerDegree = [Number];&lt;br /&gt;
* Specify the dot density as the number of dots within a circular patch of screen space with a diameter of one radian or degree of visual angle as it appears to the user.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.NumberDots = [Number];&lt;br /&gt;
* Override the above settings, specifying exactly the number of dots that should be drawn on the screen. This setting is optional.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotDiameter = System.Math.PI / 1028;&lt;br /&gt;
* Affects the average size of the coherence dots in terms of radians.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotSpeed = System.Math.PI / 16;&lt;br /&gt;
* Affects how fast the coherence dots appear to move across the screen in terms of radians per second.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotLifeSpan = 4 / 60.0;&lt;br /&gt;
* How long each dot exists on the screen. 4 / 60.0 reflects 4 frames on a 60 hertz display.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelay = 1;&lt;br /&gt;
* Additional Delay in seconds between each dot test, for the EEG readings. This is in addition to a random jitter of, by default, between 0 and 150ms; this jitter is controlled by the DotRefreshDelayJitter.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelayJitter = 0.15;&lt;br /&gt;
* A random amount of jitter between 0 and [value] seconds will added to the DotRefreshDelay so that the time between two successive coherence trials is not constant. The default is 0.15 of a second, or 150 milliseconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotResponseWait = 0.5;&lt;br /&gt;
* The duration of time in seconds immediately after a trial with no response in which late responses can be excepted.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotTrialLength = 2;&lt;br /&gt;
* The average duration of a dot test trial in seconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.SetPhaseQueue(2, &amp;quot;IdentityTest, 1, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 1, Boss, 0&amp;quot;);&lt;br /&gt;
* The game phases for Maritime Defender. A list of pairs, a name and a value. Currently, the Game must start with an IdentityTest phase. The Shooter value is how many wormholes must be opened and ships identified in order to move on to the next Phase. The DotTest value is how many dot trials will take place during that phase, where a trial may be a motion of dots, or an absence of motion.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.HaveNonCoherentTrials = false;&lt;br /&gt;
* Whether NonCoherentTrials should be included. If false, there will be coherent motion to the left or right for every trial.&lt;br /&gt;
&lt;br /&gt;
===Stellar Prospector===&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMax = 1500f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a stimulus must appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMin = 500f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a stimulus can appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a distractor must appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a distractor can appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds that a distractor can live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds that a distactor must live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusLifeMax = 6000f;&lt;br /&gt;
* The maximum time in milliseconds that a stimulus can be displayed.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMin = 1;&lt;br /&gt;
* The minimum number of stimuli that must appear before the cued sector can change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMax = 1;&lt;br /&gt;
* The maximum number of stimuli that can appear before the cued sector must change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.MaxProgress = 100;&lt;br /&gt;
* The amount of progress needed to completely finish the game. This is in arbitrary units.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.PeripheralProgress = 5;&lt;br /&gt;
* The maximum amount of progress the player can receive from correctly responding to peripheral stimuli. In the same arbitrary units as max progress.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.ProgressLostPerMiss = 1;&lt;br /&gt;
* The amount of progress lost anytime an incorrect response is given&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CentralStimulusProgressDrain = 1;&lt;br /&gt;
* Amount of progress drained every 2 seconds during a central stimulus&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.AutoCalculateFlickering = true;&lt;br /&gt;
* Whether the frames on/off and intensities of the flickering effect are automatically calculated by the frequency or are just taken from the manually set values.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterHertz = 6.67;&lt;br /&gt;
* The rate at which the center sector flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOnFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOffFrames = 5;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterIntensity = 1.25;&lt;br /&gt;
* The percentage of intensity of the center sector when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Hertz = 8.57;&lt;br /&gt;
* The rate at which sector one flickers per second&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OffFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Intensity = 1.33;&lt;br /&gt;
* The percentage of intensity of sector one when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Hertz = 10;&lt;br /&gt;
* The rate at which sector two flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector two when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3Hertz = 12;&lt;br /&gt;
* The rate at which sector three flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered off&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.Sector3Intensity = 1.5;&lt;br /&gt;
* The percentage of intensity of sector three when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Hertz = 15;&lt;br /&gt;
* The rate at which sector four flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OffFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector four when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
==Keyboard Configuration==&lt;br /&gt;
&lt;br /&gt;
Keyboard bindings are stored in a separate file, also specific to each minigame. For example, the keyboard bindings for the ColonySim could be found at [Installation Directory]\testkeybindings.txt (Default: &amp;quot;C:\Program Files\Autism Collaborative\testkeybindings.txt&amp;quot;). It is stored as a list of in-game events, each followed by the action that triggers it.&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Logging==&lt;br /&gt;
&lt;br /&gt;
The current default path for the log file is in the Application Data folder. The exact location will vary depending on the operating system installed.&lt;br /&gt;
&lt;br /&gt;
Vista: C:\Users\[WindowsLoginName]\Documents\Roaming\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
XP: C:\Documents and Settings\[WindowsLoginName]\My Documents\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
The documentation for the building placement log for the Colony Simulation can be found here -&amp;gt; [[Building_Placement_Log_Specification]].&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=566</id>
		<title>End-user Setup</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=566"/>
				<updated>2009-01-28T20:22:04Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: moved details on lab and home config files from &amp;quot;Code How To&amp;#039;s&amp;quot; to &amp;quot;End-user Setup&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each Minigame has a variety of settings that can be configured individually.&lt;br /&gt;
&lt;br /&gt;
==Config==&lt;br /&gt;
&lt;br /&gt;
The Config.script file holds general settings. It can be opened with any general text editor, such as Notepad or Vim. Each line ending with a semicolon (;) indicates a command for the game to follow. Lines beginning with two forward slashes (//) are considered comments, and will not be processed. A block comment is a section beginning with (/*) and ending at (*/).&lt;br /&gt;
&lt;br /&gt;
==Lab, Home and Debug configurations==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. The program will automatically use the LabConfig.script file if it exists; otherwise it will use Config.script. To run the program in the lab, simply make certain that the LabConfig.script file is present.&lt;br /&gt;
&lt;br /&gt;
(When the game is being run from within the debugger, a third configuration script, DebugConfig.script, is used.)&lt;br /&gt;
&lt;br /&gt;
These config files will be found in &amp;quot;[Game Install Directory]\Configs\&amp;quot; (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
See also: [[Differences in Home vs Lab Configuration]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Location===&lt;br /&gt;
&lt;br /&gt;
[Installation Directory]\Configs\Config.script (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The Global Config.script can be found in the Configs folder under the Autism Collaborative folder -- typically C:\Program Files\Autism Collaborative\Configs\Config.script.  This holds global settings that will be applied automatically when the game starts.  Individual minigames may have individual configurations specific to those minigames.  This individual config file is also called Config.script, and can be found in the Configs folder under the minigame&amp;#039;s folder -- typically C:\Program Files\Autism Collaborative\Minigames\[MiniGameName]\Configs\Config.script.&lt;br /&gt;
&lt;br /&gt;
===Global===&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetResolution([horizontal],[vertical]);&lt;br /&gt;
* Set the screen resolution this game will be played at, for example, Util.Settings.SetResolution(1024,768);&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.FullScreen = [true/false];&lt;br /&gt;
* Set whether the game window will be fullscreen, for example, Util.Settings.FullScreen = true;&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPortEnabled = [true/false];&lt;br /&gt;
* Set whether codes should be written out the Parallel Port, for example, Util.Settings.ParallelEnabled = true; If not specified, this will default to False.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPort = ParallelPort.Port1;&lt;br /&gt;
* Set which Parallel Port codes should be written to, if enabled. Valid values are Port1, Port2, and Port3. Defaults to Port1.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetScreenDimensions([Width], [Height], [Distance]);&lt;br /&gt;
* Width is the width of the display, in centimeters. Height is as height of the display, in centimeters. Distance is the distance between the display and the viewer&amp;#039;s eyes, in centimeters. For the dot coherence phase of Maritime Defender, the dots are based on the size of the visual display as it appears to the player. For example, Util.Settings.SetScreenDimensions(8.5, 6.25, 24.0);&lt;br /&gt;
&lt;br /&gt;
===Maritime Defender===&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareDegree = [Number];&lt;br /&gt;
* For the dot coherence phase, the dots are based on the size of the visual display as it appears to the player. This sets the density of the dots as they appear on the screen. Either measure, radians or degrees, may be used. For example, MaritimeDefender.Settings.DotsPerSquareRadian = 10000.0;&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerDegree = [Number];&lt;br /&gt;
* Specify the dot density as the number of dots within a circular patch of screen space with a diameter of one radian or degree of visual angle as it appears to the user.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.NumberDots = [Number];&lt;br /&gt;
* Override the above settings, specifying exactly the number of dots that should be drawn on the screen. This setting is optional.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotDiameter = System.Math.PI / 1028;&lt;br /&gt;
* Affects the average size of the coherence dots in terms of radians.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotSpeed = System.Math.PI / 16;&lt;br /&gt;
* Affects how fast the coherence dots appear to move across the screen in terms of radians per second.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotLifeSpan = 4 / 60.0;&lt;br /&gt;
* How long each dot exists on the screen. 4 / 60.0 reflects 4 frames on a 60 hertz display.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelay = 1;&lt;br /&gt;
* Additional Delay in seconds between each dot test, for the EEG readings. This is in addition to a random jitter of, by default, between 0 and 150ms; this jitter is controlled by the DotRefreshDelayJitter.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelayJitter = 0.15;&lt;br /&gt;
* A random amount of jitter between 0 and [value] seconds will added to the DotRefreshDelay so that the time between two successive coherence trials is not constant. The default is 0.15 of a second, or 150 milliseconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotResponseWait = 0.5;&lt;br /&gt;
* The duration of time in seconds immediately after a trial with no response in which late responses can be excepted.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotTrialLength = 2;&lt;br /&gt;
* The average duration of a dot test trial in seconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.SetPhaseQueue(2, &amp;quot;IdentityTest, 1, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 1, Boss, 0&amp;quot;);&lt;br /&gt;
* The game phases for Maritime Defender. A list of pairs, a name and a value. Currently, the Game must start with an IdentityTest phase. The Shooter value is how many wormholes must be opened and ships identified in order to move on to the next Phase. The DotTest value is how many dot trials will take place during that phase, where a trial may be a motion of dots, or an absence of motion.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.HaveNonCoherentTrials = false;&lt;br /&gt;
* Whether NonCoherentTrials should be included. If false, there will be coherent motion to the left or right for every trial.&lt;br /&gt;
&lt;br /&gt;
===Stellar Prospector===&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMax = 1500f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a stimulus must appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMin = 500f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a stimulus can appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a distractor must appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a distractor can appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds that a distractor can live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds that a distactor must live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusLifeMax = 6000f;&lt;br /&gt;
* The maximum time in milliseconds that a stimulus can be displayed.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMin = 1;&lt;br /&gt;
* The minimum number of stimuli that must appear before the cued sector can change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMax = 1;&lt;br /&gt;
* The maximum number of stimuli that can appear before the cued sector must change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.MaxProgress = 100;&lt;br /&gt;
* The amount of progress needed to completely finish the game. This is in arbitrary units.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.PeripheralProgress = 5;&lt;br /&gt;
* The maximum amount of progress the player can receive from correctly responding to peripheral stimuli. In the same arbitrary units as max progress.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.ProgressLostPerMiss = 1;&lt;br /&gt;
* The amount of progress lost anytime an incorrect response is given&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CentralStimulusProgressDrain = 1;&lt;br /&gt;
* Amount of progress drained every 2 seconds during a central stimulus&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.AutoCalculateFlickering = true;&lt;br /&gt;
* Whether the frames on/off and intensities of the flickering effect are automatically calculated by the frequency or are just taken from the manually set values.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterHertz = 6.67;&lt;br /&gt;
* The rate at which the center sector flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOnFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOffFrames = 5;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterIntensity = 1.25;&lt;br /&gt;
* The percentage of intensity of the center sector when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Hertz = 8.57;&lt;br /&gt;
* The rate at which sector one flickers per second&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OffFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Intensity = 1.33;&lt;br /&gt;
* The percentage of intensity of sector one when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Hertz = 10;&lt;br /&gt;
* The rate at which sector two flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector two when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3Hertz = 12;&lt;br /&gt;
* The rate at which sector three flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered off&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.Sector3Intensity = 1.5;&lt;br /&gt;
* The percentage of intensity of sector three when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Hertz = 15;&lt;br /&gt;
* The rate at which sector four flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OffFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector four when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
==Keyboard Configuration==&lt;br /&gt;
&lt;br /&gt;
Keyboard bindings are stored in a separate file, also specific to each minigame. For example, the keyboard bindings for the ColonySim could be found at [Installation Directory]\testkeybindings.txt (Default: &amp;quot;C:\Program Files\Autism Collaborative\testkeybindings.txt&amp;quot;). It is stored as a list of in-game events, each followed by the action that triggers it.&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Logging==&lt;br /&gt;
&lt;br /&gt;
The current default path for the log file is in the Application Data folder. The exact location will vary depending on the operating system installed.&lt;br /&gt;
&lt;br /&gt;
Vista: C:\Users\[WindowsLoginName]\Documents\Roaming\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
XP: C:\Documents and Settings\[WindowsLoginName]\My Documents\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
The documentation for the building placement log for the Colony Simulation can be found here -&amp;gt; [[Building_Placement_Log_Specification]].&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=565</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=565"/>
				<updated>2009-01-28T19:50:24Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: /* Run the Game in the Lab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
For a step by step tutorial with code examples, see [[How_to_Make_a_Mini-Game]]&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewMiniame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing.  (We may want other cameras, too, for whatever reason.)&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from class Camera. At the time of this writing (January 2009) these types are limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now we&amp;#039;ll use a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera, be certain to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039;s initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled&lt;br /&gt;
&lt;br /&gt;
Once this has been done, you&amp;#039;ll have an effect loaded into the Particle Engine object &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; via the Particle Manager. However the Particle Engine isn&amp;#039;t worth much if it&amp;#039;s never called on to do anything, so let&amp;#039;s set up the rest of the code that&amp;#039;s needed for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To accomplish this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order is desired&lt;br /&gt;
&lt;br /&gt;
This will draw and update any particles that have been loaded by the Particle Manager and have been set active.  However, the particle engine that we just created hasn&amp;#039;t yet been set active, so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
The particle engine instance &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; is now active.  If it were already active, its lifetime would have been reset to 0.  (The lifetime of a particle engine starts at zero and increases until its maximum lifetime is reached, in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive.)&lt;br /&gt;
&lt;br /&gt;
This same method can be used to stop the particle engine from creating any more particles, by supplying &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; as its parameter instead:&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false);&lt;br /&gt;
&lt;br /&gt;
A series of methods allow us to modify the drawing of the ParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start the TACParticleEditor program.  This program presents two windows, one containing a Windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whichever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded, the current directory is switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must be added manually to the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experiment Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (My Documents\Autism Collaborative\Users\DefaultUser\LogFiles\ExperimentLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed.  (That&amp;#039;s the whole point of this game!)&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each mini-game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside this range, both positive and negative; these codes may be used in the same way, but will be logged only to the text log file and not to the parallel port.&lt;br /&gt;
** Codes in the negative range are considered debugging codes, and can be omitted from the log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
As these assigned events are local to each InputHandler object, your mini-game&amp;#039;s event code assignments will not interact with the event code assignments of other mini-games.&lt;br /&gt;
&lt;br /&gt;
Every mini-game should start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is true by default only when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
===Event Code Summary===&lt;br /&gt;
&lt;br /&gt;
Event Codes may be any integer value.&lt;br /&gt;
* Less than 0 : Debug events, will only be written in Debug Mode.&lt;br /&gt;
* 0 : Null, no event.&lt;br /&gt;
* 1 - 255 : Experimentation event, will be written to the log and the parallel port.&lt;br /&gt;
* Greater then 255 : Cannot be written to the parallel port, will be written to log only.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\DebugConfig.script&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;DebugConfig.script&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
==Run the Game in the Lab==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. The program will automatically use the LabConfig.script file if it exists; otherwise it will use Config.script. To run the program in the lab, simply make certain that the LabConfig.script file is present.&lt;br /&gt;
&lt;br /&gt;
These config files will be found in &amp;quot;[Game Install Directory]\Configs\&amp;quot; (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
See also: [[Differences in Home vs Lab Configuration]]&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;Release&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
** Select Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Installer\Installer.iss with InnoSetup&lt;br /&gt;
** Select Build-&amp;gt;Compile&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\AstropolisSetupLite.exe&lt;br /&gt;
*** When the compilation is finished, it will ask if you want to test the installer. It is recommended to test it, but not required.&lt;br /&gt;
* Repeat the last step with InstallerFull.iss if desired, this will generate AstropolisSetup.exe, which contains the full offline installers for the dependencies.&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* To transfer the file, use an SSH client such as WinSCP (for a graphical interface) or PuTTY&amp;#039;s PSCP (from the command line)&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Log in to AutismCollaborative.org (port 22)&lt;br /&gt;
* Upload AstropolisSetup.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the web site until the new installer finishes uploading&lt;br /&gt;
* Once the upload is complete, ssh into a shell and enter the command &amp;quot;mv /home/{$user}/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SSH client)&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make certain that your user ID has write and search permission for the autismcollaborative.org/downloads directory.&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (such as when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt.  The user is encouraged to email that file to us so that we can locate the problem.  Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a mini-game. This ability may prove invaluable in debugging based on end-user error reports.  All that you (the programmer) must do is override the string MiniGame.DebugInfo() function.  When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Maritime Defender&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for the space bar to be pressed before disappearing&lt;br /&gt;
**During the navigation-phase tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Navigation phase looks correct: Dots are the correct size and dot correlation fits PEST data. Look for any slowdown or loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly on taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Simulator&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure that you cannot click through things&lt;br /&gt;
**Select each type of building and make sure the pop-up information is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, the player&amp;#039;s money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure that the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that mini-games can be accessed&lt;br /&gt;
**Attempt to play each mini-game through the colony simulator, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through the tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure that event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off the display.&lt;br /&gt;
**Input events still work when the player is prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to the main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e. tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in the game; player remains able to exit through the game menu if ESC is pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through the main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled, and returns to the main menu&lt;br /&gt;
**Make certain that all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=564</id>
		<title>End-user Setup</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=564"/>
				<updated>2009-01-28T19:45:36Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: /* Location */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each Minigame has a variety of settings that can be configured individually.&lt;br /&gt;
&lt;br /&gt;
==Config==&lt;br /&gt;
&lt;br /&gt;
The Config.script file holds general settings. It can be opened with any general text editor, such as Notepad or Vim. Each line ending with a semicolon (;) indicates a command for the game to follow. Lines beginning with two forward slashes (//) are considered comments, and will not be processed. A block comment is a section beginning with (/*) and ending at (*/).&lt;br /&gt;
&lt;br /&gt;
===Location===&lt;br /&gt;
&lt;br /&gt;
[Installation Directory]\Configs\Config.script (Default: &amp;quot;C:\Program Files\Autism Collaborative\Configs\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The Global Config.script can be found in the Configs folder under the Autism Collaborative folder -- typically C:\Program Files\Autism Collaborative\Configs\Config.script.  This holds global settings that will be applied automatically when the game starts.  Individual minigames may have individual configurations specific to those minigames.  This individual config file is also called Config.script, and can be found in the Configs folder under the minigame&amp;#039;s folder -- typically C:\Program Files\Autism Collaborative\Minigames\[MiniGameName]\Configs\Config.script.&lt;br /&gt;
&lt;br /&gt;
===Global===&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetResolution([horizontal],[vertical]);&lt;br /&gt;
* Set the screen resolution this game will be played at, for example, Util.Settings.SetResolution(1024,768);&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.FullScreen = [true/false];&lt;br /&gt;
* Set whether the game window will be fullscreen, for example, Util.Settings.FullScreen = true;&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPortEnabled = [true/false];&lt;br /&gt;
* Set whether codes should be written out the Parallel Port, for example, Util.Settings.ParallelEnabled = true; If not specified, this will default to False.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPort = ParallelPort.Port1;&lt;br /&gt;
* Set which Parallel Port codes should be written to, if enabled. Valid values are Port1, Port2, and Port3. Defaults to Port1.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetScreenDimensions([Width], [Height], [Distance]);&lt;br /&gt;
* Width is the width of the display, in centimeters. Height is as height of the display, in centimeters. Distance is the distance between the display and the viewer&amp;#039;s eyes, in centimeters. For the dot coherence phase of Maritime Defender, the dots are based on the size of the visual display as it appears to the player. For example, Util.Settings.SetScreenDimensions(8.5, 6.25, 24.0);&lt;br /&gt;
&lt;br /&gt;
===Maritime Defender===&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareDegree = [Number];&lt;br /&gt;
* For the dot coherence phase, the dots are based on the size of the visual display as it appears to the player. This sets the density of the dots as they appear on the screen. Either measure, radians or degrees, may be used. For example, MaritimeDefender.Settings.DotsPerSquareRadian = 10000.0;&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerDegree = [Number];&lt;br /&gt;
* Specify the dot density as the number of dots within a circular patch of screen space with a diameter of one radian or degree of visual angle as it appears to the user.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.NumberDots = [Number];&lt;br /&gt;
* Override the above settings, specifying exactly the number of dots that should be drawn on the screen. This setting is optional.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotDiameter = System.Math.PI / 1028;&lt;br /&gt;
* Affects the average size of the coherence dots in terms of radians.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotSpeed = System.Math.PI / 16;&lt;br /&gt;
* Affects how fast the coherence dots appear to move across the screen in terms of radians per second.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotLifeSpan = 4 / 60.0;&lt;br /&gt;
* How long each dot exists on the screen. 4 / 60.0 reflects 4 frames on a 60 hertz display.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelay = 1;&lt;br /&gt;
* Additional Delay in seconds between each dot test, for the EEG readings. This is in addition to a random jitter of, by default, between 0 and 150ms; this jitter is controlled by the DotRefreshDelayJitter.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelayJitter = 0.15;&lt;br /&gt;
* A random amount of jitter between 0 and [value] seconds will added to the DotRefreshDelay so that the time between two successive coherence trials is not constant. The default is 0.15 of a second, or 150 milliseconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotResponseWait = 0.5;&lt;br /&gt;
* The duration of time in seconds immediately after a trial with no response in which late responses can be excepted.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotTrialLength = 2;&lt;br /&gt;
* The average duration of a dot test trial in seconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.SetPhaseQueue(2, &amp;quot;IdentityTest, 1, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 1, Boss, 0&amp;quot;);&lt;br /&gt;
* The game phases for Maritime Defender. A list of pairs, a name and a value. Currently, the Game must start with an IdentityTest phase. The Shooter value is how many wormholes must be opened and ships identified in order to move on to the next Phase. The DotTest value is how many dot trials will take place during that phase, where a trial may be a motion of dots, or an absence of motion.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.HaveNonCoherentTrials = false;&lt;br /&gt;
* Whether NonCoherentTrials should be included. If false, there will be coherent motion to the left or right for every trial.&lt;br /&gt;
&lt;br /&gt;
===Stellar Prospector===&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMax = 1500f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a stimulus must appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMin = 500f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a stimulus can appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a distractor must appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a distractor can appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds that a distractor can live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds that a distactor must live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusLifeMax = 6000f;&lt;br /&gt;
* The maximum time in milliseconds that a stimulus can be displayed.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMin = 1;&lt;br /&gt;
* The minimum number of stimuli that must appear before the cued sector can change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMax = 1;&lt;br /&gt;
* The maximum number of stimuli that can appear before the cued sector must change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.MaxProgress = 100;&lt;br /&gt;
* The amount of progress needed to completely finish the game. This is in arbitrary units.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.PeripheralProgress = 5;&lt;br /&gt;
* The maximum amount of progress the player can receive from correctly responding to peripheral stimuli. In the same arbitrary units as max progress.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.ProgressLostPerMiss = 1;&lt;br /&gt;
* The amount of progress lost anytime an incorrect response is given&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CentralStimulusProgressDrain = 1;&lt;br /&gt;
* Amount of progress drained every 2 seconds during a central stimulus&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.AutoCalculateFlickering = true;&lt;br /&gt;
* Whether the frames on/off and intensities of the flickering effect are automatically calculated by the frequency or are just taken from the manually set values.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterHertz = 6.67;&lt;br /&gt;
* The rate at which the center sector flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOnFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOffFrames = 5;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterIntensity = 1.25;&lt;br /&gt;
* The percentage of intensity of the center sector when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Hertz = 8.57;&lt;br /&gt;
* The rate at which sector one flickers per second&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OffFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Intensity = 1.33;&lt;br /&gt;
* The percentage of intensity of sector one when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Hertz = 10;&lt;br /&gt;
* The rate at which sector two flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector two when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3Hertz = 12;&lt;br /&gt;
* The rate at which sector three flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered off&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.Sector3Intensity = 1.5;&lt;br /&gt;
* The percentage of intensity of sector three when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Hertz = 15;&lt;br /&gt;
* The rate at which sector four flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OffFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector four when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
==Keyboard Configuration==&lt;br /&gt;
&lt;br /&gt;
Keyboard bindings are stored in a separate file, also specific to each minigame. For example, the keyboard bindings for the ColonySim could be found at [Installation Directory]\testkeybindings.txt (Default: &amp;quot;C:\Program Files\Autism Collaborative\testkeybindings.txt&amp;quot;). It is stored as a list of in-game events, each followed by the action that triggers it.&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Logging==&lt;br /&gt;
&lt;br /&gt;
The current default path for the log file is in the Application Data folder. The exact location will vary depending on the operating system installed.&lt;br /&gt;
&lt;br /&gt;
Vista: C:\Users\[WindowsLoginName]\Documents\Roaming\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
XP: C:\Documents and Settings\[WindowsLoginName]\My Documents\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
The documentation for the building placement log for the Colony Simulation can be found here -&amp;gt; [[Building_Placement_Log_Specification]].&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=545</id>
		<title>System Specifications and Testing</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=System_Specifications_and_Testing&amp;diff=545"/>
				<updated>2009-01-09T06:53:32Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Requirements ==&lt;br /&gt;
=== Windows XP or Vista ===&lt;br /&gt;
&lt;br /&gt;
    Hardware:&lt;br /&gt;
          o A graphics card that supports DirectX 9.0c and Shader Model 1.1 or newer. &lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o DirectX End-User Runtime or newer.&lt;br /&gt;
          o Microsoft .NET Framework Version 2.0 or newer.&lt;br /&gt;
          o Microsoft XNA Framework Redistributable 2.0 &lt;br /&gt;
&lt;br /&gt;
=== Development ===&lt;br /&gt;
&lt;br /&gt;
    Software:&lt;br /&gt;
          o Microsoft XNA Game Studio 2.0&lt;br /&gt;
          o Tortoise SVN or other Subversion Client&lt;br /&gt;
&lt;br /&gt;
== Tested Hardware ==&lt;br /&gt;
&lt;br /&gt;
    The game has been tested on the following systems without error, slowdown, and/or artefacts:&lt;br /&gt;
&lt;br /&gt;
    Development System, Dell Inspiron 1720&lt;br /&gt;
          o Operating System: Windows XP SP2&lt;br /&gt;
          o Processor:        Intel Core 2 Duo @ 2.00GHz, 2.00GHz&lt;br /&gt;
          o Graphics Card:    NVIDIA GeForce 8600M GT&lt;br /&gt;
          o RAM:              2.00 GB&lt;br /&gt;
&lt;br /&gt;
    Development System, Dell Inspiron 1720&lt;br /&gt;
          o Operating System: Windows Vista Ultimate&lt;br /&gt;
          o Processor:        Intel Core 2 Duo @ 2.00GHz, 2.00GHz&lt;br /&gt;
          o Graphics Card:    NVIDIA GeForce 8600M GT&lt;br /&gt;
          o RAM:              2.00 GB&lt;br /&gt;
&lt;br /&gt;
    The game has been tested on the following systems with error, slowdown, and/or artefacts:&lt;br /&gt;
&lt;br /&gt;
    Development System, Dell Inspiron e1505&lt;br /&gt;
          o Operating System: Windows XP SP2&lt;br /&gt;
          o Processor:        Intel Core 2 Duo @ 1.83GHz, 1.83GHz&lt;br /&gt;
          o Graphics Card:    ATI Mobility Radeon X1400&lt;br /&gt;
          o RAM:              2.00 GB&lt;br /&gt;
&lt;br /&gt;
    MacBook Air 1,1&lt;br /&gt;
          o Operating System: Windows XP SP2&lt;br /&gt;
          o Processor:        Intel Core 2 Duo @ 1.6 GHz, 1.6GHz&lt;br /&gt;
          o Graphics Card:    Intel GMA X3100, Integrated Graphics&lt;br /&gt;
          o RAM:              2.00 GB&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Art_Assets_and_Tracking&amp;diff=544</id>
		<title>Art Assets and Tracking</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Art_Assets_and_Tracking&amp;diff=544"/>
				<updated>2009-01-09T06:52:34Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Look and Feel ==&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;re going for a Sci-Fi look where the feel is somewhere between World of Warcraft and Starcraft, a bright, upbeat mood.&lt;br /&gt;
For the u pallet something like Age of Empires III, bright base colours with tasteful splashes of colour that highlight buildings and units.&lt;br /&gt;
Our buildings should represent free-floating entities in space that are connected via a transportation system.  This is similar to how Bio Shock represents Rapture, underwater buildings connected via tubes, but ours will be in space and not in the 1920&amp;#039;s.&lt;br /&gt;
&lt;br /&gt;
[http://empireearth.free.fr/aoe-iii/age-of-empires-iii.jpg Example Age of Empires III with Tasteful Color Splashes]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
== Requirements==&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
Models should follow the look and feel specifications.  Models should be able to be placed or combined as in a tile based system.&lt;br /&gt;
&lt;br /&gt;
===Complexity===&lt;br /&gt;
Models should be complex, but still keep a low polygon count.  Model complexity and polygon limits will be further defined as we do more extensive testing of our 3D Engine.  &lt;br /&gt;
&lt;br /&gt;
===Textures===&lt;br /&gt;
All textures should be included in the model file.  If they can&amp;#039;t be extracted from the SketchUp file then they will also need to be included as *.png files.  Textures&amp;#039; dimensions should be powers of two (2x2,4x4,16x16,32x32,64x64, etc.) and should be kept as small as reasonably possible.&lt;br /&gt;
&lt;br /&gt;
===Submission===&lt;br /&gt;
Models will be uploaded to the Google 3D Warehouse.  Depending on our needs we may also need to have the models uploaded to a folder on our SVN repository.&lt;br /&gt;
&lt;br /&gt;
== Colony Simulation ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;6&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Asset Name&lt;br /&gt;
! Description&lt;br /&gt;
! Scale (World Units)&lt;br /&gt;
! Artist Assigned&lt;br /&gt;
! Status&lt;br /&gt;
! Priority&lt;br /&gt;
|-&lt;br /&gt;
| Command Centre&lt;br /&gt;
| This is the building that will begin the construction of the colony. It is the first thing that the player is required to place.&lt;br /&gt;
| 3 x 3&lt;br /&gt;
| Brendan - Complete&lt;br /&gt;
| &lt;br /&gt;
| High&lt;br /&gt;
|-&lt;br /&gt;
| Low Quality Residential Building&lt;br /&gt;
| This is the low quality living quarters of the colony. As opposed to the high quality residential building, the focus on its design is to efficiently fit as many of the populace inside as possible. It could be equated to the &amp;quot;projects&amp;quot; of the space colony. There are tier 1 and tier 2 version.&lt;br /&gt;
| 2 x 2&lt;br /&gt;
| Brendan - Complete&lt;br /&gt;
| Tier 1 Complete&lt;br /&gt;
| High&lt;br /&gt;
|-&lt;br /&gt;
| High Quality Residential Building&lt;br /&gt;
| This is the high quality living quarters of the colony. Its focus is the comfort the people who live in it. Less people live here, but they are happier and live in luxury. There are tier 1 and tier 2 versions.&lt;br /&gt;
| 2 x 2&lt;br /&gt;
| Brendan - Complete&lt;br /&gt;
| Tier 1 Complete&lt;br /&gt;
| High&lt;br /&gt;
|-&lt;br /&gt;
| Mining Building&lt;br /&gt;
| This building is placed on top of a resource square in order to harvest it. This is not tiered, meaning there is only one version.&lt;br /&gt;
| 1 x 1&lt;br /&gt;
| Jordan - Complete&lt;br /&gt;
| &lt;br /&gt;
| High&lt;br /&gt;
|-&lt;br /&gt;
| Resource Models&lt;br /&gt;
| These are going to be used to represent the three different resources available to harvest on the map. What they are exactly, and how they look has been undecided. Things such as small gas nebulae, small chunks of rock, or small chunks of ice would all work. The only thing necessary is that there are three different kinds.&lt;br /&gt;
| 1 x 1&lt;br /&gt;
| Brendan / bMurph (Particles)&lt;br /&gt;
| All Three Complete&lt;br /&gt;
| Low&lt;br /&gt;
|-&lt;br /&gt;
| Commercial Buildings&lt;br /&gt;
| These are buildings to which the populace will travel in order to buy goods and services. This category includes things such as shops, malls, and places for the populace to buy food, such as farms. These will take in resources to create their goods. If that could be worked into the designs, that would be good, but it does not need to be. There exist three of these buildings in tier 1 and three of these buildings in tier 2.&lt;br /&gt;
| 2 x 2&lt;br /&gt;
| Project Spectrum&lt;br /&gt;
| Preparing Concept Art&lt;br /&gt;
| High&lt;br /&gt;
|-&lt;br /&gt;
| Factory Buildings&lt;br /&gt;
| These buildings refine the resources into higher tier levels. For example a tier 0 (raw) resource would be refined into a tier 1 (basic) resource. Ideas for this were refinery and industrial type buildings. There is one of these resources at tier 1 and one of these at tier 2.&lt;br /&gt;
| 2 x 2&lt;br /&gt;
| Brendan (Refinery) - Complete&lt;br /&gt;
| One remaining tier needed?&lt;br /&gt;
| High&lt;br /&gt;
|-&lt;br /&gt;
| Entertainment Building&lt;br /&gt;
| The purpose of this building is to increase the happiness of the populace. These buildings include things like arcades and amusement parks. There are two of these in tier 1 and two of these in tier 2, though a texture swap in between tiers would be fine.&lt;br /&gt;
| 2 x 2&lt;br /&gt;
| Jordan&lt;br /&gt;
| del 12/16&lt;br /&gt;
| High&lt;br /&gt;
|-&lt;br /&gt;
| Resource Transport Rings&lt;br /&gt;
| A series of rings through which the transport ships will pass. These ships will move resources throughout the colony. Models will be needed for straight sections, elbow joints, T joints, and four-way intersections.&lt;br /&gt;
| 1 x 1&lt;br /&gt;
| Brendan - Complete&lt;br /&gt;
| &lt;br /&gt;
| High&lt;br /&gt;
|-&lt;br /&gt;
| Resource Transport Ship&lt;br /&gt;
| The ship that carries resources from one building to another through the tubes. Different models for each resource would be nice, though a simple colour swap would be just as effective.&lt;br /&gt;
| 1 x 1&lt;br /&gt;
| Jordan - Complete&lt;br /&gt;
| &lt;br /&gt;
| Medium&lt;br /&gt;
|-&lt;br /&gt;
| Space &amp;quot;Roads&amp;quot;&lt;br /&gt;
| This is the transport system for the populace. This moves people around the colony. The term road is used loosely since a system of transparent tubes would work just as well. Models needed would be straight sections, elbow joints, T joints, and four-way intersections. Even something as simple as a new texture on the Resource Transport Rings would work.&lt;br /&gt;
| 1 x 1&lt;br /&gt;
| Brendan - Complete&lt;br /&gt;
| &lt;br /&gt;
| Medium&lt;br /&gt;
|-&lt;br /&gt;
| Space &amp;quot;Road&amp;quot; Transport Unit&lt;br /&gt;
| This is what carries the populace throughout the transport tubes. This could be things like a ship, &amp;quot;space cars&amp;quot;, or even people moving with jetpacks. This is purely a visual thing for the player so any of these would work. If need be, a texture swap could be done on the Resource Ships to make this model.&lt;br /&gt;
| 1 x 1&lt;br /&gt;
| Jordan - Complete&lt;br /&gt;
| &lt;br /&gt;
| Medium&lt;br /&gt;
|-&lt;br /&gt;
| Reward Buildings&lt;br /&gt;
| These buildings are rewards given to players to give them a sense of achievement and advancement. They are purely visual rewards, and at the moment, none of them have been decided. They can be anything that is interesting and fun, though they should be unique so that the player feels that they are something special when they are unlocked.&lt;br /&gt;
| Variable (1 x 1, 2 x 2, 3 x 3, etc)&lt;br /&gt;
| &lt;br /&gt;
| Concept Art Needed&lt;br /&gt;
| Low&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Note: On internal areas that are meant to be seen, such as transparent domes, be sure to create back faces for the internal sections; otherwise culling will prevent them from being seen.&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
=== Sounds ===&lt;br /&gt;
&lt;br /&gt;
== Maritime Defender ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
=== Sounds ===&lt;br /&gt;
&lt;br /&gt;
== Starjack ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
=== Sounds ===&lt;br /&gt;
&lt;br /&gt;
== Stellar Prospector ==&lt;br /&gt;
&lt;br /&gt;
=== Models ===&lt;br /&gt;
&lt;br /&gt;
=== Textures ===&lt;br /&gt;
&lt;br /&gt;
=== Sounds ===&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Concept_Art&amp;diff=543</id>
		<title>Concept Art</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Concept_Art&amp;diff=543"/>
				<updated>2009-01-09T06:43:27Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: updated links to most recent game documents (Starjack not Hacker Havoc, and Stellar Prospector not Spaceship Shenanigans)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Starjack==&lt;br /&gt;
&lt;br /&gt;
In [[Star Jack]], a secret agent has been sent to infiltrate the spy satellites of the space pirates who have been harassing our cargo lines and stealing our resources.  The goal is to sneak to the various comm stations that contain the pirates communication logs, hack them, and find the location of the stolen cargo.&lt;br /&gt;
&lt;br /&gt;
===Main Character===&lt;br /&gt;
The player will control a top secret agent infiltrating pirate spy satellites.  The agent has at his disposal a collection of cool equipment: cloaking fields, hacking tools and various less then lethal traps that will let him sneak undetected.  The current idea is to have our agent decked out splinter cell style all in black.  The cloaking device will be integrated into the suit, and his traps resemble those from Golden Eye.&lt;br /&gt;
&lt;br /&gt;
What we need art-wise is pictures of the agent and his gear: shots of the agent in action sneaking about, full body shots that detail where the tools are stored and what other technologies are integrated into the suit, sketches of traps and what they do.&lt;br /&gt;
&lt;br /&gt;
===Locations===&lt;br /&gt;
To find the whereabouts of the cargo ships the player will have to infiltrate spy satellites.  These satellites are controlled by differing factions of space pirates.  We are planning three different factions: Humans, Aliens and Robots.&lt;br /&gt;
&lt;br /&gt;
We need art representing the various satellites.  This would include both the interior and exterior of the station.&lt;br /&gt;
&lt;br /&gt;
===Enemies===&lt;br /&gt;
To make a stealth game fun one needs things to avoid and to hide from.  We need some concept art for different guards, sentry equipment and obstacles that the player must avoid to reach each comm station.  These should relate to one of the pirate factions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stealth Fighter===&lt;br /&gt;
To get to the satellites undetected the player will use the Bobcat B-3 Interceptor.  This is a small, one-person long-range fighter.  It is equipped with the best cloaking, stealth technologies, and hyperspace technologies.  We need some schematic sketches and payload details for this ship.&lt;br /&gt;
&lt;br /&gt;
===Pirate Ships===&lt;br /&gt;
The evil pirates have stolen our cargo!  We need ship information and ideas for the various factions.  This would include weapon details, propulsion systems, and hulls that fit within the different factions.&lt;br /&gt;
&lt;br /&gt;
===Contact Info===&lt;br /&gt;
If anyone wants or needs anything clarified or wants some more info on Starjack please let me know.  You can contact me, Karl Orosz, at kao7002 at rit dot edu.&lt;br /&gt;
&lt;br /&gt;
===Submission Information===&lt;br /&gt;
Google Sketchup Pro or jped/png file formats.&lt;br /&gt;
&lt;br /&gt;
==Stellar Prospector==&lt;br /&gt;
&lt;br /&gt;
In [[Stellar Prospector]], the player controls the colony&amp;#039;s resource gatherer.  The goal is to collect as many resources as possible and to discharge bad resources.&lt;br /&gt;
&lt;br /&gt;
===1 - Resource===&lt;br /&gt;
&lt;br /&gt;
Some type of asteroid chunk with minerals and/or metals sticking out of it. It should contrast against black.&lt;br /&gt;
&lt;br /&gt;
Pixels: 64x64&lt;br /&gt;
&lt;br /&gt;
===2 - Space Debris===&lt;br /&gt;
&lt;br /&gt;
Pieces of rusty scrap metal, similar in size to the resource. The look of this should contrast the resource. Three to four variations on this.&lt;br /&gt;
&lt;br /&gt;
Pixels: 64x64&lt;br /&gt;
&lt;br /&gt;
===3 - Decayed Resource===&lt;br /&gt;
&lt;br /&gt;
Similar to the resource, but with a decayed/brittle look.&lt;br /&gt;
&lt;br /&gt;
Pixels: 64x64&lt;br /&gt;
&lt;br /&gt;
===4 - Overhead Interior===&lt;br /&gt;
&lt;br /&gt;
This is inside the spaceship. It can look similar to a cockpit. Low contrast with grayish and simple/bland colors.&lt;br /&gt;
&lt;br /&gt;
Pixels: 800x400&lt;br /&gt;
&lt;br /&gt;
===5 - Control Panel===&lt;br /&gt;
&lt;br /&gt;
This is inside the spaceship. Looks similar to the overhead interior, but with more colors - more eye-catching. In order to display the decayed ore, a TV monitor/terminal should be embedded in it.&lt;br /&gt;
&lt;br /&gt;
Pixels: 176x88&lt;br /&gt;
&lt;br /&gt;
===6 - Resource Detection System===&lt;br /&gt;
&lt;br /&gt;
This is inside the spaceship - the area surrounding the control panel. It is divided into four sections across 180 degrees. The middle of each section should be empty (0 alpha). It should match with the control panel, and can actually be combined with the control panel image. (Think of these as window frames)&lt;br /&gt;
&lt;br /&gt;
Pixels: 226x110&lt;br /&gt;
&lt;br /&gt;
===7 - Window Frames===&lt;br /&gt;
&lt;br /&gt;
The windows simply need frames, similar to the resource detection system but thinner.&lt;br /&gt;
&lt;br /&gt;
Pixels: 800x400&lt;br /&gt;
&lt;br /&gt;
[[Image:SS_ConceptArtReference.jpg]]&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Concept_Art&amp;diff=542</id>
		<title>Concept Art</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Concept_Art&amp;diff=542"/>
				<updated>2009-01-09T06:39:35Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Hacker Havoc==&lt;br /&gt;
&lt;br /&gt;
In [[Hacker Havoc]] / Starjack, a secret agent has been sent to infiltrate the spy satellites of the space pirates who have been harassing our cargo lines and stealing our resources.  The goal is to sneak to the various comm stations that contain the pirates communication logs, hack them, and find the location of the stolen cargo.&lt;br /&gt;
&lt;br /&gt;
===Main Character===&lt;br /&gt;
The player will control a top secret agent infiltrating pirate spy satellites.  The agent has at his disposal a collection of cool equipment: cloaking fields, hacking tools and various less then lethal traps that will let him sneak undetected.  The current idea is to have our agent decked out splinter cell style all in black.  The cloaking device will be integrated into the suit, and his traps resemble those from Golden Eye.&lt;br /&gt;
&lt;br /&gt;
What we need art-wise is pictures of the agent and his gear: shots of the agent in action sneaking about, full body shots that detail where the tools are stored and what other technologies are integrated into the suit, sketches of traps and what they do.&lt;br /&gt;
&lt;br /&gt;
===Locations===&lt;br /&gt;
To find the whereabouts of the cargo ships the player will have to infiltrate spy satellites.  These satellites are controlled by differing factions of space pirates.  We are planning three different factions: Humans, Aliens and Robots.&lt;br /&gt;
&lt;br /&gt;
We need art representing the various satellites.  This would include both the interior and exterior of the station.&lt;br /&gt;
&lt;br /&gt;
===Enemies===&lt;br /&gt;
To make a stealth game fun one needs things to avoid and to hide from.  We need some concept art for different guards, sentry equipment and obstacles that the player must avoid to reach each comm station.  These should relate to one of the pirate factions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stealth Fighter===&lt;br /&gt;
To get to the satellites undetected the player will use the Bobcat B-3 Interceptor.  This is a small, one-person long-range fighter.  It is equipped with the best cloaking, stealth technologies, and hyperspace technologies.  We need some schematic sketches and payload details for this ship.&lt;br /&gt;
&lt;br /&gt;
===Pirate Ships===&lt;br /&gt;
The evil pirates have stolen our cargo!  We need ship information and ideas for the various factions.  This would include weapon details, propulsion systems, and hulls that fit within the different factions.&lt;br /&gt;
&lt;br /&gt;
===Contact Info===&lt;br /&gt;
If anyone wants or needs anything clarified or wants some more info on Starjack please let me know.  You can contact me, Karl Orosz, at kao7002 at rit dot edu.&lt;br /&gt;
&lt;br /&gt;
===Submission Information===&lt;br /&gt;
Google Sketchup Pro or jped/png file formats.&lt;br /&gt;
&lt;br /&gt;
==Spaceship Shenanigans==&lt;br /&gt;
&lt;br /&gt;
In [[Spaceship Shenanigans]], the player controls the colony&amp;#039;s resource gatherer.  The goal is to collect as many resources as possible and to discharge bad resources.&lt;br /&gt;
&lt;br /&gt;
===1 - Resource===&lt;br /&gt;
&lt;br /&gt;
Some type of asteroid chunk with minerals and/or metals sticking out of it. It should contrast against black.&lt;br /&gt;
&lt;br /&gt;
Pixels: 64x64&lt;br /&gt;
&lt;br /&gt;
===2 - Space Debris===&lt;br /&gt;
&lt;br /&gt;
Pieces of rusty scrap metal, similar in size to the resource. The look of this should contrast the resource. Three to four variations on this.&lt;br /&gt;
&lt;br /&gt;
Pixels: 64x64&lt;br /&gt;
&lt;br /&gt;
===3 - Decayed Resource===&lt;br /&gt;
&lt;br /&gt;
Similar to the resource, but with a decayed/brittle look.&lt;br /&gt;
&lt;br /&gt;
Pixels: 64x64&lt;br /&gt;
&lt;br /&gt;
===4 - Overhead Interior===&lt;br /&gt;
&lt;br /&gt;
This is inside the spaceship. It can look similar to a cockpit. Low contrast with grayish and simple/bland colors.&lt;br /&gt;
&lt;br /&gt;
Pixels: 800x400&lt;br /&gt;
&lt;br /&gt;
===5 - Control Panel===&lt;br /&gt;
&lt;br /&gt;
This is inside the spaceship. Looks similar to the overhead interior, but with more colors - more eye-catching. In order to display the decayed ore, a TV monitor/terminal should be embedded in it.&lt;br /&gt;
&lt;br /&gt;
Pixels: 176x88&lt;br /&gt;
&lt;br /&gt;
===6 - Resource Detection System===&lt;br /&gt;
&lt;br /&gt;
This is inside the spaceship - the area surrounding the control panel. It is divided into four sections across 180 degrees. The middle of each section should be empty (0 alpha). It should match with the control panel, and can actually be combined with the control panel image. (Think of these as window frames)&lt;br /&gt;
&lt;br /&gt;
Pixels: 226x110&lt;br /&gt;
&lt;br /&gt;
===7 - Window Frames===&lt;br /&gt;
&lt;br /&gt;
The windows simply need frames, similar to the resource detection system but thinner.&lt;br /&gt;
&lt;br /&gt;
Pixels: 800x400&lt;br /&gt;
&lt;br /&gt;
[[Image:SS_ConceptArtReference.jpg]]&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=541</id>
		<title>End-user Setup</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=End-user_Setup&amp;diff=541"/>
				<updated>2009-01-09T06:32:19Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Each Minigame has a variety of settings that can be configured individually.&lt;br /&gt;
&lt;br /&gt;
==Config==&lt;br /&gt;
&lt;br /&gt;
The Config.script file holds general settings. It can be opened with any general text editor, such as Notepad or Vim. Each line ending with a semicolon (;) indicates a command for the game to follow. Lines beginning with two forward slashes (//) are considered comments, and will not be processed. A block comment is a section beginning with (/*) and ending at (*/).&lt;br /&gt;
&lt;br /&gt;
===Location===&lt;br /&gt;
&lt;br /&gt;
[Installation Directory]\Configs\Config.script&lt;br /&gt;
&lt;br /&gt;
The Global Config.script can be found in the Configs folder under the Autism Collaborative folder -- typically C:\Program Files\Autism Collaborative\Configs\Config.script.  This holds global settings that will be applied automatically when the game starts.  Individual minigames may have individual configurations specific to those minigames.  This individual config file is also call Config.script, and can be found in the Configs folder under the minigame&amp;#039;s folder -- typically C:\Program Files\Autism Collaborative\Minigames\[MiniGameName]\Configs\Config.script.&lt;br /&gt;
&lt;br /&gt;
===Global===&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetResolution([horizontal],[vertical]);&lt;br /&gt;
* Set the screen resolution this game will be played at, for example, Util.Settings.SetResolution(1024,768);&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.FullScreen = [true/false];&lt;br /&gt;
* Set whether the game window will be fullscreen, for example, Util.Settings.FullScreen = true;&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPortEnabled = [true/false];&lt;br /&gt;
* Set whether codes should be written out the Parallel Port, for example, Util.Settings.ParallelEnabled = true; If not specified, this will default to False.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.ParallelPort = ParallelPort.Port1;&lt;br /&gt;
* Set which Parallel Port codes should be written to, if enabled. Valid values are Port1, Port2, and Port3. Defaults to Port1.&lt;br /&gt;
&lt;br /&gt;
 Util.Settings.SetScreenDimensions([Width], [Height], [Distance]);&lt;br /&gt;
* Width is the width of the display, in centimeters. Height is as height of the display, in centimeters. Distance is the distance between the display and the viewer&amp;#039;s eyes, in centimeters. For the dot coherence phase of Maritime Defender, the dots are based on the size of the visual display as it appears to the player. For example, Util.Settings.SetScreenDimensions(8.5, 6.25, 24.0);&lt;br /&gt;
&lt;br /&gt;
===Maritime Defender===&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerSquareDegree = [Number];&lt;br /&gt;
* For the dot coherence phase, the dots are based on the size of the visual display as it appears to the player. This sets the density of the dots as they appear on the screen. Either measure, radians or degrees, may be used. For example, MaritimeDefender.Settings.DotsPerSquareRadian = 10000.0;&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerRadian = [Number];&lt;br /&gt;
 MaritimeDefender.Settings.DotsPerDegree = [Number];&lt;br /&gt;
* Specify the dot density as the number of dots within a circular patch of screen space with a diameter of one radian or degree of visual angle as it appears to the user.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.NumberDots = [Number];&lt;br /&gt;
* Override the above settings, specifying exactly the number of dots that should be drawn on the screen. This setting is optional.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotDiameter = System.Math.PI / 1028;&lt;br /&gt;
* Affects the average size of the coherence dots in terms of radians.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotSpeed = System.Math.PI / 16;&lt;br /&gt;
* Affects how fast the coherence dots appear to move across the screen in terms of radians per second.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotLifeSpan = 4 / 60.0;&lt;br /&gt;
* How long each dot exists on the screen. 4 / 60.0 reflects 4 frames on a 60 hertz display.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelay = 1;&lt;br /&gt;
* Additional Delay in seconds between each dot test, for the EEG readings. This is in addition to a random jitter of, by default, between 0 and 150ms; this jitter is controlled by the DotRefreshDelayJitter.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotRefreshDelayJitter = 0.15;&lt;br /&gt;
* A random amount of jitter between 0 and [value] seconds will added to the DotRefreshDelay so that the time between two successive coherence trials is not constant. The default is 0.15 of a second, or 150 milliseconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotResponseWait = 0.5;&lt;br /&gt;
* The duration of time in seconds immediately after a trial with no response in which late responses can be excepted.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.DotTrialLength = 2;&lt;br /&gt;
* The average duration of a dot test trial in seconds.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.SetPhaseQueue(2, &amp;quot;IdentityTest, 1, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 3, DotTest, 140, Shooter, 1, Boss, 0&amp;quot;);&lt;br /&gt;
* The game phases for Maritime Defender. A list of pairs, a name and a value. Currently, the Game must start with an IdentityTest phase. The Shooter value is how many wormholes must be opened and ships identified in order to move on to the next Phase. The DotTest value is how many dot trials will take place during that phase, where a trial may be a motion of dots, or an absence of motion.&lt;br /&gt;
&lt;br /&gt;
 MaritimeDefender.Settings.HaveNonCoherentTrials = false;&lt;br /&gt;
* Whether NonCoherentTrials should be included. If false, there will be coherent motion to the left or right for every trial.&lt;br /&gt;
&lt;br /&gt;
===Stellar Prospector===&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMax = 1500f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a stimulus must appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusWaitMin = 500f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a stimulus can appear after the offset of the previous stimulus.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds before a distractor must appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorWaitMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds before a distractor can appear after the offset of the previous distractor.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMax = 10000f;&lt;br /&gt;
* The maximum amount of time in milliseconds that a distractor can live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.DistractorLifeMin = 2000f;&lt;br /&gt;
* The minimum amount of time in milliseconds that a distactor must live for after it has been created.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimulusLifeMax = 6000f;&lt;br /&gt;
* The maximum time in milliseconds that a stimulus can be displayed.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMin = 1;&lt;br /&gt;
* The minimum number of stimuli that must appear before the cued sector can change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.StimuliPerCueMax = 1;&lt;br /&gt;
* The maximum number of stimuli that can appear before the cued sector must change.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.MaxProgress = 100;&lt;br /&gt;
* The amount of progress needed to completely finish the game. This is in arbitrary units.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.PeripheralProgress = 5;&lt;br /&gt;
* The maximum amount of progress the player can receive from correctly responding to peripheral stimuli. In the same arbitrary units as max progress.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.ProgressLostPerMiss = 1;&lt;br /&gt;
* The amount of progress lost anytime an incorrect response is given&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CentralStimulusProgressDrain = 1;&lt;br /&gt;
* Amount of progress drained every 2 seconds during a central stimulus&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.AutoCalculateFlickering = true;&lt;br /&gt;
* Whether the frames on/off and intensities of the flickering effect are automatically calculated by the frequency or are just taken from the manually set values.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterHertz = 6.67;&lt;br /&gt;
* The rate at which the center sector flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOnFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterOffFrames = 5;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does the center sector remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.CenterIntensity = 1.25;&lt;br /&gt;
* The percentage of intensity of the center sector when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Hertz = 8.57;&lt;br /&gt;
* The rate at which sector one flickers per second&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1OffFrames = 4;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector one remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector1Intensity = 1.33;&lt;br /&gt;
* The percentage of intensity of sector one when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Hertz = 10;&lt;br /&gt;
* The rate at which sector two flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OnFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector two remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector2Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector two when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3Hertz = 12;&lt;br /&gt;
* The rate at which sector three flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector3OffFrames = 3;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector three remain flickered off&lt;br /&gt;
 &lt;br /&gt;
 StellarProspector.Settings.Sector3Intensity = 1.5;&lt;br /&gt;
* The percentage of intensity of sector three when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Hertz = 15;&lt;br /&gt;
* The rate at which sector four flickers per second &lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OnFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered on&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4OffFrames = 2;&lt;br /&gt;
* How many frames (out of 60 frames per second) in a row does sector four remain flickered off&lt;br /&gt;
&lt;br /&gt;
 StellarProspector.Settings.Sector4Intensity = 1.0;&lt;br /&gt;
* The percentage of intensity of sector four when it is flickered on. 1.0 denotes 100% intensity.&lt;br /&gt;
&lt;br /&gt;
==Keyboard Configuration==&lt;br /&gt;
&lt;br /&gt;
Keyboard bindings are stored in a separate file, also specific to each minigame. It is stored as a list of in-game events, each followed by the action that triggers it.&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Logging==&lt;br /&gt;
&lt;br /&gt;
The current default path for the log file is in the Application Data folder. The exact location will vary depending on the operating system installed.&lt;br /&gt;
&lt;br /&gt;
Vista: C:\Users\[WindowsLoginName]\Documents\Roaming\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
XP: C:\Documents and Settings\[WindowsLoginName]\My Documents\Autism Collaborative\&lt;br /&gt;
&lt;br /&gt;
The documentation for the building placement log for the Colony Simulation can be found here -&amp;gt; [[Building_Placement_Log_Specification]].&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=540</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=540"/>
				<updated>2009-01-09T06:09:17Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewGame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
 class NewGame : Gamescreen {...}&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
 public override void Update(GameTime gameTime){...}&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
 public override void Draw(SpriteBatch spriteBatch){...}&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing.  (We may want other cameras, too, for whatever reason.)&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from class Camera. At the time of this writing (January 2009) these types are limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now we&amp;#039;ll use a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera, be certain to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039;s initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled&lt;br /&gt;
&lt;br /&gt;
Once this has been done, you&amp;#039;ll have an effect loaded into the Particle Engine object &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; via the Particle Manager. However the Particle Engine isn&amp;#039;t worth much if it&amp;#039;s never called on to do anything, so let&amp;#039;s set up the rest of the code that&amp;#039;s needed for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To accomplish this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order is desired&lt;br /&gt;
&lt;br /&gt;
This will draw and update any particles that have been loaded by the Particle Manager and have been set active.  However, the particle engine that we just created hasn&amp;#039;t yet been set active, so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
The particle engine instance &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; is now active.  If it were already active, its lifetime would have been reset to 0.  (The lifetime of a particle engine starts at zero and increases until its maximum lifetime is reached, in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive.)&lt;br /&gt;
&lt;br /&gt;
This same method can be used to stop the particle engine from creating any more particles, by supplying &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; as its parameter instead:&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false);&lt;br /&gt;
&lt;br /&gt;
A series of methods allow us to modify the drawing of the ParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start the TACParticleEditor program.  This program presents two windows, one containing a Windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whichever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded, the current directory is switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must be added manually to the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experiment Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (My Documents\Autism Collaborative\Users\DefaultUser\LogFiles\ExperimentLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed.  (That&amp;#039;s the whole point of this game!)&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each mini-game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside this range, both positive and negative; these codes may be used in the same way, but will be logged only to the text log file and not to the parallel port.&lt;br /&gt;
** Codes in the negative range are considered debugging codes, and can be omitted from the log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.writeToParallel = true;&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
As these assigned events are local to each InputHandler object, your mini-game&amp;#039;s event code assignments will not interact with the event code assignments of other mini-games.&lt;br /&gt;
&lt;br /&gt;
Every mini-game should start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is true by default only when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\Debug.confcss&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;Debug.confcss&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
==Run the Game in the Lab==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. This can be manually edited before the build is made of the program. The program will automatically use the LabConfig.config file if it exists, otherwise it will use Default.config. To run the program in the lab, simply make sure the LabConfig.config file is present.&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
** Run Autism Collaborative\Utilities\Installer Installer\isetup-5.2.2.exe&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;ReleasePub&amp;quot; or &amp;quot;ReleaseLab&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
*** ReleasePub is for our releases to the general public. This will usually be the correct configuration.&lt;br /&gt;
*** ReleaseLab is for builds to be used in the lab. This will create the config file to run the game in &amp;quot;lab mode.&amp;quot; The resulting exe file will actually be the same as ReleasePub, but constd.tac will be replaced with conlab.tac.&lt;br /&gt;
*** Debug mode is used while developing, so do not build the game in debug mode when creating the installer.&lt;br /&gt;
*** For the exact effects of the different build configurations on the game flow, unit stats, etc. see the config files in Autism Collaborative\Game\Game\Configs&lt;br /&gt;
** Select Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Game\Installer.iss with InnoSetup&lt;br /&gt;
** Select Build-&amp;gt;Compile&lt;br /&gt;
** Select Run-&amp;gt;Run&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\tAC_Installer.exe&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* To transfer the file, use an SSH client such as WinSCP (for a graphical interface) or PuTTY&amp;#039;s PSCP (from the command line)&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Log in to AutismCollaborative.org (port 22)&lt;br /&gt;
* Upload tAC_Installer.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the web site until the new installer finishes uploading&lt;br /&gt;
* Once the upload is complete, ssh into a shell and enter the command &amp;quot;mv /home/{$user}/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SSH client)&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make certain that your user ID has write and search permission for the autismcollaborative.org/downloads directory.&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (such as when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt.  The user is encouraged to email that file to us so that we can locate the problem.  Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a mini-game. This ability may prove invaluable in debugging based on end-user error reports.  All that you (the programmer) must do is override the string MiniGame.DebugInfo() function.  When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Maritime Defender&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for the space bar to be pressed before disappearing&lt;br /&gt;
**During the navigation-phase tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Navigation phase looks correct: Dots are the correct size and dot correlation fits PEST data. Look for any slowdown or loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly on taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Simulator&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure that you cannot click through things&lt;br /&gt;
**Select each type of building and make sure the pop-up information is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, the player&amp;#039;s money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure that the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that mini-games can be accessed&lt;br /&gt;
**Attempt to play each mini-game through the colony simulator, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through the tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure that event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off the display.&lt;br /&gt;
**Input events still work when the player is prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to the main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e. tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in the game; player remains able to exit through the game menu if ESC is pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through the main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled, and returns to the main menu&lt;br /&gt;
**Make certain that all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=539</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=539"/>
				<updated>2009-01-09T06:04:28Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewGame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
 class NewGame : Gamescreen {...}&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
 public override void Update(GameTime gameTime){...}&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
 public override void Draw(SpriteBatch spriteBatch){...}&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing.  (We may want other cameras, too, for whatever reason.)&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from class Camera. At the time of this writing (January 2009) these types are limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now we&amp;#039;ll use a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera, be certain to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039;s initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled&lt;br /&gt;
&lt;br /&gt;
Once this has been done, you&amp;#039;ll have an effect loaded into the Particle Engine object &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; via the Particle Manager. However the Particle Engine isn&amp;#039;t worth much if it&amp;#039;s never called on to do anything, so let&amp;#039;s set up the rest of the code that&amp;#039;s needed for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To accomplish this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order is desired&lt;br /&gt;
&lt;br /&gt;
This will draw and update any particles that have been loaded by the Particle Manager and have been set active.  However, the particle engine that we just created hasn&amp;#039;t yet been set active, so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
The particle engine instance &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; is now active.  If it were already active, its lifetime would have been reset to 0.  (The lifetime of a particle engine starts at zero and increases until its maximum lifetime is reached, in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive.)&lt;br /&gt;
&lt;br /&gt;
This same method can be used to stop the particle engine from creating any more particles, by supplying &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; as its parameter instead:&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false);&lt;br /&gt;
&lt;br /&gt;
A series of methods allow us to modify the drawing of the ParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start the TACParticleEditor program.  This program presents two windows, one containing a Windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whichever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded, the current directory is switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must be added manually to the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experiment Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (My Documents\Autism Collaborative\Users\DefaultUser\LogFiles\ExperimentLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed.  (That&amp;#039;s the whole point of this game!)&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each mini-game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside this range, both positive and negative; these codes may be used in the same way, but will be logged only to the text log file and not to the parallel port.&lt;br /&gt;
** Codes in the negative range are considered debugging codes, and can be omitted from the log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.writeToParallel = true;&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
As these assigned events are local to each InputHandler object, your mini-game&amp;#039;s event code assignments will not interact with the event code assignments of other mini-games.&lt;br /&gt;
&lt;br /&gt;
Every mini-game should start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is true by default only when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\Debug.confcss&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;Debug.confcss&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
==Run the Game in the Lab==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. This can be manually edited before the build is made of the program. The program will automatically use the LabConfig.config file if it exists, otherwise it will use Default.config. To run the program in the lab, simply make sure the LabConfig.config file is present.&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
** Run Autism Collaborative\Utilities\Installer Installer\isetup-5.2.2.exe&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;ReleasePub&amp;quot; or &amp;quot;ReleaseLab&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
*** ReleasePub is for our releases to the general public. This will usually be the correct configuration.&lt;br /&gt;
*** ReleaseLab is for builds to be used in the lab. This will create the config file to run the game in &amp;quot;lab mode.&amp;quot; The resulting exe file will actually be the same as ReleasePub, but constd.tac will be replaced with conlab.tac.&lt;br /&gt;
*** Debug mode is used while developing, so do not build the game in debug mode when creating the installer.&lt;br /&gt;
*** For the exact effects of the different build configurations on the game flow, unit stats, etc. see the config files in Autism Collaborative\Game\Game\Configs&lt;br /&gt;
** Select Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Game\Installer.iss with InnoSetup&lt;br /&gt;
** Select Build-&amp;gt;Compile&lt;br /&gt;
** Select Run-&amp;gt;Run&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\tAC_Installer.exe&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* To transfer the file, use an SSH client such as WinSCP (for a graphical interface) or PuTTY&amp;#039;s PSCP (from the command line)&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Log in to AutismCollaborative.org (port 22)&lt;br /&gt;
* Upload tAC_Installer.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the web site until the new installer finishes uploading&lt;br /&gt;
* Once the upload is complete, ssh into a shell and enter the command &amp;quot;mv /home/{$user}/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SSH client)&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make certain that your user ID has write and search permission for the autismcollaborative.org/downloads directory.&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (such as when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt.  The user is encouraged to email that file to us so that we can locate the problem.  Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a mini-game. This ability may prove invaluable in debugging based on end-user error reports.  All that you (the programmer) must do is override the string MiniGame.DebugInfo() function.  When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Meteor Madness&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for spacebar to be pressed before disappearing&lt;br /&gt;
**On space drift tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Dot coherence phase looks correct . Dots are the correct size and dot correlation fits with PEST data. Look for any slowdown and loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly upon taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Sim&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure you can not click through things&lt;br /&gt;
**Select each type of building and make sure the pop up info is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, players money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that minigames can be accessed&lt;br /&gt;
**Attempt to play each minigame through the colony sim, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off screen.&lt;br /&gt;
**Input events still work when prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in game by still being able to exit out through game menu if ESC was pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled and when it has, returns to main menu&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=538</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=538"/>
				<updated>2009-01-09T06:02:19Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: Changed references to SFTP to the correct SSH, and other minor updates.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewGame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
 class NewGame : Gamescreen {...}&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
 public override void Update(GameTime gameTime){...}&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
 public override void Draw(SpriteBatch spriteBatch){...}&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing.  (We may want other cameras, too, for whatever reason.)&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from class Camera. At the time of this writing (January 2009) these types are limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now we&amp;#039;ll use a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera, be certain to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039;s initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled&lt;br /&gt;
&lt;br /&gt;
Once this has been done, you&amp;#039;ll have an effect loaded into the Particle Engine object &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; via the Particle Manager. However the Particle Engine isn&amp;#039;t worth much if it&amp;#039;s never called on to do anything, so let&amp;#039;s set up the rest of the code that&amp;#039;s needed for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To accomplish this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order is desired&lt;br /&gt;
&lt;br /&gt;
This will draw and update any particles that have been loaded by the Particle Manager and have been set active.  However, the particle engine that we just created hasn&amp;#039;t yet been set active, so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
The particle engine instance &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; is now active.  If it were already active, its lifetime would have been reset to 0.  (The lifetime of a particle engine starts at zero and increases until its maximum lifetime is reached, in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive.)&lt;br /&gt;
&lt;br /&gt;
This same method can be used to stop the particle engine from creating any more particles, by supplying &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; as its parameter instead:&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false);&lt;br /&gt;
&lt;br /&gt;
A series of methods allow us to modify the drawing of the ParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start the TACParticleEditor program.  This program presents two windows, one containing a Windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whichever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded, the current directory is switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must be added manually to the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experiment Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (My Documents\Autism Collaborative\Users\DefaultUser\LogFiles\ExperimentLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed.  (That&amp;#039;s the whole point of this game!)&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each mini-game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside this range, both positive and negative; these codes may be used in the same way, but will be logged only to the text log file and not to the parallel port.&lt;br /&gt;
** Codes in the negative range are considered debugging codes, and can be omitted from the log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.writeToParallel = true;&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
As these assigned events are local to each InputHandler object, your mini-game&amp;#039;s event code assignments will not interact with the event code assignments of other mini-games.&lt;br /&gt;
&lt;br /&gt;
Every mini-game should start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is true by default only when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\Debug.confcss&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;Debug.confcss&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
==Run the Game in the Lab==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. This can be manually edited before the build is made of the program. The program will automatically use the LabConfig.config file if it exists, otherwise it will use Default.config. To run the program in the lab, simply make sure the LabConfig.config file is present.&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
** Run Autism Collaborative\Utilities\Installer Installer\isetup-5.2.2.exe&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;ReleasePub&amp;quot; or &amp;quot;ReleaseLab&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
*** ReleasePub is for our releases to the general public. This will usually be the correct configuration.&lt;br /&gt;
*** ReleaseLab is for builds to be used in the lab. This will create the config file to run the game in &amp;quot;lab mode.&amp;quot; The resulting exe file will actually be the same as ReleasePub, but constd.tac will be replaced with conlab.tac.&lt;br /&gt;
*** Debug mode is used while developing, so do not build the game in debug mode when creating the installer.&lt;br /&gt;
*** For the exact effects of the different build configurations on the game flow, unit stats, etc. see the config files in Autism Collaborative\Game\Game\Configs&lt;br /&gt;
** Select Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Game\Installer.iss with InnoSetup&lt;br /&gt;
** Select Build-&amp;gt;Compile&lt;br /&gt;
** Select Run-&amp;gt;Run&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\tAC_Installer.exe&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* To transfer the file, use an SSH client such as WinSCP (for a graphical interface) or PuTTY&amp;#039;s PSCP (from the command line)&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Log in to AutismCollaborative.org (port 22)&lt;br /&gt;
* Upload tAC_Installer.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the web site until the new installer finishes uploading&lt;br /&gt;
* Once the upload is complete, ssh into a shell and enter the command &amp;quot;mv /home/{$user}/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SSH client)&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make certain that your user ID has write and search permission for the autismcollaborative.org/downloads directory.&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (like when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt. The user is encouraged to email that file to us so we can locate the problem they ran into. Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line!).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a MiniGame. This may prove invaluable in debugging based on end-user error reports. All you (the programmer) must do is override the string MiniGame.DebugInfo() function. When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Meteor Madness&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for spacebar to be pressed before disappearing&lt;br /&gt;
**On space drift tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Dot coherence phase looks correct . Dots are the correct size and dot correlation fits with PEST data. Look for any slowdown and loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly upon taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Sim&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure you can not click through things&lt;br /&gt;
**Select each type of building and make sure the pop up info is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, players money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that minigames can be accessed&lt;br /&gt;
**Attempt to play each minigame through the colony sim, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off screen.&lt;br /&gt;
**Input events still work when prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in game by still being able to exit out through game menu if ESC was pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled and when it has, returns to main menu&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=537</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=537"/>
				<updated>2009-01-09T05:56:19Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: /* Create the Installer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewGame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
 class NewGame : Gamescreen {...}&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
 public override void Update(GameTime gameTime){...}&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
 public override void Draw(SpriteBatch spriteBatch){...}&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing.  (We may want other cameras, too, for whatever reason.)&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from class Camera. At the time of this writing (January 2009) these types are limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now we&amp;#039;ll use a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera, be certain to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039;s initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled&lt;br /&gt;
&lt;br /&gt;
Once this has been done, you&amp;#039;ll have an effect loaded into the Particle Engine object &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; via the Particle Manager. However the Particle Engine isn&amp;#039;t worth much if it&amp;#039;s never called on to do anything, so let&amp;#039;s set up the rest of the code that&amp;#039;s needed for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To accomplish this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order is desired&lt;br /&gt;
&lt;br /&gt;
This will draw and update any particles that have been loaded by the Particle Manager and have been set active.  However, the particle engine that we just created hasn&amp;#039;t yet been set active, so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
The particle engine instance &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; is now active.  If it were already active, its lifetime would have been reset to 0.  (The lifetime of a particle engine starts at zero and increases until its maximum lifetime is reached, in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive.)&lt;br /&gt;
&lt;br /&gt;
This same method can be used to stop the particle engine from creating any more particles, by supplying &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; as its parameter instead:&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false);&lt;br /&gt;
&lt;br /&gt;
A series of methods allow us to modify the drawing of the ParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start the TACParticleEditor program.  This program presents two windows, one containing a Windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whichever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded, the current directory is switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must be added manually to the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experiment Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (My Documents\Autism Collaborative\Users\DefaultUser\LogFiles\ExperimentLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed.  (That&amp;#039;s the whole point of this game!)&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each mini-game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside this range, both positive and negative; these codes may be used in the same way, but will be logged only to the text log file and not to the parallel port.&lt;br /&gt;
** Codes in the negative range are considered debugging codes, and can be omitted from the log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.writeToParallel = true;&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
As these assigned events are local to each InputHandler object, your mini-game&amp;#039;s event code assignments will not interact with the event code assignments of other mini-games.&lt;br /&gt;
&lt;br /&gt;
Every mini-game should start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is true by default only when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\Debug.confcss&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;Debug.confcss&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
==Run the Game in the Lab==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. This can be manually edited before the build is made of the program. The program will automatically use the LabConfig.config file if it exists, otherwise it will use Default.config. To run the program in the lab, simply make sure the LabConfig.config file is present.&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
** Run Autism Collaborative\Utilities\Installer Installer\isetup-5.2.2.exe&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;ReleasePub&amp;quot; or &amp;quot;ReleaseLab&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
*** ReleasePub is for our releases to the general public. This will usually be the correct configuration.&lt;br /&gt;
*** ReleaseLab is for builds to be used in the lab. This will create the config file to run the game in &amp;quot;lab mode.&amp;quot; The resulting exe file will actually be the same as ReleasePub, but constd.tac will be replaced with conlab.tac.&lt;br /&gt;
*** Debug mode is used while developing, so do not build the game in debug mode when creating the installer.&lt;br /&gt;
*** For the exact effects of the different build configurations on the game flow, unit stats, etc. see the config files in Autism Collaborative\Game\Game\Configs&lt;br /&gt;
** Select Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Game\Installer.iss with InnoSetup&lt;br /&gt;
** Select Build-&amp;gt;Compile&lt;br /&gt;
** Select Run-&amp;gt;Run&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\tAC_Installer.exe&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* Use a secure FTP client to login, such as WinSCP&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Login to autismcollaborative.org (port 22)&lt;br /&gt;
* Upload tAC_Installer.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the website until the new installer finishes uploading (usually over an hour!)&lt;br /&gt;
* Once the upload is complete, enter the command &amp;quot;mv /home/zinsser/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SFTP client)&lt;br /&gt;
** In the above command, substitute your username for &amp;quot;zinsser&amp;quot;, but keep &amp;quot;belmonte&amp;quot; as the destination user directory&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make sure your user has permission to the autismcollaborative.org directory!&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (like when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt. The user is encouraged to email that file to us so we can locate the problem they ran into. Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line!).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a MiniGame. This may prove invaluable in debugging based on end-user error reports. All you (the programmer) must do is override the string MiniGame.DebugInfo() function. When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Meteor Madness&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for spacebar to be pressed before disappearing&lt;br /&gt;
**On space drift tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Dot coherence phase looks correct . Dots are the correct size and dot correlation fits with PEST data. Look for any slowdown and loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly upon taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Sim&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure you can not click through things&lt;br /&gt;
**Select each type of building and make sure the pop up info is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, players money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that minigames can be accessed&lt;br /&gt;
**Attempt to play each minigame through the colony sim, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off screen.&lt;br /&gt;
**Input events still work when prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in game by still being able to exit out through game menu if ESC was pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled and when it has, returns to main menu&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=536</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=536"/>
				<updated>2009-01-09T05:38:23Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewGame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
 class NewGame : Gamescreen {...}&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
 public override void Update(GameTime gameTime){...}&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
 public override void Draw(SpriteBatch spriteBatch){...}&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing.  (We may want other cameras, too, for whatever reason.)&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from class Camera. At the time of this writing (January 2009) these types are limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now we&amp;#039;ll use a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera, be certain to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039;s initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled&lt;br /&gt;
&lt;br /&gt;
Once this has been done, you&amp;#039;ll have an effect loaded into the Particle Engine object &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; via the Particle Manager. However the Particle Engine isn&amp;#039;t worth much if it&amp;#039;s never called on to do anything, so let&amp;#039;s set up the rest of the code that&amp;#039;s needed for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To accomplish this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order is desired&lt;br /&gt;
&lt;br /&gt;
This will draw and update any particles that have been loaded by the Particle Manager and have been set active.  However, the particle engine that we just created hasn&amp;#039;t yet been set active, so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
The particle engine instance &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; is now active.  If it were already active, its lifetime would have been reset to 0.  (The lifetime of a particle engine starts at zero and increases until its maximum lifetime is reached, in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive.)&lt;br /&gt;
&lt;br /&gt;
This same method can be used to stop the particle engine from creating any more particles, by supplying &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; as its parameter instead:&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false);&lt;br /&gt;
&lt;br /&gt;
A series of methods allow us to modify the drawing of the ParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start the TACParticleEditor program.  This program presents two windows, one containing a Windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whichever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded, the current directory is switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must be added manually to the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experiment Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (My Documents\Autism Collaborative\Users\DefaultUser\LogFiles\ExperimentLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed.  (That&amp;#039;s the whole point of this game!)&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each mini-game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside this range, both positive and negative; these codes may be used in the same way, but will be logged only to the text log file and not to the parallel port.&lt;br /&gt;
** Codes in the negative range are considered debugging codes, and can be omitted from the log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.writeToParallel = true;&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
As these assigned events are local to each InputHandler object, your mini-game&amp;#039;s event code assignments will not interact with the event code assignments of other mini-games.&lt;br /&gt;
&lt;br /&gt;
Every mini-game should start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is true by default only when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\Debug.confcss&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;Debug.confcss&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
==Run the Game in the Lab==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. This can be manually edited before the build is made of the program. The program will automatically use the LabConfig.config file if it exists, otherwise it will use Default.config. To run the program in the lab, simply make sure the LabConfig.config file is present.&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
** Run Autism Collaborative\Utilities\Installer Installer\isetup-5.2.2.exe&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;ReleasePub&amp;quot; or &amp;quot;ReleaseLab&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
*** ReleasePub is for our releases to the general public. This will usually be the correct configuration.&lt;br /&gt;
*** ReleaseLab is for builds to be used in the lab. This will create the config file to run the game in &amp;quot;lab mode.&amp;quot; The resulting exe file will actually be the same as ReleasePub, but constd.tac will be replaced with conlab.tac.&lt;br /&gt;
*** Debug mode is used while developing, so do not build the game in debug mode when creating the installer.&lt;br /&gt;
*** For the exact effects of the different build configurations on the game flow, unit stats, etc. see the config files in Autism Collaborative\Game\Game\Configs&lt;br /&gt;
** Goto Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Game\Installer.iss with InnoSetup&lt;br /&gt;
** Goto Build-&amp;gt;Compile&lt;br /&gt;
** Goto Run-&amp;gt;Run&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\tAC_Installer.exe&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* Use a secure FTP client to login, such as WinSCP&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Login to autismcollaborative.org (port 22)&lt;br /&gt;
* Upload tAC_Installer.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the website until the new installer finishes uploading (usually over an hour!)&lt;br /&gt;
* Once the upload is complete, enter the command &amp;quot;mv /home/zinsser/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SFTP client)&lt;br /&gt;
** In the above command, substitute your username for &amp;quot;zinsser&amp;quot;, but keep &amp;quot;belmonte&amp;quot; as the destination user directory&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make sure your user has permission to the autismcollaborative.org directory!&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (like when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt. The user is encouraged to email that file to us so we can locate the problem they ran into. Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line!).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a MiniGame. This may prove invaluable in debugging based on end-user error reports. All you (the programmer) must do is override the string MiniGame.DebugInfo() function. When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Meteor Madness&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for spacebar to be pressed before disappearing&lt;br /&gt;
**On space drift tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Dot coherence phase looks correct . Dots are the correct size and dot correlation fits with PEST data. Look for any slowdown and loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly upon taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Sim&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure you can not click through things&lt;br /&gt;
**Select each type of building and make sure the pop up info is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, players money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that minigames can be accessed&lt;br /&gt;
**Attempt to play each minigame through the colony sim, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off screen.&lt;br /&gt;
**Input events still work when prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in game by still being able to exit out through game menu if ESC was pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled and when it has, returns to main menu&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=535</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=535"/>
				<updated>2009-01-09T05:30:39Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewGame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
 class NewGame : Gamescreen {...}&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
 public override void Update(GameTime gameTime){...}&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
 public override void Draw(SpriteBatch spriteBatch){...}&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing.  (We may want other cameras, too, for whatever reason.)&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from class Camera. At the time of this writing (January 2009) these types are limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now we&amp;#039;ll use a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera, be certain to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039;s initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled&lt;br /&gt;
&lt;br /&gt;
Once this has been done, you&amp;#039;ll have an effect loaded into the Particle Engine object &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; via the Particle Manager. However the Particle Engine isn&amp;#039;t worth much if it&amp;#039;s never called on to do anything, so let&amp;#039;s set up the rest of the code that&amp;#039;s needed for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To accomplish this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order is desired&lt;br /&gt;
&lt;br /&gt;
This will draw and update any particles that have been loaded by the Particle Manager and have been set active.  However, the particle engine that we just created hasn&amp;#039;t yet been set active, so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
The particle engine instance &amp;#039;&amp;#039;&amp;#039;mTestEffect&amp;#039;&amp;#039;&amp;#039; is now active.  If it were already active, its lifetime would have been reset to 0.  (The lifetime of a particle engine starts at zero and increases until its maximum lifetime is reached, in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive.)&lt;br /&gt;
&lt;br /&gt;
This same method can be used to stop the particle engine from creating any more particles, by supplying &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; as its parameter instead:&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false);&lt;br /&gt;
&lt;br /&gt;
A series of methods allow us to modify the drawing of the ParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start the TACParticleEditor program.  This program presents two windows, one containing a Windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whichever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded, the current directory is switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must be added manually to the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experimental Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (LogFiles\ExperimentalLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed (that&amp;#039;s kind of the whole point of this game!).&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each Mini game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written out to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside of this range, both positive and negative; These codes may be used in the same way, but will only be logged to the text log file.&lt;br /&gt;
** Codes in the negative range are considered to be debug codes, and can be omitted from the resulted log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.writeToParallel = true;&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
These assigned events are local to each InputHandler object, so assigning your events will not interact with the events of other mini games.&lt;br /&gt;
&lt;br /&gt;
Every minigame should also start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is only true by default when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\Debug.confcss&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;Debug.confcss&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
==Run the Game in the Lab==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. This can be manually edited before the build is made of the program. The program will automatically use the LabConfig.config file if it exists, otherwise it will use Default.config. To run the program in the lab, simply make sure the LabConfig.config file is present.&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
** Run Autism Collaborative\Utilities\Installer Installer\isetup-5.2.2.exe&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;ReleasePub&amp;quot; or &amp;quot;ReleaseLab&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
*** ReleasePub is for our releases to the general public. This will usually be the correct configuration.&lt;br /&gt;
*** ReleaseLab is for builds to be used in the lab. This will create the config file to run the game in &amp;quot;lab mode.&amp;quot; The resulting exe file will actually be the same as ReleasePub, but constd.tac will be replaced with conlab.tac.&lt;br /&gt;
*** Debug mode is used while developing, so do not build the game in debug mode when creating the installer.&lt;br /&gt;
*** For the exact effects of the different build configurations on the game flow, unit stats, etc. see the config files in Autism Collaborative\Game\Game\Configs&lt;br /&gt;
** Goto Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Game\Installer.iss with InnoSetup&lt;br /&gt;
** Goto Build-&amp;gt;Compile&lt;br /&gt;
** Goto Run-&amp;gt;Run&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\tAC_Installer.exe&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* Use a secure FTP client to login, such as WinSCP&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Login to autismcollaborative.org (port 22)&lt;br /&gt;
* Upload tAC_Installer.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the website until the new installer finishes uploading (usually over an hour!)&lt;br /&gt;
* Once the upload is complete, enter the command &amp;quot;mv /home/zinsser/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SFTP client)&lt;br /&gt;
** In the above command, substitute your username for &amp;quot;zinsser&amp;quot;, but keep &amp;quot;belmonte&amp;quot; as the destination user directory&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make sure your user has permission to the autismcollaborative.org directory!&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (like when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt. The user is encouraged to email that file to us so we can locate the problem they ran into. Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line!).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a MiniGame. This may prove invaluable in debugging based on end-user error reports. All you (the programmer) must do is override the string MiniGame.DebugInfo() function. When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Meteor Madness&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for spacebar to be pressed before disappearing&lt;br /&gt;
**On space drift tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Dot coherence phase looks correct . Dots are the correct size and dot correlation fits with PEST data. Look for any slowdown and loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly upon taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Sim&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure you can not click through things&lt;br /&gt;
**Select each type of building and make sure the pop up info is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, players money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that minigames can be accessed&lt;br /&gt;
**Attempt to play each minigame through the colony sim, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off screen.&lt;br /&gt;
**Input events still work when prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in game by still being able to exit out through game menu if ESC was pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled and when it has, returns to main menu&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=534</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=534"/>
				<updated>2009-01-09T05:07:54Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewGame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
 class NewGame : Gamescreen {...}&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
 public override void Update(GameTime gameTime){...}&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
 public override void Draw(SpriteBatch spriteBatch){...}&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame to which you wish to add a sound.&lt;br /&gt;
* Expand Wave Banks and double-click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double-click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right-click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing in case we may want other cameras for whatever reason.&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from Camera. As of now this is limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now well us a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera make sure to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039; initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled to&lt;br /&gt;
&lt;br /&gt;
After this has been done, you&amp;#039;ll now have an effect loaded into a Particle Engine object via the Particle Manager. However the Particle Engine doesn&amp;#039;t mean anything if it doesn&amp;#039;t do anything so let&amp;#039;s set up the rest of the code we need for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To do this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
This will now draw and update any particles that have been loaded by the Particle Manager and have been set active, however the current particle engine we created hasn&amp;#039;t been set active yet so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
This particle engine is now active, and if it had been previously active, its lifetime would have been reset to 0 (the lifetime for a particle engine starts at zero and increases until its max lifetime is reached in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive). Using this call, we can also turn off the particle engine from creating anymore particles by giving it false as its parameter instead.&lt;br /&gt;
&lt;br /&gt;
Besides this method, there are a series of methods that allow us to modify the drawing of the ParticleEngine itself. These are as followed:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start up the TACParticleEditor program. In this program there are two windows, one containing a windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whatever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names in correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded in, the current directory is then switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must manually be added into the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experimental Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (LogFiles\ExperimentalLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed (that&amp;#039;s kind of the whole point of this game!).&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each Mini game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written out to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside of this range, both positive and negative; These codes may be used in the same way, but will only be logged to the text log file.&lt;br /&gt;
** Codes in the negative range are considered to be debug codes, and can be omitted from the resulted log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.writeToParallel = true;&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
These assigned events are local to each InputHandler object, so assigning your events will not interact with the events of other mini games.&lt;br /&gt;
&lt;br /&gt;
Every minigame should also start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is only true by default when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\Debug.confcss&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;Debug.confcss&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
==Run the Game in the Lab==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. This can be manually edited before the build is made of the program. The program will automatically use the LabConfig.config file if it exists, otherwise it will use Default.config. To run the program in the lab, simply make sure the LabConfig.config file is present.&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
** Run Autism Collaborative\Utilities\Installer Installer\isetup-5.2.2.exe&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;ReleasePub&amp;quot; or &amp;quot;ReleaseLab&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
*** ReleasePub is for our releases to the general public. This will usually be the correct configuration.&lt;br /&gt;
*** ReleaseLab is for builds to be used in the lab. This will create the config file to run the game in &amp;quot;lab mode.&amp;quot; The resulting exe file will actually be the same as ReleasePub, but constd.tac will be replaced with conlab.tac.&lt;br /&gt;
*** Debug mode is used while developing, so do not build the game in debug mode when creating the installer.&lt;br /&gt;
*** For the exact effects of the different build configurations on the game flow, unit stats, etc. see the config files in Autism Collaborative\Game\Game\Configs&lt;br /&gt;
** Goto Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Game\Installer.iss with InnoSetup&lt;br /&gt;
** Goto Build-&amp;gt;Compile&lt;br /&gt;
** Goto Run-&amp;gt;Run&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\tAC_Installer.exe&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* Use a secure FTP client to login, such as WinSCP&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Login to autismcollaborative.org (port 22)&lt;br /&gt;
* Upload tAC_Installer.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the website until the new installer finishes uploading (usually over an hour!)&lt;br /&gt;
* Once the upload is complete, enter the command &amp;quot;mv /home/zinsser/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SFTP client)&lt;br /&gt;
** In the above command, substitute your username for &amp;quot;zinsser&amp;quot;, but keep &amp;quot;belmonte&amp;quot; as the destination user directory&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make sure your user has permission to the autismcollaborative.org directory!&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (like when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt. The user is encouraged to email that file to us so we can locate the problem they ran into. Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line!).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a MiniGame. This may prove invaluable in debugging based on end-user error reports. All you (the programmer) must do is override the string MiniGame.DebugInfo() function. When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Meteor Madness&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for spacebar to be pressed before disappearing&lt;br /&gt;
**On space drift tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Dot coherence phase looks correct . Dots are the correct size and dot correlation fits with PEST data. Look for any slowdown and loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly upon taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Sim&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure you can not click through things&lt;br /&gt;
**Select each type of building and make sure the pop up info is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, players money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that minigames can be accessed&lt;br /&gt;
**Attempt to play each minigame through the colony sim, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off screen.&lt;br /&gt;
**Input events still work when prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in game by still being able to exit out through game menu if ESC was pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled and when it has, returns to main menu&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	<entry>
		<id>https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=533</id>
		<title>Code How To&#039;s</title>
		<link rel="alternate" type="text/html" href="https://www.autismcollaborative.org/wiki/index.php?title=Code_How_To%27s&amp;diff=533"/>
				<updated>2009-01-09T05:02:32Z</updated>
		
		<summary type="html">&lt;p&gt;Belmonte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides tutorials for some of the most common actions a programmer may wish to implement. It may helpful to read the [[Code Overview]] first.&lt;br /&gt;
&lt;br /&gt;
==Submit a Bug or Other Issue==&lt;br /&gt;
&lt;br /&gt;
* Go to http://www.AutismCollaborative.org/bugs/&lt;br /&gt;
* Fill out the fields that apply to this issue&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Type of Bug:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Functional Problem&lt;br /&gt;
** Any actual &amp;quot;Bug&amp;quot;&lt;br /&gt;
* Suggestion&lt;br /&gt;
** A possible change to the game that may improve it&lt;br /&gt;
* New Feature&lt;br /&gt;
** Something that &amp;#039;&amp;#039;&amp;#039;absolutely must&amp;#039;&amp;#039;&amp;#039; be implemented&lt;br /&gt;
** Use sparingly; make sure it&amp;#039;s not actually a Suggestion&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Severity:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How much this issue affects the game/application&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Priority:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* How soon the issue should be resolved (relative to other issues)&lt;br /&gt;
* The majority of issues should be Low priority&lt;br /&gt;
* Use High sparingly&lt;br /&gt;
&lt;br /&gt;
==Coding Conventions==&lt;br /&gt;
&lt;br /&gt;
* Place the name of the file, authors, and copyright info at the top of each file&lt;br /&gt;
** Any person who makes significant changes to a file should add their name to the list of authors in a file&lt;br /&gt;
*** This helps anyone reading the code because they know who to ask if they have a question about something&lt;br /&gt;
* All private and protected class member variables are lowerCamelCase&lt;br /&gt;
* Private/protected class member variables are preceded with &amp;quot;m&amp;quot; (ie mLocalVariable)&lt;br /&gt;
* All functions, properties (sometimes called &amp;quot;smart fields&amp;quot;), and public class variables are UpperCamelCase&lt;br /&gt;
* Public variables should only be used with small classes that are used by only one or two other classes&lt;br /&gt;
* This code is intended to be viewed by many people who do not have strong programming backgrounds, therefore documentation is &amp;#039;&amp;#039;&amp;#039;very&amp;#039;&amp;#039;&amp;#039; important&lt;br /&gt;
** Document the purpose of each class&amp;#039;s member variables, either next to their declarations or as a summary for their property accessor&lt;br /&gt;
** Create a summary documentation block for every function unless it is extremely obvious&lt;br /&gt;
*** This can be done by placing the cursor above a function definition and typing &amp;quot;///&amp;quot;&lt;br /&gt;
*** This block shows up in Intellisense when writing that function in code&lt;br /&gt;
** Add a summary to any properties that are possibly confusing or not straightforward &lt;br /&gt;
** Document every step of each algorithm (except for very obvious function calls like ResetSettings();)&lt;br /&gt;
*** Someone should be able to read only the comments in a function and still understand what it does&lt;br /&gt;
** See MeteorMadness.cs for an example of the appropriate level of documentation&lt;br /&gt;
* See the Load a Texture section for naming conventions of texture assets&lt;br /&gt;
&lt;br /&gt;
==Create a New Minigame==&lt;br /&gt;
&lt;br /&gt;
* Declare the class&lt;br /&gt;
** Create a new folder under ColonySimulator&lt;br /&gt;
** Create a new file in that folder named NewMinigame.cs where NewGame is the name of the new minigame&lt;br /&gt;
** Place all new minigame-specific classes in that folder&lt;br /&gt;
** Have the class derive from GameScreen&lt;br /&gt;
 class NewGame : Gamescreen {...}&lt;br /&gt;
* Implement the Constructor&lt;br /&gt;
** Initialize game variables&lt;br /&gt;
** Declare a ScoreCard (see Scoring tutorial)&lt;br /&gt;
** Log the GameBegin code (see the Logging tutorial)&lt;br /&gt;
* Implement Update()&lt;br /&gt;
 public override void Update(GameTime gameTime){...}&lt;br /&gt;
** Do not assume a constant call rate&lt;br /&gt;
*** This function will almost always be called 60 times per second, but that rate may vary depending on CPU load&lt;br /&gt;
*** At the beginning of each cycle, get the time since the last cycle like this:&lt;br /&gt;
**** float dt = gameTime.ElapsedGameTime;&lt;br /&gt;
*** Build the time into all movement and timers, for example:&lt;br /&gt;
 myEntity.LifeSpan -= dt;&lt;br /&gt;
 myEntity.Position += myEntity.Velocity * dt;&lt;br /&gt;
* Implement Draw()&lt;br /&gt;
 public override void Draw(SpriteBatch spriteBatch){...}&lt;br /&gt;
** Be sure to call each entity&amp;#039;s Draw and Update methods. Optional: Register all entities with the XNA game object.&lt;br /&gt;
This will have XNA automatically call their Draw and Update functions at appropriate times.&lt;br /&gt;
** Consider using a generalized render-queue such as GenericWorldSpace &amp;#039;&amp;#039;&amp;#039;(not yet implemented as of October 2007)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Use the Raise function to place the minigame gamescreen on the stack based game system.&lt;br /&gt;
* End the mini-game using Done function. This will pop the mini-game off the game stack, returning the game to the previous state.&lt;br /&gt;
** Flush the particle system (see the particles tutorial) if any emitters were created&lt;br /&gt;
** Log the GameEndSuccess/GameEndFailure code&lt;br /&gt;
** Show the score&lt;br /&gt;
&lt;br /&gt;
==Use Images==&lt;br /&gt;
&lt;br /&gt;
XNA supports most common types of images, including JPEG, GIF, DDS, etc.&lt;br /&gt;
&lt;br /&gt;
===Load a Texture===&lt;br /&gt;
&lt;br /&gt;
Before you can load a texture in code, though, you must add it to the content pipeline:&lt;br /&gt;
&lt;br /&gt;
* Import the content into the project&lt;br /&gt;
** Browse to the appropriate folder in Visual Studio&amp;#039;s Solution Explorer&lt;br /&gt;
*** For example, Content\MiniGames\MyImage.png&lt;br /&gt;
** Right-click on that folder and select Add-&amp;gt;Existing Item&lt;br /&gt;
** Select the image to import&lt;br /&gt;
&lt;br /&gt;
Once that&amp;#039;s done, you can load it memory using the XNA content manager:&lt;br /&gt;
&lt;br /&gt;
 Texture2D myTexture = Content.Load(@&amp;quot;General\myTexture&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The XNA content manager defaults to the content folder of the project, so all addresses can be relative from there.  Also, the name of the image should be the same as the asset name. This can be set in the properties window.&lt;br /&gt;
&lt;br /&gt;
===Display a Static Image===&lt;br /&gt;
&lt;br /&gt;
Before manually drawing something to screen consider using some type of game object, be it an Entity, HUD element, or even a Ticker (see the tutorials below). Game objects all know how to draw themselves, so it is unlikely that a minigame will need to draw something directly to the screen. Should the need arise, however, here&amp;#039;s how it&amp;#039;s done:&lt;br /&gt;
&lt;br /&gt;
* Load it in code:&lt;br /&gt;
 GraphicsDeviceManager gdm = ...;    // This is declared in GenericGameManager.cs&lt;br /&gt;
 ConentManager cm = ...;             // Usually a parameter, as in Update(ContentManager content)&lt;br /&gt;
 SpriteBatch sb = new SpriteBatch(gdm.GraphicsDevice);                     // Basically a wrapper for a DirectX render target&lt;br /&gt;
 Texture2D texture = TextureManager.Load(@&amp;quot;Content\General\myTexture&amp;quot;);&lt;br /&gt;
 Rectangle destination = ...;        // Display destination&lt;br /&gt;
 Color tint = Color.White;           // Tint the image with this color&lt;br /&gt;
 float rotation = 0f;                // Rotation (in radians)&lt;br /&gt;
 Vector2 center = new Vector2(texture.Width / 2f, texture.Height / 2f);         // Origin of rotation&lt;br /&gt;
 float zDepth = 1f;                  // Order to draw sprites within this spritebatch&lt;br /&gt;
 &lt;br /&gt;
 sb.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.BackToFront, SaveStateMode.SaveState);&lt;br /&gt;
 &lt;br /&gt;
 sb.Draw(&lt;br /&gt;
   texture,&lt;br /&gt;
   destination ,&lt;br /&gt;
   null,               // What part of the source image to sample from--null tells it to use the whole image&lt;br /&gt;
   tint ,&lt;br /&gt;
   rotation,&lt;br /&gt;
   center,&lt;br /&gt;
   SpriteEffects.None, // How to mirror the image&lt;br /&gt;
   zDepth &lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
===Display an Animation===&lt;br /&gt;
&lt;br /&gt;
Animations are created using the AnimatedSprite class. Here&amp;#039;s an example:&lt;br /&gt;
&lt;br /&gt;
 //Declare Animated Sprite&lt;br /&gt;
 //Parameters: Game object, SpriteSheet as a Texture2D object, Position as Vector2, FrameSize as Vector2, Number of Frames&lt;br /&gt;
 AnimatedSprite testAnimation = new AnimatedSprite(this, Content.Load&amp;lt;Texture2D&amp;gt;(&amp;quot;TestSpriteSheet&amp;quot;), new Vector2(200, 300), new Vector2(64, 64), 16);&lt;br /&gt;
 //Pass a reference to the SpriteBatch that the AnimatedSprite will use&lt;br /&gt;
 testAnimation.SpriteBatch = spriteBatch;&lt;br /&gt;
 //Turn on the Animation&lt;br /&gt;
 testAnimation.Animate(true);&lt;br /&gt;
 //Turn off the Animation&lt;br /&gt;
 testAnimation.Animate(false);&lt;br /&gt;
&lt;br /&gt;
*Do not forget to call the draw and update methods of the AnimatedSprite explicitly, or to add them to the XNA game.components array so as to allow XNA to call them.&lt;br /&gt;
&lt;br /&gt;
==Create a New Type of Game Object==&lt;br /&gt;
&lt;br /&gt;
All specific game objects (players, enemies, collectibles, projectiles, etc.) should derive from Entity. This gives them easy ways to draw themselves, move, collide with other entities, and be passed to many tAC_Engine functions.&lt;br /&gt;
&lt;br /&gt;
==Get User Input==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DO NOT&amp;#039;&amp;#039;&amp;#039; use the standard XNA keyboard accessors (Xna.Framework.Input.Keyboard) or mouse accessors (Xna.Framework.Input.Mouse) because tAC_Engine does a lot of caching and logging behind the scenes. Use the InputHandler instead.&lt;br /&gt;
&lt;br /&gt;
===Keyboard Example===&lt;br /&gt;
&lt;br /&gt;
 // Bind the &amp;#039;A&amp;#039; Key to the event &amp;#039;PressedA&amp;#039;&lt;br /&gt;
 mInputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)EventCodes.PressedA);&lt;br /&gt;
 ...&lt;br /&gt;
 InputEvent inputEvent = mInputHandler.GetNextEvent();&lt;br /&gt;
 if (inputEvent.EventCode == (int)EventCodes.PressedA)&lt;br /&gt;
 {&lt;br /&gt;
   // The A key was pressed&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Loading Keybinds from a file===&lt;br /&gt;
&lt;br /&gt;
 // Load Bindings from &amp;#039;keybindings.dat&amp;#039;&lt;br /&gt;
 mInputHandler.LoadBindings(typeof(EventCodes), RootDirectory + @&amp;quot;\keybindings.dat&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The Bindings file is a plain text, human-editable file that takes the following form:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Event Name&amp;quot; (tab*) &amp;quot;Key Name&amp;quot; (tab*) (flags*)&lt;br /&gt;
&lt;br /&gt;
====Keybinding Examples====&lt;br /&gt;
&lt;br /&gt;
 Quit			Escape&lt;br /&gt;
* Trigger the Quit event when Escape is pressed.&lt;br /&gt;
&lt;br /&gt;
 PlaceBuilding		Left			mouse&lt;br /&gt;
* Trigger the PlaceBuilding event when the Left &amp;#039;&amp;#039;Mouse Button&amp;#039;&amp;#039; is pressed.&lt;br /&gt;
&lt;br /&gt;
 ZoomInStop		OemPlus			released&lt;br /&gt;
* Trigger the ZoomInStop event when the Plus Key is &amp;#039;&amp;#039;released&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Manage a Heads Up Display==&lt;br /&gt;
&lt;br /&gt;
Use the HUD class for any HUD element (like health bars, menu buttons, etc.). Typically, you&amp;#039;ll want to create a class that inherits from Widget2D. See MeteorWidgets.cs for examples.&lt;br /&gt;
&lt;br /&gt;
==Display Text or Icons with the Ticker==&lt;br /&gt;
&lt;br /&gt;
 string text = &amp;quot;w00t.&amp;quot;;                      // Text to display (can be &amp;quot;&amp;quot;)&lt;br /&gt;
 Texture2D image = null;                     // Can also be set to an image&lt;br /&gt;
 Vector2 imageSize = new Vector2(25f, 25f);  // Size of the (optional) icon&lt;br /&gt;
 Vector2 offset = new Vector2(700f, 50f);    // This will display the ticker 700 pixels to the right of the screen&amp;#039;s &lt;br /&gt;
                                             //   center and 50 pixels below the screen&amp;#039;s center&lt;br /&gt;
 Vector2 velocity = new Vector2 (-10f, 0f);  // Move left 10 pixels per second&lt;br /&gt;
 Ticker.Font font = Ticker.Font.Standard;    // Regular text&lt;br /&gt;
 Color color = Color.DeepPink;               // The manliest of colors&lt;br /&gt;
 float opacity = .5f;                        // 50% transparent&lt;br /&gt;
 float seconds = 5f;                         // Disappear after 5 seconds&lt;br /&gt;
 bool fade = true;                           // Fade in and fade out&lt;br /&gt;
 &lt;br /&gt;
 Ticker.Display(text, image, imageSize, offset, velocity, font, color, opacity, seconds, fade);&lt;br /&gt;
&lt;br /&gt;
==Display Text==&lt;br /&gt;
&lt;br /&gt;
First you must import the desired font:&lt;br /&gt;
&lt;br /&gt;
* Create an xml spritefont file for the new font called FontName.spritefont and set the desired values.&lt;br /&gt;
&lt;br /&gt;
Now for the code:&lt;br /&gt;
&lt;br /&gt;
 ContentManager cm = ...;&lt;br /&gt;
 SpriteBatch sb = ...;&lt;br /&gt;
 SpriteFont = cm.Load&amp;lt;SpriteFont&amp;gt;(@&amp;quot;FontName&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 sb.Begin();&lt;br /&gt;
 sb.DrawString(SpriteFont, &amp;quot;Some Text!&amp;quot;, new Vector2(10.0F, 10.0F), Color.Azure);&lt;br /&gt;
 sb.End();&lt;br /&gt;
&lt;br /&gt;
==Use Sound==&lt;br /&gt;
&lt;br /&gt;
===Import a new Audio File===&lt;br /&gt;
&lt;br /&gt;
** Run the XACT tool from Microsoft DirectX SDK&lt;br /&gt;
** If--after following the steps in this tutorial--playing a file in code throws an exception about using the wrong version of XACT, try using Xact.exe from a different SDK build&lt;br /&gt;
* Open AudioProject.xap file for the Minigame you wish to add a sound to.&lt;br /&gt;
* Expand Wave Banks and double click Wave Bank in the panel on the left&lt;br /&gt;
* Expand Sound Banks and double click Sound Bank in the panel on the left&lt;br /&gt;
* Go to Wave Banks-&amp;gt;Insert Wave File(s)...&lt;br /&gt;
* Select the file to import i.e.&amp;quot;@/MiniGame/Content/Audio/MySound.wav&amp;quot; and click OK.&lt;br /&gt;
* Drag the newly-added file to the Cue Name section in the Sound Bank:Sound Bank window&lt;br /&gt;
* Assign the audio file to be either a Music or Effect sound &lt;br /&gt;
* Go to File-&amp;gt;Build&lt;br /&gt;
* Save and close XACT&lt;br /&gt;
* Open game.sln with Visual Studio&lt;br /&gt;
* Browse to the Content\Sounds folder in the Solution Explorer&lt;br /&gt;
* Right click the Sounds folder and select Add-&amp;gt;Existing Item...&lt;br /&gt;
* Select &amp;quot;MySound.wav&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Load an Audio Project ===&lt;br /&gt;
This needs to be done before you play any sound or effect.&lt;br /&gt;
SoundManager.LoadAudioProject(&amp;quot;AudioProject.xgs&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===Play an Effect===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayEffect(&amp;quot;Pew&amp;quot;); // No file extension&lt;br /&gt;
&lt;br /&gt;
===Play Music ===&lt;br /&gt;
&lt;br /&gt;
SoundManager.PlayMusic(&amp;quot;MyMusic&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
==Use the Particle Engine==&lt;br /&gt;
&lt;br /&gt;
Particles are handled by the TACParticleEngine, a separate library that uses the AC_GraphicsEngine that has been modified to better fit the needs of the Autism Game. Features are added to it on an as-needed basis so if a new feature needs to be added and any problems arise in its integration into the current particle engine contact Brian Murphy.&lt;br /&gt;
&lt;br /&gt;
Quick layout of TACParticleEngine:&lt;br /&gt;
&lt;br /&gt;
 The ParticleManager contains references to all loaded ParticleEngines.&lt;br /&gt;
 ParticleEngines contain a series of Emitters.&lt;br /&gt;
 Emitters contain a heap of Particles, which are the objects that actually get drawn.&lt;br /&gt;
&lt;br /&gt;
Make sure to include these packages so that we can create and access our particle engine objects:&lt;br /&gt;
&lt;br /&gt;
 using TACParticleEngine;&lt;br /&gt;
 using TACParticleEngine.Particles;&lt;br /&gt;
 &lt;br /&gt;
Inside the class declaration make these global variables:&lt;br /&gt;
 &lt;br /&gt;
 ParticleManager mParticleManager;&lt;br /&gt;
 ParticleEngine mTestEffect;&lt;br /&gt;
&lt;br /&gt;
Since the TACParticleEngine makes use of the Camera class from the AC_GraphicsEngine, we will need to create and initialize an instance of the Camera class if we are to render our particles, so let&amp;#039;s get our camera set before we initialize the ParticleManager.&lt;br /&gt;
&lt;br /&gt;
Add the following line to the list of global variables at the beginning of the class:&lt;br /&gt;
&lt;br /&gt;
 Camera mActiveCamera;&lt;br /&gt;
&lt;br /&gt;
This will be whatever kind of camera we are currently using for drawing in case we may want other cameras for whatever reason.&lt;br /&gt;
&lt;br /&gt;
Next we need to initialize the camera to any specific type of camera that derives from Camera. As of now this is limited to FollowCamera, OrthographicCamera, PerspectiveCamera2D, and PerspectiveCamera3D. For now well us a PerspectiveCamera3D as our active camera.&lt;br /&gt;
&lt;br /&gt;
 mActiveCamera = new Perspective3DCamera(new Vector3(0, 0, -5), Vector3.Zero, Vector3.Up, MathHelper.Pi/5, 1, 1, 100);&lt;br /&gt;
&lt;br /&gt;
If we ever need to change the camera make sure to update the active camera for the particle manager by calling &lt;br /&gt;
 mParticleManager.SetActiveCamera(newActiveCamera); &lt;br /&gt;
where newActiveCamera is the camera that has just been changed to.&lt;br /&gt;
&lt;br /&gt;
Now that we have a camera, make sure to initialize the particle manager (and optionally, some particle effects) in the class&amp;#039; initialize method:&lt;br /&gt;
&lt;br /&gt;
 mParticleManager = new ParticleManager(Game, mActiveCamera); // Initialize the particle manager object with a reference to the current &lt;br /&gt;
                                                              // game and to the current active camera&lt;br /&gt;
 mTestEffect = mParticleManager.Load(&amp;quot;ParticleEffects/Explosion&amp;quot;); // Load in the given particle effect file by giving the&lt;br /&gt;
                                                                   // location at which it is compiled to&lt;br /&gt;
&lt;br /&gt;
After this has been done, you&amp;#039;ll now have an effect loaded into a Particle Engine object via the Particle Manager. However the Particle Engine doesn&amp;#039;t mean anything if it doesn&amp;#039;t do anything so let&amp;#039;s set up the rest of the code we need for updating and drawing:&lt;br /&gt;
&lt;br /&gt;
To do this, all we need to do is add the particle manager to the Game&amp;#039;s list of components. This is done as follows:&lt;br /&gt;
&lt;br /&gt;
 AddComponent(mParticleManager);&lt;br /&gt;
&lt;br /&gt;
Aside from this we need to set the draw order of the effects, at least generally by calling&lt;br /&gt;
&lt;br /&gt;
 mParticleManager.DrawOrder = DrawOrder; // The second DrawOrder being whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
This will now draw and update any particles that have been loaded by the Particle Manager and have been set active, however the current particle engine we created hasn&amp;#039;t been set active yet so do that now.&lt;br /&gt;
&lt;br /&gt;
This is done by calling the following line whenever you would want drawing of that Particle Engine to occur.&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(true);&lt;br /&gt;
&lt;br /&gt;
This particle engine is now active, and if it had been previously active, its lifetime would have been reset to 0 (the lifetime for a particle engine starts at zero and increases until its max lifetime is reached in which case the particle engine &amp;quot;dies&amp;quot; and becomes inactive). Using this call, we can also turn off the particle engine from creating anymore particles by giving it false as its parameter instead.&lt;br /&gt;
&lt;br /&gt;
Besides this method, there are a series of methods that allow us to modify the drawing of the ParticleEngine itself. These are as followed:&lt;br /&gt;
&lt;br /&gt;
 SetSplineScale(float scale) // Given a float, scales the spline around the origin by the given amount every 1/10 of a second. Note that this only&lt;br /&gt;
                             // applies for all spline emitters in the engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePositions(Vector3[] Positions) // Given an array of 3D vectors, we can change the shape of all spline emitters in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 SetEnginePosition(Vector3 Position) // Given a 3D vector, we can move the whole particle engine to the desired position.&lt;br /&gt;
&lt;br /&gt;
 SetEngineColor(Vector4 Color) // Given a 4D vector of float values 0-1 in the form of RGBA, we can change the coloring of the whole particle engine&lt;br /&gt;
                               // Keep in mind that this applies that much of the emitters&amp;#039; texture for each value, so a black picture with 1,0,0,1 as&lt;br /&gt;
                               // its value will not be red but still black.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSize(Vector2 Size) // Given a 2D vector, we can modify the dimensions of the particle image, this is always 2D since particles in 3D are &lt;br /&gt;
                             // simply billboard sprites.&lt;br /&gt;
&lt;br /&gt;
 SetEngineSpeed(float Speed) // Given a float, changes the speed at which particles initially move at.&lt;br /&gt;
&lt;br /&gt;
 SetEngineDirection(Vector3 Direction) // Given a 3D vector, changes the direction in which particles move at. This does not apply to point emitters.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticlesPerSec(float NumPerSec) // Given a float, sets the number of particles created in a second. Note that this value times particle&lt;br /&gt;
                                           // lifetime should not exceed the amount of particles in order to insure consistent effects.&lt;br /&gt;
&lt;br /&gt;
 SetEngineParticleLifetime(float Lifetime) // Given a float, sets how long a particle lives for in seconds. Note that this should never be changed&lt;br /&gt;
                                           // while an effect is active, otherwise inconsistencies in the effect will most likely occur.&lt;br /&gt;
&lt;br /&gt;
 SetRandomDirection(bool Random) // Given a boolean, sets whether or not to make particles move in a random direction.&lt;br /&gt;
&lt;br /&gt;
Also, if needed you can change the draw order of each engine individually by calling&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.DrawOrder = DrawOrder; // The second DrawOrder is whatever draw order desired&lt;br /&gt;
&lt;br /&gt;
Whenever a game object that uses a particle effect is being disposed, make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.SetActive(false); // Making sure to set the effect to no longer being active&lt;br /&gt;
&lt;br /&gt;
on any effect with infinite life span and make sure to call&lt;br /&gt;
&lt;br /&gt;
 mTestEffect.ToDestroy = true; // Making sure to set the effect to no longer being alive&lt;br /&gt;
&lt;br /&gt;
so that the particle manager knows that it can clean up the effect.&lt;br /&gt;
&lt;br /&gt;
===Create a New Particle Effect===&lt;br /&gt;
&lt;br /&gt;
To create a new particle effect, start up the TACParticleEditor program. In this program there are two windows, one containing a windows form displaying information about the current particle effect, and the other displaying the particle effect.&lt;br /&gt;
&lt;br /&gt;
There are four main areas of the particle editor form:&lt;br /&gt;
&lt;br /&gt;
 List of emitters - The list of all the emitters in the particle effect.&lt;br /&gt;
&lt;br /&gt;
 Emitter type - Contains all the different types of emitters that exist in the particle engine.&lt;br /&gt;
&lt;br /&gt;
 Row of buttons - Each having a functionality expected from their name:&lt;br /&gt;
 &lt;br /&gt;
  Add - Adds an emitter of the chosen type from the list of emitter types to the particle effect&amp;#039;s emitter list.&lt;br /&gt;
 &lt;br /&gt;
  Remove - Removes the currently selected emitter in the particle effect&amp;#039;s emitter list from the list. &lt;br /&gt;
 &lt;br /&gt;
  Save - Saves the current particle effect to a specified .particle xml file.&lt;br /&gt;
 &lt;br /&gt;
  Load - Loads a particle effect from a selected .particle xml file.&lt;br /&gt;
&lt;br /&gt;
 Emitter Info Grid - Contains all the information that can be modified for whatever emitter in the list of emitters is currently selected.&lt;br /&gt;
&lt;br /&gt;
The modifiable parameters of the emitters are as follows:&lt;br /&gt;
&lt;br /&gt;
 For all emitters:&lt;br /&gt;
 &lt;br /&gt;
  textureName - The file path name of the texture to render the particles with. In order to load texture names in correctly, there &lt;br /&gt;
  must exist a texture folder in the current project&amp;#039;s compiled content folder. The default starting directory is the TACParticleEditor. &lt;br /&gt;
  Whenever a new particle effect is loaded in, the current directory is then switched to that project&amp;#039;s content directory. Anytime a new &lt;br /&gt;
  texture is desired, it must manually be added into the appropriate project.&lt;br /&gt;
 &lt;br /&gt;
  blendEffect - The sprite blend to use when rendering the particles. Can be either None, AlphaBlend, or Additive.&lt;br /&gt;
  The various blend modes work as follows:&lt;br /&gt;
    &lt;br /&gt;
    None - every particle draws exactly as how the texture appears and no alpha values are used. Therefore there will be no transparency.&lt;br /&gt;
    For visual purposes it is highly suggested to not use this mode.&lt;br /&gt;
    &lt;br /&gt;
    AlphaBlend - Averages all of the particles alpha values up to the max value assigned to any particle. This effect is useful in creating&lt;br /&gt;
    effects such as dust, smoke, or gas clouds.&lt;br /&gt;
    &lt;br /&gt;
    Additive - Sums up the colors of all the particles to the maximum value of 1.0 for all values (r,g,b, and a). This effect is useful&lt;br /&gt;
    in creating effects such as fire, lasers, or shields.&lt;br /&gt;
  &lt;br /&gt;
  emitLifetime - The duration of time the emitter continues to emit new particles for in seconds. This can be any duration of time. A negative&lt;br /&gt;
  value denotes that the emitter never dies.&lt;br /&gt;
 &lt;br /&gt;
  particlesPerSec - The amount of particles that are created every second. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleAmount - The total amount of particles that can appear on screen at one time. This can be any nonzero positive integer.&lt;br /&gt;
 &lt;br /&gt;
  particleLifetime - The amount of time a particle lives for in seconds. This can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minStartSpeed - The slowest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSpeed - The fastest possible speed at which a particle can start moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minEndSpeed - The slowest possible speed at which a particle can end moving . This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSpeed - The fastest possible speed at which a particle can end moving. This can be any number, since a negative value just means&lt;br /&gt;
  that the particle will move in the opposite direction.&lt;br /&gt;
 &lt;br /&gt;
  minStartColor - The minimum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxStartColor - The maximum color values that a particle can start at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minEndColor - The minimum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  maxEndColor - The maximum color values that a particle can end at in r,g,b,a form (i.e. red, green, blue, alpha). These values can be any&lt;br /&gt;
  number between 0.0 and 1.0. &lt;br /&gt;
 &lt;br /&gt;
  minstartSize - The smallest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxStartSize - The largest size that a particle can start at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  minEndSize - The smallest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  maxEndSize - The largest size that a particle can end at in width,height form. These values can be any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
  isActive - Whether or not the emitter is currently spawning/updating/drawing particles. You can quickly activate all emitters &lt;br /&gt;
  of the loaded/created particle effect by hitting enter while having focus on the particle effect visualization window.&lt;br /&gt;
&lt;br /&gt;
 For directional emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  minVel - The minimum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  maxVel - The maximum velocity direction in which particles can move at in x,y,z form (aka a 3-dimensional vector going outward from the &lt;br /&gt;
  position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
					&lt;br /&gt;
 For point emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
&lt;br /&gt;
 For spline emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The positions at/between which particles will spawn in x,y,z form (aka list of 3-dimensional points). These values can be &lt;br /&gt;
  any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  scale - The amount of scaling that occurs every time the spline emitter is scaled, that is to say, how much all positions &lt;br /&gt;
  close in/expand from the origin (0,0,0) before any position offset is applied essentially creating an explosion or implosion &lt;br /&gt;
  effect. This value can be any nonzero positive number. 1.5 represents 150% current size, 0.5 represents 50% current size, etc.&lt;br /&gt;
 &lt;br /&gt;
  scaleSpeed - How quickly the scaling occurs in seconds. This can be any nonzero positive number. 1 is a scaling occurs once every second,&lt;br /&gt;
  0.5 is a scaling occurs every half second, etc.&lt;br /&gt;
&lt;br /&gt;
 For spray emitters:&lt;br /&gt;
 &lt;br /&gt;
  positions - The position in which particles will spawn in x,y,z form (aka a 3-dimensional point). These values can be any number.&lt;br /&gt;
 &lt;br /&gt;
  direction - The velocity direction in which particles will move in x,y,z form (aka a 3-dimensional point). (aka a 3-dimensional vector &lt;br /&gt;
  going outward from the position point). These numbers can range from -1.0 to 1.0.&lt;br /&gt;
 &lt;br /&gt;
  sprayRange - The area in which particles can spawn with the center at the set position in +/-x,+/-y,+/-z form. That is to say a cubic area&lt;br /&gt;
  with dimensions width, height, and depth and its origin at the given position. These values be any nonzero positive number.&lt;br /&gt;
&lt;br /&gt;
====Quick Reference Table====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Parameter&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Parameter type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Unit type&amp;#039;&amp;#039;&amp;#039;           &amp;#039;&amp;#039;&amp;#039;Range&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;For all emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 textureName         String                   N/A                 Any valid path name works.&lt;br /&gt;
 blendEffect         SpriteBlendMode          N/A                 None, AlphaBlend, or Additive.&lt;br /&gt;
 emitLifetime        floating-point           Seconds             Any value. Negative value denotes emitter never dies.&lt;br /&gt;
 particlesPerSec     integer                  Per Second          Any nonzero positive number.&lt;br /&gt;
 particleAmount      integer                  N/A                 Any nonzero positive number.&lt;br /&gt;
 particleLifetime    floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 minStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxStartSpeed       floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 minEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 maxEndSpeed         floating-point           Arbitrary           Any number. Negative value denotes movement in opposite direction.&lt;br /&gt;
 isActive            boolean                  N/A                 True or False.&lt;br /&gt;
 minVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 maxVel              (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 positions           (x,y,z) vector           Arbitrary           Any number.&lt;br /&gt;
 direction           (x,y,z) vector           Arbitrary           Any number within -1.0 to 1.0.&lt;br /&gt;
 &amp;#039;&amp;#039;For spline emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 scale               floating-point           % of size           Any nonzero positive number. &amp;lt; 1 denotes decrease, &amp;gt; 1 denotes increase.&lt;br /&gt;
 scaleSpeed          floating-point           Seconds             Any nonzero positive number.&lt;br /&gt;
 &amp;#039;&amp;#039;For spray emitters:&amp;#039;&amp;#039;&lt;br /&gt;
 sprayRange          (width,height,depth)     Arbitrary           Any nonzero positive number.&lt;br /&gt;
 &lt;br /&gt;
 *Note that all arbitrary values are based on the current camera space.&lt;br /&gt;
&lt;br /&gt;
==Keep Score and Give Resources to the Simulator Mode==&lt;br /&gt;
&lt;br /&gt;
Use the ScoreCard class to keep track of the score from a minigame. It provides easy ways to add and subtract resources, as well as an easy way to display them and pass them along to the Colony Simulator.&lt;br /&gt;
&lt;br /&gt;
MiniGame has a ColonyScoreCard built into it, accessible by the Score property. Here are some examples of how to use it:&lt;br /&gt;
&lt;br /&gt;
 class MyGame : MiniGame&lt;br /&gt;
 {&lt;br /&gt;
   public override void Update(ContentManager content)&lt;br /&gt;
   {&lt;br /&gt;
     Score.Gather(ColonyResources.Money, 500);    // Get 500 Monies&lt;br /&gt;
     &lt;br /&gt;
     MyGameObject mgo = new MyGameObject();&lt;br /&gt;
     mgo.GiveMyGameCarbon();                      // Get 1 Carbon&lt;br /&gt;
 &lt;br /&gt;
     Score.IncurDamageCost(100);                  // On CashOut, Money = Max (Money - DamageCosts, 0)&lt;br /&gt;
 &lt;br /&gt;
     int HowMuchMoneyIHave = Score.QueryResource(ColonyResources.Money);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   public void DisplayTheScore()&lt;br /&gt;
   {&lt;br /&gt;
     bool playerWonTheMinigame = true;            // Can be set to false if the player lost&lt;br /&gt;
     Score.Display(playerWonTheMinigame );        // Displays a copy of the current score and a message for succses/failure&lt;br /&gt;
     Score.CashOut();                             // Transfers resources from MyGame to the Colony Simulator&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 class MyGameObject : Entity&lt;br /&gt;
 {&lt;br /&gt;
   public void GiveMyGameCarbon()&lt;br /&gt;
   {&lt;br /&gt;
     ColonyBaseApplication.MiniGame.Score.Gather(ColonyResources.Carbon, 1);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**Note: The code provided here is very subject to change as this section is under development.&lt;br /&gt;
&lt;br /&gt;
==Write to the Experimental Log==&lt;br /&gt;
&lt;br /&gt;
As the game runs, certain actions are recorded and written to a file (LogFiles\ExperimentalLog.txt or as specified). In the lab, these codes are also sent through the parallel port to sync the EEG data. Every action that pertains to an experiment must be logged in order to be analyzed (that&amp;#039;s kind of the whole point of this game!).&lt;br /&gt;
&lt;br /&gt;
First define the necessary game codes. This is done to ensure consistency across each Mini game.&lt;br /&gt;
&lt;br /&gt;
* Open EventCodes.cs, or wherever you store the enum for your project.&lt;br /&gt;
* Codes in the range 1 - 255 are valid and can be written out to the parallel port.&lt;br /&gt;
** The name of the code should be chosen at your convenience, and may be included to make the text log file more readable.&lt;br /&gt;
* Codes may be assigned outside of this range, both positive and negative; These codes may be used in the same way, but will only be logged to the text log file.&lt;br /&gt;
** Codes in the negative range are considered to be debug codes, and can be omitted from the resulted log file by setting the writeDebugEvents property on the logger.&lt;br /&gt;
&lt;br /&gt;
Now those codes are available for logging. Like so:&lt;br /&gt;
&lt;br /&gt;
 Logger logger = new Logger(&amp;quot;ExampleLogFile.txt&amp;quot;);&lt;br /&gt;
 logger.LogCode( (int)Minigame.EventCode.WeaponFiredEvent, &amp;quot;The weapon was fired.&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
It is also possible to tell the logger to log a code every time a specific key is pressed:&lt;br /&gt;
&lt;br /&gt;
 InputHandler inputHandler = new InputHandler(true);&lt;br /&gt;
 inputHandler.writeToParallel = true;&lt;br /&gt;
 inputHandler.Bind(Keys.A, InputHandler.Trigger.Pressed, (int)Minigame.Eventcode.PressedAEvent);&lt;br /&gt;
&lt;br /&gt;
These assigned events are local to each InputHandler object, so assigning your events will not interact with the events of other mini games.&lt;br /&gt;
&lt;br /&gt;
Every minigame should also start with its GameBegin and end with its GameEnd[Success/Failure] codes.&lt;br /&gt;
&lt;br /&gt;
It may be helpful to log events for debugging purposes. These codes should have an identifier such as &amp;quot;DEBUG_&amp;quot; and will not be logged unless writeDebugEvents is set to true on the logger. (writeDebugEvents is only true by default when the game is running in Debug mode.) All new DEBUG tags must be explicitly assigned a value less than 0.&lt;br /&gt;
&lt;br /&gt;
==Use the Game Script==&lt;br /&gt;
*Note: The LUA scripts are not universally compatible and have been known to crash on some machines. It is highly recommended that C# scripts are used.&lt;br /&gt;
&lt;br /&gt;
The tAC_Engine houses a [[http://www.lua.org/ Lua]] Virtual Machine. This can be used to tweak global parameters at runtime, load them from config files, drive cutscenes, or even save and load levels.&lt;br /&gt;
&lt;br /&gt;
Function callbacks are defined in C# and then invoked from a Lua file or the in-game Debug console. In other words, C# tells Lua &amp;quot;you may use these functions: X,Y,...&amp;quot; and then Lua says &amp;quot;do X, do Y, etc.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here are a couple of ways to leverage this system:&lt;br /&gt;
&lt;br /&gt;
===Make a Cutscene===&lt;br /&gt;
&lt;br /&gt;
* Create a new lua file in the Scripts directory&lt;br /&gt;
** That file can call any registered function callbacks&lt;br /&gt;
* In the Properties window, set Copy to Output Directory to Copy if Newer&lt;br /&gt;
* Call that cutscene with:&lt;br /&gt;
 GenericBaseApplication.GameManager.PlayCutscene(@&amp;quot;Scripts\MyCutscene.lua&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
===To Register a Function Callback===&lt;br /&gt;
&lt;br /&gt;
* Create the function in C# (if the function does not already exist)&lt;br /&gt;
** It must be declared public and non-static&lt;br /&gt;
** If the need arises to register a static function, declare an instanced function in GenericLuaHelper or ColonyLuaHelper that simply calls the static function.&lt;br /&gt;
* Register the function with the Lua Virtual Machine&lt;br /&gt;
** Add the special LuaCallback annotation to the function&lt;br /&gt;
* Call the RegisterLuaCallbacks function in the class&amp;#039;s constructor that contains the function.&lt;br /&gt;
* Example:&lt;br /&gt;
 public MyClass()&lt;br /&gt;
 {  // Constructor&lt;br /&gt;
   LuaHelper.RegisterLuaCallbacks(this);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [LuaCallback(&amp;quot;SetMyVariable&amp;quot;)]&lt;br /&gt;
 public int SetMyVariable(int value)&lt;br /&gt;
 {&lt;br /&gt;
   mMyVariable = value;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Tweak Game Parameters===&lt;br /&gt;
&lt;br /&gt;
Exposing a variable to the Lua Virtual Machine allows it to be accessed by a any script (including config files) or changed at runtime in the drop down console (accessible in Debug mode by hitting &amp;quot;~&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
* Expose a variable with a global setter/getter with a LuaCallback annotation&lt;br /&gt;
** Make sure to call the RegisterLuaCallbacks function in that class&amp;#039;s constructor if the getter/setter is not in the Game Manager&lt;br /&gt;
* Set the default value for the variable in the config file (optional)&lt;br /&gt;
** There are 3 config files for the 3 configurations of the game builds&lt;br /&gt;
*** Debug.conf, for development&lt;br /&gt;
*** StandardRelease.conf, for public releases of the game&lt;br /&gt;
*** LabRelease.conf, for use in the lab&lt;br /&gt;
&lt;br /&gt;
===Create Local Settings===&lt;br /&gt;
&lt;br /&gt;
Programmers may want to change certain properties on their machines without affecting the source-controlled code. They could change the resolution, sound settings, or even have the game bypass the regular startup sequence and launch right into the middle of a MiniGame all with no effect on other developers.&lt;br /&gt;
&lt;br /&gt;
* Create a new file: Autism Collaborative\Game\Game\Scripts\LocalSettings.lua&lt;br /&gt;
** The Visual Studio project already has this file included, but VS won&amp;#039;t be able to edit it until the file is created manually&lt;br /&gt;
* Add Lua commands and save the file&lt;br /&gt;
** Visual Studio can now be used to edit the file&lt;br /&gt;
* The file is run at the end of the Debug.conf script (if it exists)&lt;br /&gt;
** That means that this script is only run in Debug mode&lt;br /&gt;
* do &amp;#039;&amp;#039;&amp;#039;NOT&amp;#039;&amp;#039;&amp;#039; add LocalSettings.lua to source control!&lt;br /&gt;
&lt;br /&gt;
===Creating Scripts in C# Code===&lt;br /&gt;
&lt;br /&gt;
Alternatively, scripts can created using C# code rather than Lua. A C# script either be object oriented or imperative. They are able to both take in objects and return values. The CSharpHelper class can be called to run these scripts using its DoSimpleFile method. This will simply run all the code in the script. The value of this is that commonly edited code, such as configuration files, can be saved in a convenient separate location. The methods for CSharpHelper are well documented within the file itself. An example of a basic call to a C# script is as follows:&lt;br /&gt;
&lt;br /&gt;
 CSharpHelper.doSimpleFile(Environment.CurrentDirectory + @&amp;quot;\Configs\Debug.confcss&amp;quot;, this, &amp;quot;game&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This starts a C# file called &amp;quot;Debug.confcss&amp;quot; which is located in the Configs directory. The second parameter is a Game object. The object passed in can be of any type. The third parameter is the identifier of the object within the script. In this case the identifier is &amp;quot;game&amp;quot;. This means that inside the script, lines such as:&lt;br /&gt;
&lt;br /&gt;
 game.Update();&lt;br /&gt;
&lt;br /&gt;
will execute the passed-in object&amp;#039;s Update function.&lt;br /&gt;
&lt;br /&gt;
==Run the Game in the Lab==&lt;br /&gt;
&lt;br /&gt;
The only difference between the lab and the home versions of the game is the config file that is used. This can be manually edited before the build is made of the program. The program will automatically use the LabConfig.config file if it exists, otherwise it will use Default.config. To run the program in the lab, simply make sure the LabConfig.config file is present.&lt;br /&gt;
&lt;br /&gt;
==Publish the Installer==&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
===Create the Installer===&lt;br /&gt;
&lt;br /&gt;
We use InnoSetup to create the installer. Checkout their website (http://www.jrsoftware.org/isinfo.php) if you need to change the script, but simply publishing the game does not require any adjustment to the installer script.&lt;br /&gt;
&lt;br /&gt;
* Install InnoSetup if necessary&lt;br /&gt;
** Run Autism Collaborative\Utilities\Installer Installer\isetup-5.2.2.exe&lt;br /&gt;
* Compile the game&lt;br /&gt;
** In the second menu bar (immediately below the top menu bar) within Visual Studio, change &amp;quot;Debug&amp;quot; to &amp;quot;ReleasePub&amp;quot; or &amp;quot;ReleaseLab&amp;quot;.  (In the box to the right, leave the default &amp;quot;Mixed Platforms&amp;quot;.)  &lt;br /&gt;
*** ReleasePub is for our releases to the general public. This will usually be the correct configuration.&lt;br /&gt;
*** ReleaseLab is for builds to be used in the lab. This will create the config file to run the game in &amp;quot;lab mode.&amp;quot; The resulting exe file will actually be the same as ReleasePub, but constd.tac will be replaced with conlab.tac.&lt;br /&gt;
*** Debug mode is used while developing, so do not build the game in debug mode when creating the installer.&lt;br /&gt;
*** For the exact effects of the different build configurations on the game flow, unit stats, etc. see the config files in Autism Collaborative\Game\Game\Configs&lt;br /&gt;
** Goto Build-&amp;gt;Build Solution&lt;br /&gt;
* Compile the installer script&lt;br /&gt;
** Open Autism Collaborative\Game\Game\Installer.iss with InnoSetup&lt;br /&gt;
** Goto Build-&amp;gt;Compile&lt;br /&gt;
** Goto Run-&amp;gt;Run&lt;br /&gt;
*** This creates the file Autism Collaborative\Game\Game\Output\tAC_Installer.exe&lt;br /&gt;
&lt;br /&gt;
===Upload the Installer to the Web===&lt;br /&gt;
&lt;br /&gt;
* Get a username/password for autismcollaborative.org from Matthew.&lt;br /&gt;
* Use a secure FTP client to login, such as WinSCP&lt;br /&gt;
** Either download it or run Autism Collaborative\Utilities\WinSCP.exe&lt;br /&gt;
* Login to autismcollaborative.org (port 22)&lt;br /&gt;
* Upload tAC_Installer.exe to your home directory (for example /home/zinsser)&lt;br /&gt;
** Do not overwrite the existing installer (/home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe) since that would delete the installer from the website until the new installer finishes uploading (usually over an hour!)&lt;br /&gt;
* Once the upload is complete, enter the command &amp;quot;mv /home/zinsser/tAC_Installer.exe /home/belmonte/autismcollaborative.org/downloads/AstropolisSetup.exe&amp;quot; (you may have to open a terminal first, depending on your SFTP client)&lt;br /&gt;
** In the above command, substitute your username for &amp;quot;zinsser&amp;quot;, but keep &amp;quot;belmonte&amp;quot; as the destination user directory&lt;br /&gt;
** If there is a permissions problem, contact Matthew to make sure your user has permission to the autismcollaborative.org directory!&lt;br /&gt;
&lt;br /&gt;
==Use the ErrorLog==&lt;br /&gt;
&lt;br /&gt;
*Note: This section is in development and subject to change.&lt;br /&gt;
&lt;br /&gt;
When the game encounters an Unhandled Exception (like when an end user runs into a bug in our code), useful information is dumped to ErrorLog.txt. The user is encouraged to email that file to us so we can locate the problem they ran into. Although the ErrorLog will tell us what function the program died in, it cannot tell us specifically which line was the culprit (although ErrorLogs created when the game is running in Visual Studio will tell us exactly which line!).&lt;br /&gt;
&lt;br /&gt;
We do, however, have the ability to log any custom information from a MiniGame. This may prove invaluable in debugging based on end-user error reports. All you (the programmer) must do is override the string MiniGame.DebugInfo() function. When ErrorLog.txt is created, it calls that function on the current MiniGame and appends the returned text to the bottom of the file.&lt;br /&gt;
&lt;br /&gt;
==Testing Procedure==&lt;br /&gt;
&lt;br /&gt;
This is a list of recommended tests to be performed on a regular basis to ensure that the major functionality of the program is intact.&lt;br /&gt;
&lt;br /&gt;
Meteor Madness&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Text does not run off screen&lt;br /&gt;
**Dialog boxes wait for spacebar to be pressed before disappearing&lt;br /&gt;
**On space drift tutorial, input is registered correctly&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Collision detection is correct&lt;br /&gt;
**Phases are in the correct order&lt;br /&gt;
**Dot coherence phase looks correct . Dots are the correct size and dot correlation fits with PEST data. Look for any slowdown and loss of frames.&lt;br /&gt;
**Boss fight is correct. Boss takes damage and causes the player damage.&lt;br /&gt;
**Player Health is displayed correctly upon taking damage.&lt;br /&gt;
&lt;br /&gt;
Colony Sim&lt;br /&gt;
&lt;br /&gt;
*Check GUI&lt;br /&gt;
Things to Note:&lt;br /&gt;
**Each button is clickable and causes the appropriate event to occur.&lt;br /&gt;
**Make sure you can not click through things&lt;br /&gt;
**Select each type of building and make sure the pop up info is appropriate&lt;br /&gt;
&lt;br /&gt;
*Check building placement&lt;br /&gt;
**Place each type of building&lt;br /&gt;
**Connect a mining building to a factory through a tube&lt;br /&gt;
**Connect a residential building to a factory through a road&lt;br /&gt;
**Once this is done, resources should increase.&lt;br /&gt;
&lt;br /&gt;
**Connect a residential building to a commercial building&lt;br /&gt;
**Once this is done, players money should start increasing&lt;br /&gt;
&lt;br /&gt;
**Check the building log to make sure the build order is correct&lt;br /&gt;
&lt;br /&gt;
*Check that minigames can be accessed&lt;br /&gt;
**Attempt to play each minigame through the colony sim, executing all of their tests and checkin their appropriate logs&lt;br /&gt;
&lt;br /&gt;
Stellar Prospector&lt;br /&gt;
&lt;br /&gt;
*Play through tutorial&lt;br /&gt;
Things to Note:&lt;br /&gt;
*Make sure event codes are properly logged.&lt;br /&gt;
**Tasks match up with the specified text.&lt;br /&gt;
**Text does not run off screen.&lt;br /&gt;
**Input events still work when prompted for them.&lt;br /&gt;
**Automated events such as energy drain and automatic grab still work.&lt;br /&gt;
**Tutorial returns to main screen after ending.&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;br /&gt;
**Player does not get locked in game by still being able to exit out through game menu if ESC was pressed.&lt;br /&gt;
&lt;br /&gt;
*Play through main game&lt;br /&gt;
Things to note:&lt;br /&gt;
**Make sure event codes are properly logged.&lt;br /&gt;
**Make sure input works correctly&lt;br /&gt;
**Phase changes occur correctly and at the right times.&lt;br /&gt;
**Energy draining and filling works correctly.&lt;br /&gt;
**Pause menu works correctly&lt;br /&gt;
**Game ends once energy bar is filled and when it has, returns to main menu&lt;br /&gt;
**Make sure all graphical effects work correctly, i.e tractor beam, explosion, and flickering.&lt;/div&gt;</summary>
		<author><name>Belmonte</name></author>	</entry>

	</feed>