├── Library ├── ShaderCache.db ├── TagManager.asset ├── AssetServerCacheV3 ├── AudioManager.asset ├── CurrentLayout.dwlt ├── InputManager.asset ├── TimeManager.asset ├── DynamicsManager.asset ├── NetworkManager.asset ├── ProjectSettings.asset ├── QualitySettings.asset ├── CurrentMaximizeLayout.dwlt └── EditorBuildSettings.asset ├── Assets ├── Scenes │ ├── Main.unity │ └── Main.unity.meta ├── Plugins │ ├── LitJson │ │ ├── LitJson.dll │ │ └── LitJson.dll.meta │ └── LitJson.meta ├── Resources │ ├── Textures │ │ ├── grid.jpg │ │ ├── marker.png │ │ ├── grid.jpg.meta │ │ └── marker.png.meta │ ├── Materials │ │ ├── font.mat │ │ ├── grid.mat │ │ ├── Foodbit.mat │ │ ├── mouth_vector.mat │ │ ├── font.mat.meta │ │ ├── genital_vector.mat │ │ ├── grid.mat.meta │ │ ├── Foodbit.mat.meta │ │ ├── genital_vector.mat.meta │ │ └── mouth_vector.mat.meta │ ├── Prefabs │ │ ├── Ether.prefab │ │ ├── Plane.prefab │ │ ├── Energy.prefab │ │ ├── Foodbit.prefab │ │ ├── Aperatus.prefab │ │ ├── UI │ │ │ ├── Selection.prefab │ │ │ └── Selection.prefab.meta │ │ ├── Ether.prefab.meta │ │ ├── Plane.prefab.meta │ │ ├── Aperatus.prefab.meta │ │ ├── Energy.prefab.meta │ │ ├── Foodbit.prefab.meta │ │ └── UI.meta │ ├── Materials.meta │ ├── Prefabs.meta │ ├── Textures.meta │ ├── Physics Materials.meta │ └── Physics Materials │ │ ├── Creature.physicmaterial │ │ └── Creature.physicmaterial.meta ├── settings.json.meta ├── Plugins.meta ├── Scenes.meta ├── Scripts.meta ├── Resources.meta ├── Scripts │ ├── GUI.meta │ ├── Util.meta │ ├── Creature.meta │ ├── Genetics.meta │ ├── Environment.meta │ ├── Main.cs.meta │ ├── Creature │ │ ├── Eye.cs.meta │ │ ├── Limb.cs.meta │ │ ├── Root.cs.meta │ │ ├── Creature.cs.meta │ │ ├── Genitalia.cs.meta │ │ ├── Mouth.cs.meta │ │ ├── Limb.cs │ │ ├── Root.cs │ │ ├── Mouth.cs │ │ ├── Genitalia.cs │ │ ├── Eye.cs │ │ └── Creature.cs │ ├── GUI │ │ ├── CameraCtl.cs.meta │ │ ├── DeltaTime.cs.meta │ │ ├── MenuItem.cs.meta │ │ ├── Timer.cs.meta │ │ ├── CreatureCount.cs.meta │ │ ├── CreatureWindow.cs.meta │ │ ├── EtherEnergy.cs.meta │ │ ├── FoodbitCount.cs.meta │ │ ├── TotalEnergy.cs.meta │ │ ├── ToggleCreatureWindowButton.cs.meta │ │ ├── ToggleCreatureWindowButton.cs │ │ ├── ToolsButton.cs │ │ ├── Siminfo.cs.meta │ │ ├── CreatureList.cs.meta │ │ ├── CreaturePane.cs.meta │ │ ├── ToolsButton.cs.meta │ │ ├── ToolsPanel.cs.meta │ │ ├── UIElement.cs.meta │ │ ├── ImportCreature.cs.meta │ │ ├── LoadChromosome.cs.meta │ │ ├── Timer.cs │ │ ├── Siminfo.cs │ │ ├── ToolsPanel.cs │ │ ├── CreatureWindow.cs │ │ ├── DeltaTime.cs │ │ ├── MenuItem.cs │ │ ├── TotalEnergy.cs │ │ ├── FoodbitCount.cs │ │ ├── EtherEnergy.cs │ │ ├── LoadChromosome.cs │ │ ├── CreatureCount.cs │ │ ├── UIElement.cs │ │ ├── CreatureList.cs │ │ ├── CameraCtl.cs │ │ ├── CreaturePane.cs │ │ └── ImportCreature.cs │ ├── Util │ │ ├── Event.cs.meta │ │ ├── Logger.cs.meta │ │ ├── Settings.cs.meta │ │ ├── Utility.cs.meta │ │ ├── Selection.cs.meta │ │ ├── CollisionMediator.cs.meta │ │ ├── Data.cs.meta │ │ ├── SaveCreature.cs.meta │ │ ├── CreatureInfoContainer.cs.meta │ │ ├── Event.cs │ │ ├── Settings.cs │ │ ├── CreatureInfoContainer.cs │ │ ├── Selection.cs │ │ ├── Data.cs │ │ ├── Utility.cs │ │ ├── Logger.cs │ │ ├── CollisionMediator.cs │ │ └── SaveCreature.cs │ ├── Environment │ │ ├── Catch.cs.meta │ │ ├── Ether.cs.meta │ │ ├── Foodbit.cs.meta │ │ ├── Spawner.cs.meta │ │ ├── Catch.cs │ │ ├── Foodbit.cs │ │ ├── Spawner.cs │ │ └── Ether.cs │ ├── Genetics │ │ ├── Chromosome.cs.meta │ │ ├── GeneticsMain.cs.meta │ │ ├── GeneticsUtils.cs.meta │ │ ├── Chromosome.cs │ │ ├── GeneticsMain.cs │ │ └── GeneticsUtils.cs │ └── Main.cs └── settings.json ├── ProjectSettings ├── TagManager.asset ├── InputManager.asset ├── TimeManager.asset ├── DynamicsManager.asset ├── ProjectSettings.asset ├── QualitySettings.asset ├── GraphicsSettings.asset ├── Physics2DSettings.asset ├── UnityAdsSettings.asset ├── ClusterInputManager.asset ├── EditorBuildSettings.asset └── UnityConnectSettings.asset ├── .gitignore ├── README.md └── README.txt /Library/ShaderCache.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/ShaderCache.db -------------------------------------------------------------------------------- /Assets/Scenes/Main.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Scenes/Main.unity -------------------------------------------------------------------------------- /Library/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/TagManager.asset -------------------------------------------------------------------------------- /Library/AssetServerCacheV3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/AssetServerCacheV3 -------------------------------------------------------------------------------- /Library/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/AudioManager.asset -------------------------------------------------------------------------------- /Library/CurrentLayout.dwlt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/CurrentLayout.dwlt -------------------------------------------------------------------------------- /Library/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/InputManager.asset -------------------------------------------------------------------------------- /Library/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/TimeManager.asset -------------------------------------------------------------------------------- /Library/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/DynamicsManager.asset -------------------------------------------------------------------------------- /Library/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/NetworkManager.asset -------------------------------------------------------------------------------- /Library/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/ProjectSettings.asset -------------------------------------------------------------------------------- /Library/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /Assets/Plugins/LitJson/LitJson.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Plugins/LitJson/LitJson.dll -------------------------------------------------------------------------------- /Assets/Resources/Textures/grid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Textures/grid.jpg -------------------------------------------------------------------------------- /Library/CurrentMaximizeLayout.dwlt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/CurrentMaximizeLayout.dwlt -------------------------------------------------------------------------------- /Library/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Library/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /Assets/Resources/Materials/font.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Materials/font.mat -------------------------------------------------------------------------------- /Assets/Resources/Materials/grid.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Materials/grid.mat -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Ether.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Prefabs/Ether.prefab -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Plane.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Prefabs/Plane.prefab -------------------------------------------------------------------------------- /Assets/Resources/Textures/marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Textures/marker.png -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /Assets/Resources/Materials/Foodbit.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Materials/Foodbit.mat -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Energy.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Prefabs/Energy.prefab -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Foodbit.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Prefabs/Foodbit.prefab -------------------------------------------------------------------------------- /Assets/Scenes/Main.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fc0c355223b7db41ad371b0345660a4 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Aperatus.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Prefabs/Aperatus.prefab -------------------------------------------------------------------------------- /Assets/settings.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb89d7c6f1e5f5d46961779c0ffe7e80 3 | TextScriptImporter: 4 | userData: 5 | 6 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /Assets/Resources/Materials/mouth_vector.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Materials/mouth_vector.mat -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/UI/Selection.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Prefabs/UI/Selection.prefab -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efcec120e0bea764c96799bb2742ecd8 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | 7 | -------------------------------------------------------------------------------- /Assets/Resources/Materials/font.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26420f96611fc3440ad323eced5a0215 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Resources/Materials/genital_vector.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Materials/genital_vector.mat -------------------------------------------------------------------------------- /Assets/Resources/Materials/grid.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72eaf25c77dd3d5458f31bd51e3e1402 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Ether.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bfbe65cb96ce65d41b01a54ee3c10954 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Plane.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed49d0190ac4044408fd3ac4c5b0521b 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8205cc247931b324b878b9fc94c3d77a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | 7 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8677d3792c698f41ab22abfd6c54e8a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | 7 | -------------------------------------------------------------------------------- /Assets/Plugins/LitJson.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64d565b9c7145e34fa799bf3f29f956c 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca4ee977104c39f44a6a564993a1971e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | 7 | -------------------------------------------------------------------------------- /Assets/Resources/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f488eb2294bc9994599e65364686bfb0 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Resources/Materials/Foodbit.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92bc3db3bce8fa14697d5b3114daaf86 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ce8a3305f9acac4dab52f87592c0edd 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Aperatus.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8cb6cf445eb4c5499eb479178ff67c4 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Energy.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a689205c1aef254daef7a50c2dd381e 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/Foodbit.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fca6576629c10e9428dd969501f4d065 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Resources/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 726bf21f1f03f954bb09b39f8855ffe5 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94c41f43546026841a97fda374b633d3 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | 7 | -------------------------------------------------------------------------------- /Assets/Scripts/Util.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4866ba433a88455499eb7bc51562ef71 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | 7 | -------------------------------------------------------------------------------- /Assets/Resources/Materials/genital_vector.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea5ef244fa383834999f891b732a2aee 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Resources/Materials/mouth_vector.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d70be01d6df3c64428272d8c28021eac 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b8a4a528ec3307408fe94a8406027bf 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | 7 | -------------------------------------------------------------------------------- /Assets/Scripts/Genetics.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b39bb8f91b54a040b414c0c0cc5ac92 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | 7 | -------------------------------------------------------------------------------- /Assets/Resources/Physics Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a00e84edce284f4d9f8983ca64b4431 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Scripts/Environment.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9245918026b6c84d8f120e245ce6c72 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | 7 | -------------------------------------------------------------------------------- /Assets/Resources/Physics Materials/Creature.physicmaterial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clomax/evosim-prototype/HEAD/Assets/Resources/Physics Materials/Creature.physicmaterial -------------------------------------------------------------------------------- /Assets/Resources/Physics Materials/Creature.physicmaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3c64ce54b165164a8f74b87f0c19644 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Scripts/Main.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b3c336ca02deb7479a42aabfe7c9134 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/UI/Selection.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68314b93986e0864cab136c61cea08de 3 | timeCreated: 1453977725 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature/Eye.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d449362ca834a7408f3ec0fd8bdcccf 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature/Limb.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b5f33445e3c23b468ed0c2a1ea49405 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature/Root.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5fd50f7fc6ed3b4db6e0c0ac66aaf3d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/CameraCtl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba0ecf9e8f7f8d44a86a874652e88f3a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/DeltaTime.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f6e075fbd38db6478953520114bca45 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/MenuItem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb1b647f73afcff44b9ccf1f3bbee6a0 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/Timer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22013edf43a60ea40a1a7090cdc24cf3 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Event.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99e0b8e169f988b4dbcf16dda281fb68 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Logger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b184610ed928d3d468b54b39890d75d9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Settings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b30872aa1ad6bc145be57a261a1a4891 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Utility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3907406b082cd9148b131e75ddff4917 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature/Creature.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7170b5e5c60c8e4681e37198c27c143 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature/Genitalia.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c7dee007f963b14f9803da0ca2c8bd8 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature/Mouth.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7844c23810fbac649968f20b608f86d1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Environment/Catch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bd889379e0e7cc44a558defdfcc5dde 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Environment/Ether.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66589fa947e5e7c4cbca64360b901ce4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/CreatureCount.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdd46de7e30d7d1428042b66b69bcbf1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/CreatureWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8a5e53bb7d0c6e48ab5e92fb1d1c975 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/EtherEnergy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8938868001697e049bff740478afeea2 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/FoodbitCount.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d35c6d5bdd3f85a4e9397ad2dc421681 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/TotalEnergy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d07e4bafeb8be1d4a8310bab29b568c6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Selection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2d5135c9feb82743a1f47b44087a0d7 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Resources/Prefabs/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a1950e37f4c1404082ee99f6c6ec780 3 | folderAsset: yes 4 | timeCreated: 1453939609 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Environment/Foodbit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0bb94cdc6c79eaa40ac994717a7e3960 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Environment/Spawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c4cb046b4ff3444a999ce97e3ad24ed 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Genetics/Chromosome.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2df87bd26cdcce14d9ba18a1a7507620 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Genetics/GeneticsMain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ebc01d7387044c4ba2fa69a55dad3ca 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Genetics/GeneticsUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e241f1c6562655a4482c88911447f69a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/CollisionMediator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6675f682e28c76744abba9e3f547c0f9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/ToggleCreatureWindowButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5c58c9a530daa64c980ba7a6be9cc88 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/ToggleCreatureWindowButton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class ToggleCreatureWindowButton : MonoBehaviour { 5 | 6 | public void TogglePanel (GameObject panel) { 7 | panel.SetActive(!panel.activeSelf); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/ToolsButton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using LitJson; 3 | using System.Collections; 4 | 5 | public class ToolsButton : MonoBehaviour 6 | { 7 | public UIElement ui_element; 8 | 9 | public void OnClick () 10 | { 11 | ui_element.ToggleVisibility(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/Siminfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 062b846ec2943bf43adaaa98cabcd7ec 3 | timeCreated: 1453902429 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Data.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 243b2003db1ee3348be855caa9ba75c0 3 | timeCreated: 1454149547 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/CreatureList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60a261c8ff1f9c641882ee600dd3f1ec 3 | timeCreated: 1454080707 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/CreaturePane.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d98b2dfb1e7d817418f9df87d64dbaf8 3 | timeCreated: 1453892763 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/ToolsButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09c4cce9444025d47a65a1ec9f9097fc 3 | timeCreated: 1453935016 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/ToolsPanel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05dff263dea896a4cb78d3353124b108 3 | timeCreated: 1453933511 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/UIElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a62e28ec66b72c4caf92039c33bd708 3 | timeCreated: 1453891441 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/ImportCreature.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a582e3765c28e9540a55da7d13b77be9 3 | timeCreated: 1453938352 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/LoadChromosome.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46b42a29b47a3964baf0916841c49a2f 3 | timeCreated: 1453983210 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/SaveCreature.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 658d2620a23e5ee45aee8ad39fb2e25e 3 | timeCreated: 1453920803 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/CreatureInfoContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77dd81b132b4c7d4189c97f807d1617b 3 | timeCreated: 1454170562 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/Timer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class Timer : MonoBehaviour { 6 | 7 | public Text text; 8 | 9 | void Update () { 10 | text.text = "Time: " + Time.timeSinceLevelLoad.ToString("F2"); 11 | } 12 | 13 | void OnPostRender () { 14 | GL.Begin(GL.LINES); 15 | GL.End(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/Siminfo.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class Siminfo : MonoBehaviour { 5 | 6 | public UIElement ui_element; 7 | 8 | void Start () 9 | { 10 | ui_element = GetComponent(); 11 | } 12 | 13 | void Update () { 14 | if(Input.GetKeyUp(KeyCode.F1)) 15 | { 16 | ui_element.ToggleVisibility(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/ToolsPanel.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class ToolsPanel : MonoBehaviour 5 | { 6 | public UIElement ui_element; 7 | 8 | void Start() 9 | { 10 | ui_element = GetComponent(); 11 | } 12 | 13 | void Update() 14 | { 15 | if (Input.GetKeyUp(KeyCode.F2)) 16 | { 17 | ui_element.ToggleVisibility(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/CreatureWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class CreatureWindow: MonoBehaviour { 5 | 6 | private Rect windowRect = new Rect(15,15,250,250); 7 | 8 | void OnGUI () { 9 | windowRect = GUI.Window (0, windowRect, WindowFunction, "Creature"); 10 | } 11 | 12 | void WindowFunction (int WindowID) { 13 | GUI.Label (new Rect(20,20,100,50), "Creature Window"); 14 | GUI.DragWindow (new Rect (0,0,100,100)); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/DeltaTime.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class DeltaTime : MonoBehaviour 6 | { 7 | public Text text; 8 | char delta = '\u0394'; 9 | 10 | // Use this for initialization 11 | void Start () 12 | { 13 | InvokeRepeating("printDeltaTime", 0F, 0.5F); 14 | } 15 | 16 | void printDeltaTime () 17 | { 18 | text.text = delta +"T: " + Time.deltaTime.ToString("0.000"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/MenuItem.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class MenuItem : MonoBehaviour { 5 | 6 | void OnMouseEnter () { 7 | GetComponent().material.color = Color.green; 8 | } 9 | 10 | void OnMouseExit () { 11 | GetComponent().material.color = Color.white; 12 | } 13 | 14 | void OnMouseUp () { 15 | switch (gameObject.name) { 16 | case "Quit": Application.Quit(); break; 17 | case "Start": Application.LoadLevel(1); break; 18 | } 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Assets/Plugins/LitJson/LitJson.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57ed64b1c75101047af090bba31b51ac 3 | PluginImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | isPreloaded: 0 8 | platformData: 9 | Any: 10 | enabled: 1 11 | settings: {} 12 | Editor: 13 | enabled: 0 14 | settings: 15 | DefaultValueInitialized: true 16 | WindowsStoreApps: 17 | enabled: 0 18 | settings: 19 | CPU: AnyCPU 20 | userData: 21 | assetBundleName: 22 | assetBundleVariant: 23 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Event.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | /* 5 | * Author: Craig Lomax 6 | * Date: 06.09.2011 7 | * URL: clomax.me.uk 8 | * email: craig@clomax.me.uk 9 | * 10 | */ 11 | 12 | public class CollEvent { 13 | private GameObject a; 14 | private GameObject b; 15 | 16 | public CollEvent (GameObject a, GameObject b) { 17 | this.a = a; 18 | this.b = b; 19 | } 20 | 21 | public GameObject[] getColliders() { 22 | GameObject[] evt = new GameObject[2]; 23 | evt[0] = this.a; 24 | evt[1] = this.b; 25 | return evt; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/TotalEnergy.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class TotalEnergy : MonoBehaviour 6 | { 7 | Text text; 8 | 9 | void Start() 10 | { 11 | text = GetComponent(); 12 | } 13 | 14 | void OnEnable() 15 | { 16 | Ether.EnergyInitialised += OnStarted; 17 | } 18 | 19 | void OnDisable() 20 | { 21 | Ether.EnergyInitialised -= OnStarted; 22 | } 23 | 24 | void OnStarted(decimal n) 25 | { 26 | text.text = "Total energy: " + n.ToString("0"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assets/Scripts/Environment/Catch.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | 5 | /* 6 | * Author: Craig Lomax 7 | * Date: 06.09.2011 8 | * URL: clomax.me.uk 9 | * email: craig@clomax.me.uk 10 | * 11 | */ 12 | 13 | 14 | public class Catch : MonoBehaviour { 15 | 16 | Ether eth; 17 | Creature crt; 18 | 19 | void OnTriggerEnter (Collider col) { 20 | eth = GameObject.Find("Ether").GetComponent(); 21 | if (col.gameObject.name == "root") { 22 | crt = col.transform.parent.gameObject.GetComponent(); 23 | crt.kill(); 24 | } 25 | } 26 | 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/FoodbitCount.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class FoodbitCount : MonoBehaviour 6 | { 7 | Text text; 8 | 9 | void Start () 10 | { 11 | text = GetComponent(); 12 | } 13 | 14 | void OnEnable () 15 | { 16 | Ether.FoodbitsUpdated += OnUpdated; 17 | } 18 | 19 | void OnDisable() 20 | { 21 | Ether.FoodbitsUpdated -= OnUpdated; 22 | } 23 | 24 | void OnUpdated(int count) 25 | { 26 | text.text = "Foodbits: " + count; 27 | } 28 | 29 | void Update () { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/EtherEnergy.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | /* 6 | * Author: Craig Lomax 7 | * Date: 31.08.2011 8 | * URL: clomax.me.uk 9 | * email: craig@clomax.me.uk 10 | * 11 | */ 12 | 13 | public class EtherEnergy : MonoBehaviour 14 | { 15 | Text text; 16 | 17 | void Start () 18 | { 19 | text = GetComponent(); 20 | } 21 | 22 | void OnEnable () 23 | { 24 | Ether.EnergyUpdated += OnUpdated; 25 | } 26 | 27 | void OnDisable() 28 | { 29 | Ether.EnergyUpdated -= OnUpdated; 30 | } 31 | 32 | void OnUpdated (decimal n) 33 | { 34 | text.text = "Ether energy: " + n.ToString("0.0"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Settings.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.IO; 4 | using LitJson; 5 | 6 | public class Settings : MonoBehaviour { 7 | 8 | string settings_file = "settings.json"; 9 | StreamReader sr; 10 | string raw_contents; 11 | public JsonData contents; 12 | 13 | public static GameObject container; 14 | public static Settings instance; 15 | 16 | public Settings () { 17 | sr = new StreamReader(Application.dataPath + "/" + settings_file); 18 | raw_contents = sr.ReadToEnd(); 19 | contents = JsonMapper.ToObject(raw_contents); 20 | sr.Close(); 21 | } 22 | 23 | public static Settings getInstance () { 24 | if(!instance) { 25 | container = new GameObject(); 26 | container.name = "Settings"; 27 | instance = container.AddComponent(typeof(Settings)) as Settings; 28 | } 29 | return instance; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | 3 | *.tmproj 4 | *.pidb 5 | *.sln 6 | *.userprefs 7 | *.csproj 8 | *.unityproj 9 | *.exe 10 | *.pdb 11 | 12 | AnnotationManager 13 | assetDatabase3 14 | AssetImportState 15 | assetservercachev3 16 | AssetVersioning.db 17 | AudioManager.asset 18 | BuildPlayer.prefs 19 | BuildSettings.asset 20 | EditorSettings.asset 21 | EditorUserBuildSettings.asset 22 | expandedItems 23 | FailedAssetImports.txt 24 | guidmapper 25 | InspectorExpandedItems.asset 26 | MonoManager.asset 27 | NetworkManager.asset 28 | ScriptMapper 29 | 30 | cache/* 31 | builds/* 32 | Temp/* 33 | metadata/* 34 | ScriptAssemblies/* 35 | previews/* 36 | Assets/Logs/* 37 | Assets/data/* 38 | evosim_Data/* 39 | ProjectSettings/NavMeshLayers.asset 40 | Library/* 41 | ProjectSettings/NavMeshAreas.asset 42 | ProjectSettings/ProjectVersion.txt 43 | Assets/data.meta 44 | Assets/settings.json.orig 45 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature/Limb.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class Limb : MonoBehaviour { 5 | 6 | HingeJoint hj; 7 | public Color original_colour; 8 | 9 | void Start () { 10 | tag = "Creature"; 11 | } 12 | 13 | public Vector3 getPosition () { 14 | return transform.localPosition; 15 | } 16 | 17 | public Vector3 getScale () { 18 | return transform.localScale; 19 | } 20 | 21 | public void setColour (Color c) { 22 | original_colour = c; 23 | gameObject.GetComponent().material.shader = Shader.Find("Legacy Shaders/Diffuse"); 24 | gameObject.GetComponent().material.color = c; 25 | } 26 | 27 | public void setPosition (Vector3 p) { 28 | transform.localPosition = p; 29 | } 30 | 31 | public void setScale (Vector3 s) { 32 | transform.localScale = s; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/CreatureInfoContainer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class CreatureInfoContainer : MonoBehaviour 6 | { 7 | public static CreatureInfoContainer instance; 8 | public static GameObject container; 9 | public SortedList creatures; 10 | 11 | public static CreatureInfoContainer getInstance () 12 | { 13 | if (!instance) 14 | { 15 | container = new GameObject(); 16 | container.name = "CreatureInfo"; 17 | instance = container.AddComponent(); 18 | } 19 | return instance; 20 | } 21 | 22 | void Start () 23 | { 24 | creatures = new SortedList(); 25 | } 26 | 27 | public void Add(string name, Chromosome c) 28 | { 29 | creatures.Add(name, c); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/LoadChromosome.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class LoadChromosome : MonoBehaviour 5 | { 6 | public Chromosome c; 7 | public UIElement parent; 8 | 9 | Settings s; 10 | 11 | decimal init_energy; 12 | 13 | void Start () 14 | { 15 | s = Settings.getInstance(); 16 | init_energy = decimal.Parse(s.contents["creature"]["init_energy"].ToString()); 17 | } 18 | 19 | public void OnClick () 20 | { 21 | Ether eth = Ether.getInstance(); 22 | eth.spawner.spawn( 23 | Camera.main.transform.position + new Vector3(0, 0, 10), 24 | Utility.RandomRotVec(), 25 | init_energy, 26 | c 27 | ); 28 | Ether.getInstance().subtractEnergy(init_energy); 29 | parent.make_invisible(); 30 | GetComponentInParent().DepopulateMenu(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/CreatureCount.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class CreatureCount : MonoBehaviour 6 | { 7 | public int number_of_creatures; 8 | Text text; 9 | 10 | void Start () 11 | { 12 | number_of_creatures = 0; 13 | text = GetComponent(); 14 | } 15 | 16 | void OnEnable () 17 | { 18 | Spawner.CreatureSpawned += OnSpawn; 19 | Creature.CreatureDead += OnDeath; 20 | } 21 | 22 | void OnDisable() 23 | { 24 | Spawner.CreatureSpawned -= OnSpawn; 25 | Creature.CreatureDead += OnDeath; 26 | } 27 | 28 | void OnSpawn (Creature _x) 29 | { 30 | number_of_creatures += 1; 31 | } 32 | 33 | void OnDeath (Creature _x) 34 | { 35 | number_of_creatures -= 1; 36 | } 37 | 38 | void Update () { 39 | text.text = "Creatures: " + number_of_creatures; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Evosim 2 | #####A three-dimensional, real time simulation of natural selection. 3 | 4 | [Download executable from itch.io](http://rlomax.itch.io/evosim) 5 | 6 | This is a proof of concept with the intention of testing how capable today's consumer computing power is simulating artificial genepools, which are likely to contain many 3D rigidbodies. 7 | 8 | ##### Usage 9 | It is recommended to make sure that you have checked out to the `develop` branch since `master` is likely to be out of date. 10 | 11 | Clone this repository and open the directory as an existing project in Unity3D, open the scene named 'Main' and make sure that the script named 'Main' is attached to the GameObject named 'Main' in the hierarchy. 12 | 13 | #### Licence 14 | Evosim by Craig Lomax is licensed under a [Creative Commons 15 | Attribution-NonCommercial-ShareAlike 4.0 International 16 | License](http://creativecommons.org/licenses/by-nc-sa/4.0/). 17 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature/Root.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class Root : MonoBehaviour { 5 | 6 | Transform _t; 7 | 8 | public Creature crt; 9 | public GameObject eye; 10 | public GameObject mouth; 11 | public GameObject genital; 12 | 13 | public MeshRenderer mr; 14 | public Material mt; 15 | 16 | public Color original_colour; 17 | 18 | void Start () { 19 | _t = transform; 20 | 21 | mr = gameObject.GetComponent(); 22 | 23 | crt = _t.parent.gameObject.GetComponent(); 24 | eye = crt.eye; 25 | mouth = crt.mouth; 26 | genital = crt.genital; 27 | 28 | tag = "Creature"; 29 | } 30 | 31 | public void setColour (Color c) { 32 | original_colour = c; 33 | mr = gameObject.GetComponent(); 34 | mr.material.shader = Shader.Find("Legacy Shaders/Diffuse"); 35 | mr.material.color = c; 36 | } 37 | 38 | public void setScale (Vector3 scale) { 39 | transform.localScale = scale; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Assets/Scripts/Environment/Foodbit.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | /* 5 | * Author: Craig Lomax 6 | * Date: 31.08.2011 7 | * URL: clomax.me.uk 8 | * email: craig@clomax.me.uk 9 | * 10 | */ 11 | 12 | public class Foodbit : MonoBehaviour 13 | { 14 | public static float foodbitHeight = 1.0F; 15 | 16 | Settings settings; 17 | Ether eth; 18 | MeshRenderer mr; 19 | 20 | public decimal energy; 21 | float decay_amount; 22 | float destroy_at; 23 | float decay_time; 24 | float decay_rate; 25 | 26 | void Start () 27 | { 28 | name = "Foodbit"; 29 | settings = Settings.getInstance(); 30 | 31 | eth = Ether.getInstance(); 32 | 33 | mr = GetComponent(); 34 | mr.sharedMaterial = (Material)Resources.Load("Materials/Foodbit"); 35 | 36 | Collider co = GetComponent(); 37 | co.isTrigger = true; 38 | } 39 | 40 | public void destroy () 41 | { 42 | eth.removeFoodbit(this.gameObject); 43 | Destroy(gameObject); 44 | } 45 | 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/UIElement.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class UIElement : MonoBehaviour { 5 | 6 | public bool visible = false; 7 | public bool passive; 8 | 9 | void Start () 10 | { 11 | if (visible) 12 | make_visible(); 13 | else 14 | make_invisible(); 15 | } 16 | 17 | public void ToggleVisibility() 18 | { 19 | if (!visible) 20 | { 21 | make_visible(); 22 | } 23 | else 24 | { 25 | make_invisible(); 26 | } 27 | } 28 | 29 | public void make_invisible() 30 | { 31 | CanvasGroup cg = GetComponent(); 32 | cg.interactable = false; 33 | cg.blocksRaycasts = false; 34 | cg.alpha = 0; 35 | visible = false; 36 | } 37 | 38 | public void make_visible() 39 | { 40 | CanvasGroup cg = GetComponent(); 41 | cg.interactable = true; 42 | if(!passive) 43 | cg.blocksRaycasts = true; 44 | cg.alpha = 1; 45 | visible = true; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Assets/Resources/Textures/grid.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26ed01f7531a13d4aba49cdf47e561fd 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | spriteMode: 0 34 | spriteExtrude: 1 35 | spriteMeshType: 1 36 | alignment: 0 37 | spritePivot: {x: .5, y: .5} 38 | spritePixelsToUnits: 100 39 | alphaIsTransparency: 0 40 | textureType: -1 41 | buildTargetSettings: [] 42 | spriteSheet: 43 | sprites: [] 44 | spritePackingTag: 45 | userData: 46 | -------------------------------------------------------------------------------- /Assets/Resources/Textures/marker.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 963982c7eb600e746ba3fb91b6e0e2b4 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: -1 29 | mipBias: -1 30 | wrapMode: -1 31 | nPOTScale: 1 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 0 42 | textureType: -1 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/Scripts/Environment/Spawner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class Spawner : MonoBehaviour 5 | { 6 | #pragma warning disable 0414 7 | public static Spawner instance; 8 | Logger lg; 9 | Data d; 10 | CreatureCount crt_count; 11 | Ether eth; 12 | GameObject crt; 13 | static GameObject container; 14 | Vector3 pos; 15 | #pragma warning restore 0414 16 | 17 | public delegate void Crt(Creature c); 18 | public static event Crt CreatureSpawned; 19 | 20 | void Start () 21 | { 22 | lg = Logger.getInstance(); 23 | d = Data.getInstance(); 24 | crt_count = GameObject.Find("CreatureCount").GetComponent(); 25 | eth = Ether.getInstance(); 26 | } 27 | 28 | public static Spawner getInstance () 29 | { 30 | if(!instance) 31 | { 32 | container = new GameObject(); 33 | container.name = "Spawner"; 34 | instance = container.AddComponent(typeof(Spawner)) as Spawner; 35 | } 36 | return instance; 37 | } 38 | 39 | public void spawn (Vector3 pos, Vector3 rot, decimal energy, Chromosome chromosome) 40 | { 41 | GameObject child = new GameObject(); 42 | child.transform.localPosition = pos; 43 | child.transform.eulerAngles = Utility.RandomRotVec(); 44 | Creature crt_script = child.AddComponent(); 45 | child.tag = "Creature"; 46 | crt_script.invokechromosome(chromosome); 47 | crt_script.setEnergy(energy); 48 | CreatureSpawned(crt_script); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Selection.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.EventSystems; 3 | using System.Collections; 4 | 5 | public class Selection : MonoBehaviour 6 | { 7 | public GameObject selected; 8 | 9 | public static GameObject container; 10 | public static Selection instance; 11 | 12 | public delegate void SelectionDelegate(Creature c); 13 | public static event SelectionDelegate Selected; 14 | 15 | private Ray ray; 16 | private RaycastHit hit; 17 | 18 | public static Selection getInstance () { 19 | if(!instance) { 20 | container = new GameObject(); 21 | container.name = "SelectionManager"; 22 | instance = container.AddComponent(); 23 | } 24 | return instance; 25 | } 26 | 27 | void Update () 28 | { 29 | ray = Camera.main.ScreenPointToRay(Input.mousePosition); 30 | if (Input.GetMouseButtonUp(0)) 31 | { 32 | if (!EventSystem.current.IsPointerOverGameObject()) 33 | { 34 | bool rayhit = Physics.Raycast(ray, out hit); 35 | if (rayhit) 36 | { 37 | Creature c = null; 38 | if (hit.transform.tag == "Creature") 39 | { 40 | c = hit.transform.GetComponentInParent(); 41 | selected = hit.transform.parent.gameObject; 42 | Selected(c); 43 | } 44 | } 45 | else 46 | { 47 | Selected(null); 48 | } 49 | } 50 | } 51 | } 52 | 53 | public void select (GameObject go) { 54 | selected = go; 55 | } 56 | 57 | public bool isSelected (GameObject go) { 58 | return selected == go; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /Assets/Scripts/Main.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.IO; 4 | 5 | /* 6 | * Author: Craig Lomax 7 | * Date: 06.09.2011 8 | * URL: clomax.me.uk 9 | * email: craig@clomax.me.uk 10 | * 11 | */ 12 | 13 | public class Main : MonoBehaviour 14 | { 15 | 16 | #pragma warning disable 0414 17 | Data d; 18 | Logger lg; 19 | Settings settings; 20 | Selection selectionManager; 21 | GeneticsMain gm; 22 | CollisionMediator co; 23 | 24 | GameObject aperatus; 25 | GameObject cam; 26 | Ether ether; 27 | #pragma warning restore 0414 28 | 29 | void Start () 30 | { 31 | createFolders(); 32 | d = Data.getInstance(); 33 | lg = Logger.getInstance(); 34 | settings = Settings.getInstance(); 35 | selectionManager = Selection.getInstance(); 36 | aperatus = (GameObject)Instantiate(Resources.Load("Prefabs/Aperatus")); 37 | cam = GameObject.Find("Main Camera"); 38 | cam.AddComponent(); 39 | ether = Ether.getInstance(); 40 | gm = GeneticsMain.getInstance(); 41 | co = CollisionMediator.getInstance(); 42 | } 43 | 44 | void Update () 45 | { 46 | if (Input.GetKeyDown(KeyCode.Escape)) 47 | { 48 | #if UNITY_EDITOR 49 | UnityEditor.EditorApplication.isPlaying = false; 50 | #else 51 | Application.Quit(); 52 | #endif 53 | } 54 | } 55 | 56 | private void createFolders() 57 | { 58 | if (!Directory.Exists(Application.dataPath + "/data")) 59 | Directory.CreateDirectory(Application.dataPath + "/data"); 60 | 61 | if (!Directory.Exists(Application.dataPath + "/data/saved_creatures")) 62 | Directory.CreateDirectory(Application.dataPath + "/data/saved_creatures"); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /Assets/Scripts/Creature/Mouth.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | 5 | /* 6 | * Author: Craig Lomax 7 | * Date: 06.09.2011 8 | * URL: clomax.me.uk 9 | * email: craig@clomax.me.uk 10 | * 11 | */ 12 | 13 | 14 | public class Mouth : MonoBehaviour { 15 | 16 | Foodbit fb; 17 | Creature crt; 18 | Eye eye; 19 | 20 | Transform _t; 21 | LineRenderer lr; 22 | 23 | Vector3 line_start; 24 | Vector3 line_end; 25 | 26 | float line_length = 0.05F; 27 | float line_width = 0.05F; 28 | 29 | int fb_detect_range = 40; 30 | 31 | GameObject cf; 32 | 33 | void Start () { 34 | _t = transform; 35 | crt = (Creature)_t.parent.parent.gameObject.GetComponent("Creature"); 36 | eye = crt.eye.GetComponent(); 37 | lr = (LineRenderer)gameObject.AddComponent(); 38 | lr.material.shader = Shader.Find("Unlit/Color"); 39 | lr.material.color = Color.green; 40 | lr.SetWidth(line_width, line_width); 41 | lr.SetVertexCount(2); 42 | lr.GetComponent().enabled = true; 43 | } 44 | 45 | void Update () { 46 | cf = eye.targetFbit; 47 | if(cf && crt.state == Creature.State.persuing_food) { 48 | lr.useWorldSpace = true; 49 | line_end = new Vector3(cf.transform.position.x, 50 | cf.transform.position.y, 51 | cf.transform.position.z 52 | ); 53 | line_start = _t.position; 54 | lr.SetPosition(1,line_end); 55 | resetStart(); 56 | } else { 57 | lr.useWorldSpace = false; 58 | line_start = Vector3.zero; 59 | line_end = new Vector3(0,0,line_length); 60 | lr.SetPosition(0,line_start); 61 | lr.SetPosition(1,line_end); 62 | } 63 | } 64 | 65 | void resetStart () { 66 | line_start = new Vector3(_t.position.x,_t.position.y,_t.position.z); 67 | lr.SetPosition(0,line_start); 68 | } 69 | 70 | float getDetectRadius() { 71 | return fb_detect_range; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /Assets/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "population_logging" : 0, 4 | "foodbit_logging" : 0, 5 | "log_time" : 5.0, 6 | 7 | "camera": { 8 | "sensitivity" : 1.0, 9 | "invert" : 1, 10 | "background_colour" : { 11 | "r" : 0.0, 12 | "g" : 0.0, 13 | "b" : 4.3 14 | } 15 | } 16 | }, 17 | 18 | "ether": { 19 | "total_energy" : 5000.0, 20 | "start_number_foodbits" : 200, 21 | "starting_creatures" : 20, 22 | "creature_spread" : 12 23 | }, 24 | 25 | "foodbit": { 26 | "init_energy_min" : 5.0, 27 | "init_energy_max" : 25.0, 28 | "init_scale_min" : 0.3, 29 | "init_scale_max" : 0.8, 30 | "destroy_at" : 1.0, 31 | "spore_time" : 0.2, 32 | "spore_range" : 100, 33 | "spore_rate" : 2.0, 34 | "wide_spread" : 40.0 35 | }, 36 | 37 | "creature": { 38 | "init_energy" : 70.0, 39 | "hunger_threshold" : 50.0, 40 | "low_energy_threshold" : 5.0, 41 | "line_of_sight" : 12.0, 42 | "energy_to_offspring" : 0.33, 43 | "metabolic_rate" : 0.8, 44 | "mate_range" : 1.0, 45 | "eat_range" : 0.75, 46 | "eye_refresh_rate" : 0.25, 47 | "age_sexual_maturity" : 6, 48 | "angular_drag" : 7.5, 49 | "drag" : 2.0, 50 | "branch_limit" : 4, 51 | "recurrence_limit" : 3, 52 | 53 | "root": { 54 | "max_root_scale" : { 55 | "x" : 1.0, 56 | "y" : 1.0, 57 | "z" : 1.0 58 | }, 59 | 60 | "min_root_scale": { 61 | "x" : 0.3, 62 | "y" : 0.3, 63 | "z" : 0.3 64 | } 65 | }, 66 | 67 | "limb": { 68 | "max_limb_scale" : { 69 | "x" : 0.3, 70 | "y" : 0.3, 71 | "z" : 1.0 72 | }, 73 | "min_limb_scale" : { 74 | "x" : 0.05, 75 | "y" : 0.05, 76 | "z" : 0.6 77 | } 78 | } 79 | }, 80 | 81 | "genitalia": { 82 | "line_length" : 0.05 83 | }, 84 | 85 | "genetics": { 86 | "crossover_rate" : 0.5, 87 | "mutation_rate" : 0.1, 88 | "mutation_factor" : 0.3 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /Assets/Scripts/Genetics/Chromosome.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using LitJson; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | 6 | /* 7 | * Author: Craig Lomax 8 | * Date: 07.09.2013 9 | * URL: clomax.me.uk 10 | * email: craig@clomax.me.uk 11 | * 12 | */ 13 | 14 | public class Chromosome 15 | { 16 | public Color colour; 17 | public Color limb_colour; 18 | public Vector3 root_scale; 19 | public float base_joint_frequency; 20 | public float base_joint_amplitude; 21 | public float base_joint_phase; 22 | public decimal hunger_threshold; 23 | 24 | public int num_branches; 25 | public int[] num_recurrences; 26 | 27 | public ArrayList branches; 28 | 29 | public void setNumBranches(int n) 30 | { 31 | num_branches = n; 32 | if (num_recurrences == null) 33 | initNumRecurrences(n); 34 | } 35 | 36 | void initNumRecurrences(int n) 37 | { 38 | num_recurrences = new int[n]; 39 | } 40 | 41 | public int getBranchCount() { 42 | return branches.Count; 43 | } 44 | 45 | public ArrayList getLimbs(int index) { 46 | return (ArrayList) branches[index]; 47 | } 48 | 49 | public Color getColour () { 50 | return colour; 51 | } 52 | 53 | public Color getLimbColour () { 54 | return limb_colour; 55 | } 56 | 57 | public Vector3 getRootScale () { 58 | return root_scale; 59 | } 60 | 61 | public ArrayList getBranches () { 62 | return branches; 63 | } 64 | 65 | public void setBranches (ArrayList bs) { 66 | branches = bs; 67 | } 68 | 69 | public void setColour (float r, float g, float b) { 70 | colour = new Color(r,g,b); 71 | } 72 | 73 | public void setLimbColour (float r, float g, float b) { 74 | limb_colour = new Color(r,g,b); 75 | } 76 | 77 | public void setRootScale (Vector3 rs) { 78 | root_scale = rs; 79 | } 80 | 81 | public void setBaseFequency (float freq) { 82 | base_joint_frequency = freq; 83 | } 84 | 85 | public void setBaseAmplitude (float amp) { 86 | base_joint_amplitude = amp; 87 | } 88 | 89 | public void setBasePhase (float phase) 90 | { 91 | base_joint_phase = phase; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Assets/Scripts/Util/Data.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System; 6 | 7 | public class Data : MonoBehaviour 8 | { 9 | public delegate void Count(); 10 | public static event Count DataUpdated; 11 | 12 | public static GameObject container; 13 | public static Data instance; 14 | 15 | Ether eth; 16 | 17 | public List creature_population; 18 | public List foodbit_population; 19 | 20 | public CreatureCount cc; 21 | 22 | private UIElement ui_element; 23 | 24 | float log_time; 25 | 26 | public static Data getInstance() 27 | { 28 | if (!instance) 29 | { 30 | container = new GameObject(); 31 | container.name = "Data"; 32 | instance = container.AddComponent(); 33 | } 34 | return instance; 35 | } 36 | 37 | public void OnVisible() 38 | { 39 | if (ui_element.visible) 40 | { 41 | } 42 | 43 | if (!ui_element.visible) 44 | { 45 | } 46 | } 47 | 48 | void Start () 49 | { 50 | ui_element = GetComponent(); 51 | creature_population = new List(); 52 | eth = Ether.getInstance(); 53 | foodbit_population = new List(); 54 | log_time = float.Parse(Settings.getInstance().contents["config"]["log_time"].ToString()); 55 | 56 | InvokeRepeating("UpdateCounts", 0F, log_time); 57 | } 58 | 59 | private void UpdateCounts () 60 | { 61 | foodbit_population.Add(eth.getFoodbitCount()); 62 | DataUpdated(); 63 | } 64 | 65 | public decimal TotalCreatureEnergy() 66 | { 67 | decimal result = 0m; 68 | foreach(Creature c in eth.creatures) 69 | { 70 | result += c.energy; 71 | } 72 | return (result); 73 | } 74 | 75 | internal decimal TotalFoodbitEnergy() 76 | { 77 | decimal result = 0m; 78 | foreach (GameObject f in eth.foodbits) 79 | { 80 | result += f.GetComponent().energy; 81 | } 82 | return (result); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Assets/Scripts/GUI/CreatureList.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | 6 | public class CreatureList : MonoBehaviour 7 | { 8 | public GameObject button_prefab; 9 | public List selections; 10 | 11 | CreatureInfoContainer creature_info; 12 | 13 | void Start () 14 | { 15 | creature_info = CreatureInfoContainer.getInstance(); 16 | } 17 | 18 | void OnEnable () 19 | { 20 | SaveCreature.CreatureSaved += OnUpdate; 21 | } 22 | 23 | void OnDisable () 24 | { 25 | SaveCreature.CreatureSaved -= OnUpdate; 26 | } 27 | 28 | public void PopulateMenu (SortedList creatures) 29 | { 30 | DepopulateMenu(); 31 | 32 | for (int i = 0; i < creatures.Count; ++i) 33 | { 34 | string name = creatures.Keys[i]; 35 | Chromosome chromosome = creatures.Values[i]; 36 | GameObject button = Instantiate(button_prefab, transform.position, transform.rotation) as GameObject; 37 | button.transform.SetParent(transform); 38 | LayoutElement le = button.AddComponent(); 39 | le.minHeight = 30; 40 | 41 | LoadChromosome lc = button.GetComponent(); 42 | lc.parent = GetComponentInParent(); 43 | lc.c = chromosome; 44 | 45 | Button b = button.GetComponent