Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed May 7, 2015
1 parent c22dcaf commit 25eb880
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
19 changes: 11 additions & 8 deletions docs/unity/multi-machine.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,21 +281,24 @@ <h2 id="command-line-arguments">Command Line Arguments</h2>
</li>
</ul>
<h2 id="custom-command-line-arguments">Custom Command Line Arguments</h2>
<p>If you look in the sample above in <code>LevelSettings.cs</code> you can see some code like this</p>
<p>If you look in the sample above in <code>Assets/HappyFunTimes/Scripts/LevelSettings.cs</code> you can see
some code like this</p>
<pre><code>void Awake()
{
...
ArgParser p = new ArgParser();
p.TryGet&lt;int&gt;(&quot;num-games&quot;, ref numGames);
...
}
</code></pre><p>Create an <code>ArgParser</code> and then use it to read any commmand line argumest you want. The sample
above uses &quot;--num-games&quot; to allow an infinite number of games but of course if you are designing
a specific game with a specific number of machines you&#39;d need to set that as you&#39;d probably
hard code the game ids for your specific setup.</p>
<p>On the other hand a common argument might be which level to load or which part of a larger
level to view. If you had a 3d installation where each monitor was like a portal into 3d
space your arguments might be the position, target and field of view for the camera, etc...</p>
</code></pre><p>Feel free to change that script to meet your needs. If you&#39;d like to get command line arguments
somewhere else create an <code>ArgParser</code> and then use it to read any commmand line arguments you want. The sample
above uses &quot;--num-games&quot; to allow an infinite number of games. If you are designing
a specific game with a specific number of machines you probably wouldn&#39;t need a <code>numGames</code>
setting at all as you&#39;d probably hard code game ids for your specific setup.</p>
<p>On the other hand a common command line argument you might need would be which level to load or
which part of a larger level to view. If you had a 3d installation where each monitor was
like a portal into 3d space your arguments might be the position, target and field of view
for the camera, etc...</p>

<hr/>
<div>
Expand Down
19 changes: 11 additions & 8 deletions docs/unity/multi-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ The `--hft-id`, `--hft-url` and `--hft-master` are all handled by HappyFunTimes

## Custom Command Line Arguments

If you look in the sample above in `LevelSettings.cs` you can see some code like this
If you look in the sample above in `Assets/HappyFunTimes/Scripts/LevelSettings.cs` you can see
some code like this

void Awake()
{
Expand All @@ -273,14 +274,16 @@ If you look in the sample above in `LevelSettings.cs` you can see some code like
...
}

Create an `ArgParser` and then use it to read any commmand line argumest you want. The sample
above uses "--num-games" to allow an infinite number of games but of course if you are designing
a specific game with a specific number of machines you'd need to set that as you'd probably
hard code the game ids for your specific setup.
Feel free to change that script to meet your needs. If you'd like to get command line arguments
somewhere else create an `ArgParser` and then use it to read any commmand line arguments you want. The sample
above uses "--num-games" to allow an infinite number of games. If you are designing
a specific game with a specific number of machines you probably wouldn't need a `numGames`
setting at all as you'd probably hard code game ids for your specific setup.

On the other hand a common argument might be which level to load or which part of a larger
level to view. If you had a 3d installation where each monitor was like a portal into 3d
space your arguments might be the position, target and field of view for the camera, etc...
On the other hand a common command line argument you might need would be which level to load or
which part of a larger level to view. If you had a 3d installation where each monitor was
like a portal into 3d space your arguments might be the position, target and field of view
for the camera, etc...



Expand Down

0 comments on commit 25eb880

Please sign in to comment.