Skip to content

Commit

Permalink
Merge pull request Revolutionary-Games#752 from Revolutionary-Games/676
Browse files Browse the repository at this point in the history
Corpse chunks, rebalancing of various aspects of game play (Revolutionary-Games#676)
  • Loading branch information
hhyyrylainen authored Mar 15, 2019
2 parents dbe8f3d + 205f647 commit b68fcfa
Show file tree
Hide file tree
Showing 22 changed files with 686 additions and 174 deletions.
2 changes: 1 addition & 1 deletion SetupThrive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def parseExtraArgs
leviathan = Leviathan.new(
# Use this if you always want the latest commit
# version: "develop",
version: "42ba106b2e3d098b3ab1b64ad559d3d51d931229",
version: "0d08da11c7d15bb5710427634371b62eccf7867d",
# Doesn't actually work, but leviathan doesn't install with sudo by
# default, or install at all for that matter
noInstallSudo: true
Expand Down
36 changes: 22 additions & 14 deletions scripts/gui/thrive_gui.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
<td id="addCytoplasm" class="OrganelleListItem">
<span class="tooltiptext">Cytoplasm<hr><br> Cost: 30 mutation points<hr><br>
Performs Process: Glycolysis<br>(0.125 glucose -> 5 ATP)/Second<hr><br>
Storage Space: 20<hr><br>
Storage Space: 4<hr><br>
The material or protoplasm within a living cell.<br>The gooey innards of a cell.</span>
<div id="CytoplasmIcon"></div>Cytoplasm<br>30 MP</td>
</tr></table>
Expand All @@ -382,7 +382,7 @@
<span class="tooltiptext">
Metabolosomes<hr><br> Cost: 45 mutation points<hr><br>
Performs Process: Metabolsome Respiration (In real life they Ferment, but we dont have those compounds in the game yet)<br>(1 Oxygen + 0.7 Glucose -> 38 ATP)/Second (Depending On Environmental Oxygen)<hr><br>
Storage Space: 10<hr><br>
Storage Space: 1<hr><br>
Organelle-like Bacterial microcompartments (BMCs) consisting of a protein shell that encloses enzymes used for fermentation.
</span>
<div id="MetabolosomeIcon"></div>Metabolosomes<br>45 MP</td>
Expand All @@ -391,7 +391,7 @@
Chromatophores <hr><br> Cost: 55 mutation points <hr><br>
Performs Process: Chromatophore Photosynthesis<br>(0.09 CO2 -> 0.33 glucose)/Second (Depending On Environmental C02)<br>
Performs Process: Glycolysis<br>(0.125 glucose -> 5 ATP)/Second (Depending On Environmental C02)<hr><br>
Storage Space: 10<hr><br>
Storage Space: 1<hr><br>
Coloured, membrane-associated vesicles used by various prokaryotes perform photosynthesis.
Chromatophores contain bacteriochlorophyll pigments and carotenoids.</span>
<div id="ChromatophorIcon"></div>Chromatophores<br>55 MP</td>
Expand All @@ -400,7 +400,7 @@
ChemosynthisizingProteins <hr><br> Cost: 45 mutation points <hr><br>
Performs Process: Bacterial Chemosynthesis<br>(1 CO2 + 1 Hydrogen Sulfide -> 1 Glucose)/Second (Depending On Environmental C02)<br>
Performs Process: Glycolysis<br>(0.125 glucose -> 5 ATP)/Second<hr><br>
Storage Space: 20<hr><br>
Storage Space: 1<hr><br>
Small membrane-associated structures that convert the noxious soup containing hydrogen
sulfide from hydrothermal vents into usable energy in the form of glucose.</span>
<div id="ChemosynthisizingProteinsIcon"></div>Chemosynthisizing Proteins<br>45 MP</td>
Expand All @@ -409,8 +409,8 @@
<td id="addRusticyanin" class="OrganelleListItem">
<span class="tooltiptext">
Rusticyanin <hr><br> Cost: 45 mutation points <hr><br>
Performs Process: Iron Chemolithotrophy<br>(0.09 CO2 + 0.5 Iron Ion -> 10 ATP)/Second (Depending On Environmental C02)<br>
Storage Space: 5<hr><br>
Performs Process: Iron Chemolithotrophy<br>(0.09 CO2 + 0.175 Iron Ion -> 10 ATP)/Second (Depending On Environmental C02)<hr><br>
Storage Space: 1<hr><br>
Siderophores and Rusticyanin for storing and using iron ions and carbon from atmospheric carbon dioxide to produce ATP.
Iron Chemolithotrophy is a process by which organisms obtain their energy from the oxidation of reduced inorganic ions.
</span>
Expand All @@ -421,8 +421,9 @@
<td id="addFlagellum" class="OrganelleListItem">
<span class="tooltiptext">
Flagellum<hr><br> Cost: 55 mutation points<hr><br>
Cost: 7 atp per second while in use.<hr><br>
A whip like structure used microbes for movement.</span>
Performs Process: Movement<br>(7atp -> Faster movement speed)/Second<hr><br>
Storage Space: 1<hr><br>
A whip like structure used by microbes for movement.</span>
<div id="FlagellumIcon"></div>Flagellum<br>55 MP</td>
<td id="addPilus" class="OrganelleListItem DisabledButton">
<div id="PilusIcon"></div>Predatory Pilus<br>30 MP</td>
Expand All @@ -435,23 +436,26 @@
<span class="tooltiptext">
Nucleus<hr><br> Cost: 100 mutation points<hr><br>
Performs Process: Eukaryote Evolution<hr><br>
Allows for synthesis of RNA, MRNA, allows cell to evolve membrane bound organelles.
Storage Space: 15<hr><br>
Allows for synthesis of RNA and MRNA, allows cell to evolve membrane bound organelles.
</span>
<div id="NucleusIcon">
</div>Nucleus<br>100 MP</td>
<td id="addMitochondrion" class="OrganelleListItem">
<span class="tooltiptext">
Mitochondria<hr><br> Cost: 45 mutation points<hr><br>
Performs Process: Respiration<br>(1 Oxygen + 0.2 glucose -> 38 ATP)/Second (Depending On Environmental Oxygen)<hr><br>
Storage Space: 2<hr><br>
A captured prokaryote used by eukaryotic cells to perform respiration.<br>
The Mitochondria is the powerhouse of the cell
- The Mitochondria is the powerhouse of the cell
</span>
<div id="MitochondrionIcon">
</div>Mitochondrion<br>45 MP</td>
<td id="addChloroplast" class="OrganelleListItem">
<span class="tooltiptext">
Chloroplast<hr><br> Cost: 55 mutation points<hr><br>
Performs Process: Photosynthesis<br>( 0.09 Carbon Dioxide -> 1 glucose)/Second (Depending On Environmental C02)<hr><br>
Performs Process: Photosynthesis<br>( 0.09 CO2 -> 1 glucose)/Second (Depending On Environmental C02)<hr><br>
Storage Space: 2<hr><br>
A captured prokaryote used by eukaryotic cells to perform photosynthesis.<br>
The chloroplast is used primarily by plant cells on earth, but some ciliates and other organisms use it too.
</span>
Expand All @@ -461,6 +465,7 @@
<span class="tooltiptext">
Thermoplast<hr><br> Cost: 40 mutation points<hr><br>
Performs Process: Thermosynthesis<br>(Heat -> 1 glucose)/Second (Depending On Environmental Heat)<hr><br>
Storage Space: 2<hr><br>
A captured prokaryote used by eukaryotic cells to perform thermosynthesis.<br>
The thermoplast is a theoretical organelle that takes environmental heat gradients and generates energy from them.
</span>
Expand All @@ -469,6 +474,7 @@
<span class="tooltiptext">
Chemoplast<hr><br> Cost: 45 mutation points<hr><br>
Performs Process: Chemosynthesis<br>(0.09 CO2 + 1 Hydrogen Sulfide -> 2 Glucose)/Second (Depending On Environmental C02)<hr><br>
Storage Space: 2<hr><br>
Allows for synthesis of glucose from hydrogen sulfide and atmospheric carbon dioxide.
<br>
Can be used to process the normally toxic soup containing hydrogen sulfide that comes out of hydrothermal vents at the bottom of the ocean. Into glucose.
Expand All @@ -478,6 +484,7 @@
<span class="tooltiptext">
Nitrogen Fixing Plastid<hr><br> Cost: 50 mutation points<hr><br>
Performs Process: Nitrogen Fixation<br>(1 Oxygen + 5 ATP -> 0.5 Ammonia)/Second (Depending On Environmental Oxygen)<hr><br>
Storage Space: 2<hr><br>
Allows for synthesis of ammonia from atmospheric nitrogen and oxygen. For easier cell growth.
</span>
<div id="PlastidIcon">
Expand All @@ -486,14 +493,15 @@
<td id="addVacuole" class="OrganelleListItem">
<span class="tooltiptext">
Vacuole <hr><br> Cost: 50 mutation points<hr><br>
Storage Space: 50<hr><br>
A space or vesicle within the cytoplasm of a cell, enclosed by a membrane and used to hold compounds</span>
Storage Space: 15<hr><br>
A space or vesicle within the cytoplasm of a cell, enclosed by a membrane and used to hold compounds.</span>
<div id="VacuoleIcon"></div>Vacuole<br>50 MP</td>
<td id="addToxinVacuole" class="OrganelleListItem">
<span class="tooltiptext">
Toxin Vacuole <hr><br> Cost: 70 mutation points<hr><br>
Performs Process: OxytoxyNT Production<br>(1 Oxygen + 5 ATP -> 5 Oxytoxy)/Second (Depending On Environmental Oxygen)<hr><br>
Allows for production and storage of OxytoxyNT which can be shot at enemy cells using E. The more of this organelle you have the faster your toxin fire rate aswell.
Storage Space: 5<hr><br>
Allows for production and storage of OxytoxyNT which can be shot at enemy cells using E. The more of this organelle you have the faster your toxin fire rate will be.
</span>
<div id="ToxinVacuoleIcon"></div>Toxin Vacuole<br>70 MP</td>
<td id="addBioluminescent" class="OrganelleListItem DisabledButton">
Expand Down
26 changes: 15 additions & 11 deletions scripts/microbe_stage/configs.as
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
const auto CLOUD_SPAWN_RADIUS = 150;
const auto POWERUP_SPAWN_RADIUS = 85;
const auto DEFAULT_SPAWN_DENSITY = 1/25000.f;
const auto STARTING_SPAWN_DENSITY = 50000.0f;
const auto STARTING_SPAWN_DENSITY = 45000.0f;
const auto MAX_SPAWN_DENSITY = 20000.0f;
//Corpse info
const auto CORPSE_COMPOUND_COMPENSATION = 8.0f;
const int CORPSE_CHUNK_DIVISER = 3;
const auto CORPSE_CHUNK_AMOUNT_DIVISER = 3.0f;
const auto CHUNK_ENGULF_COMPOUND_DIVISOR = 30.0f;

// Cell Spawn Variation
const auto MIN_SPAWN_DISTANCE = -5000.0f;
Expand All @@ -29,13 +34,6 @@ const auto MAX_OPACITY_CHITIN = 1.2f;
const auto MIN_OPACITY_MUTATION = -0.01f;
const auto MAX_OPACITY_MUTATION = 0.01f;

//not const because we want to change these
//current atmospheric oxygen percentage in modern times
auto OXYGEN_PERCENTAGE = 0.21f;
//co2 percentage (over expressed as .09% is the percenatge of all
//non-nitrogen-non-oxygen gasses in our atmosphere)
auto CARBON_DIOXIDE_PERCENTAGE = 0.009f;

// Mutation Variables
const auto MUTATION_BACTERIA_TO_EUKARYOTE = 1;
const auto MUTATION_CREATION_RATE = 0.1f;
Expand All @@ -52,12 +50,13 @@ const auto MAX_SPECIES_AGRESSION = 400.0f;
const auto MAX_SPECIES_FEAR = 400.0f;
const auto MAX_SPECIES_ACTIVITY = 400.0f;
const auto MAX_SPECIES_FOCUS = 400.0f;
const auto MAX_SPECIES_OPPORTUNISM = 400.0f;

// Personality Mutation
const auto MAX_SPECIES_PERSONALITY_MUTATION = 20.0f;
const auto MIN_SPECIES_PERSONALITY_MUTATION = -20.0f;

// Bacterial CXOlony configuration
// Bacterial COlony configuration
const auto MIN_BACTERIAL_COLONY_SIZE = 1;
const auto MAX_BACTERIAL_COLONY_SIZE = 5;
const auto MIN_BACTERIAL_LINE_SIZE = 3;
Expand All @@ -68,6 +67,7 @@ const auto AGRESSION_DIVISOR = 25.0f;
const auto FEAR_DIVISOR = 25.0f;
const auto ACTIVITY_DIVISOR = 100.0f;
const auto FOCUS_DIVISOR = 100.0f;
const auto OPPORTUNISM_DIVISOR = 100.0f;

// Cooldown for AI for toggling engulfing
const uint AI_ENGULF_INTERVAL=300;
Expand Down Expand Up @@ -163,11 +163,15 @@ const uint AGENT_EMISSION_COOLDOWN = 2000;
// Iron amounts per chunk.
// big iron ejects ten per 20 clicks , so about 30 per second, so ill give it enough for 1000 seconds)
const double IRON_PER_BIG_CHUNK = 30000.0f;
// small iron ejects 3 per 20 clicks , so about 9 per second, so ill give it enough for 1000 seconds aswell
const double IRON_PER_SMALL_CHUNK = 9000.0f;
const bool LARGE_IRON_DISSOLVES = false;
// small iron ejects 3 per 20 clicks , so about 9 per second
const double IRON_PER_SMALL_CHUNK = 100.0f;
const bool SMALL_IRON_DISSOLVES = true;

//Auto Evo Values
const int CREATURE_DEATH_POPULATION_LOSS = -60;
const int CREATURE_KILL_POPULATION_GAIN = 50;
const int CREATURE_SCAVENGE_POPULATION_GAIN = 10;
const int CREATURE_REPRODUCE_POPULATION_GAIN = 50;
const int CREATURE_ESCAPE_POPULATION_GAIN = 50;

Expand Down
12 changes: 6 additions & 6 deletions scripts/microbe_stage/microbe.as
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ class MicrobeSystem : ScriptSystem{
world.GetScriptComponentHolder("MicrobeComponent").Find(microbeComponent.hostileEngulfer));
if ((hostileMicrobeComponent is null) || (!hostileMicrobeComponent.engulfMode) ||
(hostileMicrobeComponent.dead) || (ourPosition._Position - predatorPosition._Position).LengthSquared() >=
((hostileMicrobeComponent.organelles.length()+3)*HEX_SIZE)+50){
((hostileMicrobeComponent.totalHexCountCache+3)*HEX_SIZE)+50){
microbeComponent.hostileEngulfer = NULL_OBJECT;
microbeComponent.isBeingEngulfed = false;
}
Expand All @@ -499,7 +499,7 @@ class MicrobeSystem : ScriptSystem{
//TODO:It seems to happen no matter what (even if it takes away less atp then you generate per second),
//we should probably make it take into account the amount of atp being generated so resources arent wasted
//for now made it not take away if your atp amount is equal to your capacity
auto osmoCost = (microbeComponent.organelles.length()*ATP_COST_FOR_OSMOREGULATION)/(logicTime);
auto osmoCost = (microbeComponent.totalHexCountCache*ATP_COST_FOR_OSMOREGULATION)/(logicTime);
//auto osmoCost = (microbeComponent.organelles.length()*2)/logicTime;
double atpAmount = MicrobeOperations::getCompoundAmount(world, microbeEntity,SimulationParameters::compoundRegistry().getTypeId("atp"));

Expand Down Expand Up @@ -576,9 +576,9 @@ class MicrobeSystem : ScriptSystem{
const Float3 velocity = physics.Body.GetVelocity();

// There should be no Y velocity so it should be zero
const Float3 drag(velocity.X * (CELL_DRAG_MULTIPLIER+(CELL_SIZE_DRAG_MULTIPLIER*microbeComponent.organelles.length())),
velocity.Y * (CELL_DRAG_MULTIPLIER+(CELL_SIZE_DRAG_MULTIPLIER*microbeComponent.organelles.length())),
velocity.Z * (CELL_DRAG_MULTIPLIER+(CELL_SIZE_DRAG_MULTIPLIER*microbeComponent.organelles.length())));
const Float3 drag(velocity.X * (CELL_DRAG_MULTIPLIER+(CELL_SIZE_DRAG_MULTIPLIER*microbeComponent.totalHexCountCache)),
velocity.Y * (CELL_DRAG_MULTIPLIER+(CELL_SIZE_DRAG_MULTIPLIER*microbeComponent.totalHexCountCache)),
velocity.Z * (CELL_DRAG_MULTIPLIER+(CELL_SIZE_DRAG_MULTIPLIER*microbeComponent.totalHexCountCache)));

// Only add drag if it is over CELL_REQUIRED_DRAG_BEFORE_APPLY
if(abs(drag.X) >= CELL_REQUIRED_DRAG_BEFORE_APPLY){
Expand Down Expand Up @@ -630,7 +630,7 @@ class MicrobeSystem : ScriptSystem{
// microbeComponent.queuedMovementForce.Z);

// There is an movement without flagella cost
auto cost = (BASE_MOVEMENT_ATP_COST*microbeComponent.organelles.length())/logicTime;
auto cost = (BASE_MOVEMENT_ATP_COST*microbeComponent.totalHexCountCache)/logicTime;

// TODO: if there isn't enough energy this needs to scale the impulse
MicrobeOperations::takeCompound(world, microbeEntity,
Expand Down
Loading

0 comments on commit b68fcfa

Please sign in to comment.