Press SPACE to reset the simulation,.
GREEN bits are the growth impulses,. they regenerate the PURPLE wood,. the wood slowly dies or is eaten by the RED mites,. the YELLOW door is a warp portal for the mites,. this is used to keep the structure centered, it jumps to the furthest structure point from the center, and the mites periodically warp through it, helping keep them distributed.
I will do some graphic/sound work on this later,. . just posting for fun, as I thought it was interesting.
It grew out of an experiment to have an object move to the edge of an underlaying object and then stop,. (using built in collisions!) I was frustrated at first getting this to work, but it eventualy came to me,. here is the basis of it;
Code: Select all
ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<Model Name="o_stayon2" Category="1" CollisionBounds="1 0 0 0" CollisionStyle="4">
<Definitions>
<DefineVariable Name="sensor" Type="1"/>
</Definitions>
<OnUpdate>
<Condition Comment="if on 2" Expression="return sensor;">
<OnTrue>
<ZExpression Comment="movements"/>
</OnTrue>
<OnFalse>
<RemoveModel Comment="moved off 2"/>
</OnFalse>
</Condition>
<ZExpression Comment="sensor reset" Expression="sensor=0;"/>
</OnUpdate>
<OnSpawn>
<ZExpression Expression="sensor=1;"/>
</OnSpawn>
<OnCollision>
<ZExpression Comment="sense" Expression="sensor=1;"/>
</OnCollision>
</Model>
