Posts

Showing posts with the label Terrarium2

Adventures in F# - A port of the simplest Herbivore

Following the past of my previous post, this time I present a barebones stripped-down version of the Herbivore that ships with the Terrarium SDK. The code is will equip you with a compilable herbivore, which however does nothing but sit in your terrarium. Just like in the previous post, I did not strip out some of the inline comments, which may be helpful to some of us. So here comes the code ... namespace CBHerbivore #light #r "E:\\Development\\my fsharp\\Terrarium\\Terrarium\\OrganismBase.dll" open System;; open System.Drawing;; open System.Collections;; open System.IO;; open OrganismBase;; //Sample Herbivore //The following Assembly attributes must be applied to each //Organism Assembly [<assembly: OrganismClass("CBHerbivore.CBHerbivore")>] //The class that derives from Animal [<assembly: AuthorInformation("Christian Bitter", "x@y.z")>] //It's an herbivore [<CarnivoreAttribute(false)>] //This value must be between ...

Adventures in F# - A Plant for Terrarium 2

Recently, my beloved Terrarium-game has reappeared from the neatherworlds of software. As some of you may know, Terrarium's intend was to showcase the back then rather new and exciting .NET platform version 1.x (not that it is not still exciting). Although from a gamer's perspective, the graphics weren't all to great, from a technology standpoint, it featured great things, such as Webservices, Reflection, etc. At some point Terrarium ceased to exist, which was a shame, since the community was quite active developing plants, herbivores and carnivores for the virtual ecosystem that Terrarium simulates. I for myself, developed some simple creatures too (a simple decision-based/state-based agent), as part of a project I did during university for my AI course. More advanced (in comparison to my creature) could be imported showcasing great AI stuff such as A*, neural networks, planning, etc. However, in an community effort, Terrarium was relaunched lately on codeplex and will hop...