tag:blogger.com,1999:blog-89248013193051209622024-02-07T09:17:48.037-08:00SimTreeErichttp://www.blogger.com/profile/18173976265309670517noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-8924801319305120962.post-35076906107461860972013-05-11T14:09:00.003-07:002013-05-11T14:09:42.123-07:00Real-Life<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/LICDb8nM5rs?feature=player_embedded' frameborder='0'></iframe></div>
This is real tomatoes growing. Notice the growth from the Top with thickening of the base. Most plant growth occurs at the <a href="http://en.wikipedia.org/wiki/Meristem">Meristem</a>(wiki).<br />
<br />
Plant growth is way more exciting in fast motion. Hence the 30 second day night cycles in game!Erichttp://www.blogger.com/profile/18173976265309670517noreply@blogger.com0tag:blogger.com,1999:blog-8924801319305120962.post-84180099764330180032013-05-09T13:18:00.001-07:002013-05-09T13:21:00.333-07:00Ultimate Goals<b>Plant Life</b> should become a Sim-Tree game in which you live through the Life of a plant, growing and acquiring resources to grow. Upon reaching sexual maturity, you can produce a flower/fruit to move on to the next generation. In-between generations, you will be able to spend earned Credits on plant upgrades such as solar efficiency, water efficiency, branch carrying capacities, and roots water gathering abilities. Credits should also be able to purchase Plant-Add-Ons such as thorns and specialty structures like "Potatoes", bulbs, and Insect-Repelling-Lasers which will serve as Water or Sugar storage tanks, or defensive/offensive plant weaponry. <br />
<div>
<br /></div>
<div>
As you upgrade your plant with each successive generation, you can shape what kind of plant you become. A giant Sequoia would need massive Water Carrying capacities to pump water from the roots to leaves 100 meters up while a low lying thorny vine may survive by spreading along the ground. </div>
<div>
<br /></div>
<div>
As for gameplay, each round starts as a Seedling with a certain amount of stored nutrients. Using these nutrients you have to grow faster than your neighbors in order to capture sunlight and have room for your roots before being shaded out and left to die. Once you have established your seedling, your goal becomes reaching adulthood. Properly growing and trimming your plant for maximum efficiency. Late game will be supplying your flowers/fruit with their massive energy requirements in order to produce the next generation. The better your generation, the more upgrades you can buy for your offspring. I may add an In-Game purchase of these credits for casual gamers to Fast-Track it to Domination, but the goal of the game should be incrementally making a Imaginary plant in the way you want it!</div>
<div>
<br /></div>
<div>
tl;dr Plant based RPG/Tokyo Jungle</div>
Erichttp://www.blogger.com/profile/18173976265309670517noreply@blogger.com0tag:blogger.com,1999:blog-8924801319305120962.post-77549649054383737822013-05-08T14:01:00.001-07:002013-05-08T14:01:09.372-07:00Pulse Function OverviewThe game consists of a series of Nodes composed of a Mesh Renderer, a Collider, 2 LineRenderers, and a Script specific to the cell type.<br />
<br />
When a Node is created, it "Checks-Into" a "Game Manager" Script present in the scene. The game manager controls the flow of time by calling my own Update() method called "Pulse()". The "Pulse" originates in the Stem at Depth 0 and gets called in order of construction on each subsequent depth of nodes. <br />
<br />
<br />
Roots<--Stem ---> Branches<br />
4 - 3 - 2 - 1 - 0 - 1 - 2 - 3 - 4<br />
/ \<br />
4 - 3 4 - 5 - 6<br />
<br />
Here is an Example "Pulse" Function from a branch<br />
<br />
<br />
<span style="background-color: #cccccc; font-size: x-small;">public void Pulse () </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;">{ </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"> DeterminePublicFillLevel (); // Determines fill Percentage of nutrients before Pulse</span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (Parent) </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>CellMaintinance (); // Uses 1 ATP and/or breaks a sugar into 31 more ATP</span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (CellIsPowered) { // If a cell has ATP </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (myLevel < desiredLevel) { </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>RequestUpgrade (); // Cells Manage their queued </span><span style="background-color: #cccccc; font-size: x-small;">upgrading </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>} </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>ExternalWork (); // If cell has power, Perform Diffusion and Active Transport of Nutrients</span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>} else { </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>CallForHelp (); // If Cell is not powered, Request supplies from neighbors and Downgrade to stay alive</span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (myLevel > desiredLevel) { </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>RequestDowngrade ();</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>DiffuseNutrientFront (0); // Even if the cell is Unpowered, water will still diffuse Forwards(Up) </span><span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>DeterminePublicFillLevel (); //Determine Fill Percentages after turn for other cells to View</span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>UpdateVisuals (); // Update all visual aspects of cells activities during this turn</span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;">}</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><br /></span>
A cell will attempt to "Average" its nutrients with its neighbors during DiffuseNutrientsFront/Back() while constrained by certain Maximum outgoing and incoming bandwidths determined by each node individually.<br />
<br />
<br />
<span style="background-color: #cccccc; font-size: x-small;">public void DiffuseNutrientBack (int index)</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>{ </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (Parent) { // Parent is the Node that created this node</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>GeneralCell f = Parent; // cache the Parent node(also standardizes Front/Back code as "f")</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (PublicFillLevel [index] > f.PublicFillLevel [index]) { // Averageing is done on wighted averages as percentages of maximum capacities</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>float Average = (PublicFillLevel [index] + f.PublicFillLevel [index]) / 2.0f;</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>float NewTarget = Nutrients [index] - ((float)Capacities [index] * Average); // the Delta(difference) is calculated</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>float delta = Mathf.Abs (NewTarget);</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>amountsRequested [index] += delta;</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>delta = Mathf.Min (Mathf.Min (delta, OutGoingBandwidths [index]), f.IncomingBandwidths [index]);//Delta is adjusted to be no larger than the outgoing or incoming bandwidths of the sender and reciever</span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>sendResources (index, f, delta*.8f);<span class="Apple-tab-span" style="white-space: pre;"> </span>//80 percent of the calculated exchange is sent.(helps stabilize simulation not to always send everything)</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><span style="background-color: #cccccc; font-size: x-small;"> </span><br />
<span style="background-color: #cccccc; font-size: x-small;"><br /></span>
<span style="font-size: large;"><span style="background-color: white;">As always a link to the Freshest Version of Simulation:</span></span><br />
<span style="color: lime; font-size: x-large;"><span style="background-color: white;"><a href="http://airbearstudio.blogspot.com/">GAME</a></span></span><br />
<br />
Erichttp://www.blogger.com/profile/18173976265309670517noreply@blogger.com0tag:blogger.com,1999:blog-8924801319305120962.post-67218715630444877102013-05-07T22:06:00.001-07:002013-05-16T14:00:33.194-07:00Current Version of Game<b>Instructions</b>: Grow your plant however you want. Currently just a TOY! <br />
<b>Controls</b>: WASD moves camera, Click a LimbNode to view its stats and Upgrade/GrowLimbs from it<br />
<b>Speed Controls</b> on the LEFT control flow of time. Calculations are complete in any speed!<br />
If your branches are showing <b>Blue or Green</b> it means they<b> NEED</b> <b>Water </b>or <b>Sugar</b> respectively. If they are Normal Brown, they are fully stocked!<br />
<br />
<b>TIP</b>: Your plant should fully refill with water during the Night and Convert that water to Sugar in the leaves during the Day! It is a daily back and forth of Nutrients! <br />
<br />
<b>TIP</b>: 1 Sugar = 31 E(ATP) A cell that runs out of ATP will downgrade, Cashing in Structure to maintain Energy. When it reaches level 0 again it dies.<br />
<br />
-Changelog May10:<br />
-Leaves now "track the Sun" by adjusting their angle to its while in it!<br />
-Branches and roots now auto level up till lvl 40, however, their branch widths have been reduced to account for the higher average levels<br />
-Roots Water Generation is now tied to their "depth"(how many Nodes away from the stem they are)/5<br />
-The Day/Night cycle has been standardized to 200 Pulse Cycles meaning a root with 1 H20 generation will make 200 water in 1 day, and each living cell will consume 200/31 = 7ish Sugars per day. Standardizing the Number of Pulses per day was nessesary to properly Balance the game. Now I can work with set Totals as opposed to complicated ratios<br />
------------------------------------------------------------------------------------------------------------<br />
-ChangeLog May 11:<br />
-Began Adding Tree-Wide stat tracking. Now in the top right you can see your Maximum Water production per "Pulse" as well as actual Sugar produced last "Pulse". Now, it takes 6 water to make 1 sugar(6CO2+6H20 + Sunlight = Sugar)(Photosynthesis 101), but max production matters because at night photosynthesis shuts off and respiration takes over. ps, 1 Sugar = 31 ATP + 1 Water<br />
<div style="text-align: center;">
---Probably no work done for the next day due to Mothers Day---</div>
<div style="text-align: center;">
<div style="text-align: left;">
ChangeLog May 16th:</div>
<div style="text-align: left;">
-Changed the Camera Movement, now zooms in when you click a node, zooms out when you click off of a node. Needs tweeking further, but gives the game a nice feel.</div>
<div style="text-align: left;">
-Fixed some bugs and Reduced code base ALOT. Removed "Downleveling" to be replaced by eventual "Wither and die" </div>
<div style="text-align: left;">
-Leafs now have an image... </div>
</div>
<br />
<br />
<iframe height="800" src="https://dl.dropboxusercontent.com/u/7953296/TreeWeb.html" width="1000"> </iframe>
Erichttp://www.blogger.com/profile/18173976265309670517noreply@blogger.com0tag:blogger.com,1999:blog-8924801319305120962.post-6681693368550332152013-05-07T21:34:00.001-07:002013-05-07T22:28:28.308-07:001: May 7th 2013<b>Plant-Life</b> is a Simulation-Game being developed for Android and iOs. Its Development will be as carefully blogged as I can manage with Nightly/Weekly updates to the Web-Player as long as Mouse Input continues to function.<br />
<br />
Once mouse-input is replaced by Touch, the free Alpha will move channels to Android's Play Store.<br />
<br />
Plant-Life is being developed by me; A recent UW graduate with too much time on my hands! Feedback is welcome through the comments, and I am always looking for ideas for improvement!
Please check out my previous (and First Ever) game <u><b>GenEric Platformer</b></u> for Android! It is Free, but there is a $1.50 Donation-Version that really helps me out! It has a .04% donation rate! Find it here: <a href="https://play.google.com/store/apps/details?id=com.GenericStudios.GenericPlatformerPro&feature=more_from_developer#?t=W251bGwsMSwyLDEwMiwiY29tLkdlbmVyaWNTdHVkaW9zLkdlbmVyaWNQbGF0Zm9ybWVyUHJvIl0.">Play Store Listing</a>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju6WfCWEr_ub7V5PZuxQdFrjvfxf42mp4j8BIwo8IJiBGS-bJ9shh0WuOwIRE_iqfLdnpkTJYYzQ2MtowbQae6YOzjgz_ceYEUUdOF3dQoPvvM1KnWYUiLXUSXJhwjyeg8idIzQPmX2i4/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju6WfCWEr_ub7V5PZuxQdFrjvfxf42mp4j8BIwo8IJiBGS-bJ9shh0WuOwIRE_iqfLdnpkTJYYzQ2MtowbQae6YOzjgz_ceYEUUdOF3dQoPvvM1KnWYUiLXUSXJhwjyeg8idIzQPmX2i4/s320/Screenshot.png" width="320" /></a></div>
And now, a link to the game!<br />
<h2>
<a href="http://airbearstudio.blogspot.com/2013/05/current-version-of-game.html"><span style="color: lime; font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-large;">Game</span></a></h2>
Erichttp://www.blogger.com/profile/18173976265309670517noreply@blogger.com0