<p>terra is a <strong>super customizable</strong> framework for creating and analyzing biological simulations. It's open-source and licenced under MIT.</p>
<p>terra is still in Alpha version, which means...</p>
<h2id="usage">Usage</h2>
<p>To get started, we'll create a simple creature using the creatureFactory. Each creature requires a type and a color.</p>
<pre>creatureFactory.register({
type: 'firstCreature',
color: [220, 85, 79]
});</pre>
<p>This creature is valid, but it's just inheriting the default behaviours. To make a more interesting creature, let's override some of the default <adata-scrollhref="#options">options</a> and <adata-scrollhref="#methods">methods</a>.</p>
<pre>creatureFactory.register({
type: 'secondCreature',
color: [41, 128, 185],
metabolism: 1,
sustainability: 3,
reproduceLv: 0.60,
etc...
});</pre>
<p>We've just created a creature that will ____.</p>
<p>To run a simulation, we'll need to create an environment. Let's make a 25x25 grid and populate 40% of the space with our first creature and 20% with our second.</p>
<h3id="gol">Conway's Game of Life <aclass="question"target="_blank"href="http://en.wikipedia.org/wiki/Conway's_Game_of_Life">?</a></h3>
<p>terra can also run cellular automata. </p>
<pre><code>
</code></pre>
<h2id="options">Options</h2>
<p>The following options can be passed in an object to creatureFactory.register( ) as the first argument.</p>
<h3>Required</h3>
<ul>
<li>(string) type: </li>
</ul>
<h3>Optional</h3>
<ul>
<li>(array) color: </li>
<li>(int) initialEnergy: </li>
<li>(int) maxEnergy: </li>
<li>(int) metabolism: </li>
<li>(int) size: </li>
<li>(int) speed: </li>
<li>(int) vision: </li>
<li>(int) sustainability: 2</li>
<li>(float) reproduceLv: 0.70</li>
<li>(float) moveLv: 0.20</li>
<li>(char) character: </li>
</ul>
<h2id="methods">Methods</h2>
<ul>
<li>queue</li>
<li>reproduce</li>
<li>move</li>
<li>wait</li>
<li>isDead</li>
<li>boundEnergy</li>
</ul>
<h2id="events">Events</h2>
<ul>
<li>finished</li>
</ul>
</div>
<footer>Created with ❤ by <ahref="http://rileyjshaw.com">rileyjshaw</a>. Inspired by <ahref="http://eloquentjavascript.net/">Marijn Haverbeke</a> and <ahref="https://www.wolframscience.com/">Stephen Wolfram</a>.</footer>