With 0.3.2 out of the way, it is prime time to start working on new features for the 0.3.3 New Year release. As promised, I will be completely redoing the reproduction and health systems to make them much more realistic and intuitive, and also to pave the way for agents and other features that rely on this working properly. Now, you might be wondering why I put the reproduction and health systems in one post; I’ll get to this later, but in short, they are one and the same. The reproduction bar is basically a continuation of the health bar—after you reach 100% health (assuming you were damaged), the exact same processes will continue to “prepare you for reproduction”.
Below I will be describing the system that I will be implementing. Feel free to comment and critique, but keep in mind that everything below was already discussed and agreed upon. We don’t want this turning into the AI thread.
- All organelles (including the membrane) will be assigned a growthIndex that is constricted to [0.0,2.0].
- This growthIndex will be initialized to 1.0 when starting a new game or when you exit the editor.
- All organelles will also be assigned a cost that is dependent on the type of the organelle and the level it is at (e.g. 3 fatty acids, 2 glucose, 6 protein)
- The cell nucleus will be assigned processes that can synthesize the necessary compounds to satisfy the cost.
- Every single time a compound used in reproduction is synthesized, it is “consumed” and the organelle that consumed it increases its growth index (so in the example organelle above, consuming one fatty acid will increase your growth index from 1.0 to 1.09 and then consuming another protein will increase it to 1.18)
- Organelles are scaled in the y-direction based on their growthIndex, so a mitochondrion with an index of 1.5 will be 50% longer than the normal model.
- Once an organelle reaches 2.0, it is split into 2 separate organelles, making the cell actually bigger (so absorption rate and engulfment size are increased).
- Both split organelles are assigned an index of 1.0 and can no longer grow, so resources go to growing other organelles.
- Once all organelles split in half (excluding the nucleus, ER, and golgi) the cell finishes the G1 phaze.
- After you enter the S phase, you cannot go back, even if you are damaged (read below how agents affect growthIndex). However, until you are fully healed, you are unable to finish the S phase.
- The S phase is basically identical to the G1 phase except you will be “duplicating” your nucleus.
- The nucleus will require protein and nucleic acids and will grow in all directions until its growthIndex reaches 2.0.
- The nucleus will not split, but will remain at the enlargened size.
- Same as for S phase, once you reach this you cannot go back, but you need to be at full health to proceed.
- This stage requires a lot of protein, fatty acids, and other elements to manufacture microtubules and the like.
- Unlike before, there will be no visual changes to the cell (although it might be a good idea to spawn a pair of centrioles)
- All you need to pass this stage is to have above a set level compound.
- While you have above the set level, the reproduction button becomes green, but if you dip below it becomes grey’d out until you increase your compound stores.
- Pressing the button enters you into M phase and takes away this threshold of compounds.
- Once you click the reproduce button, a timer will start to count to 5 seconds. After the 5 seconds have passed, your cell has succesfully reproduced and you enter the editor.
Graphically, this will be very easy to show. You will have one bar that will be divided into 3 chunks of different colors (say green, yellow, and red). Each bar represents one of the 3 interphase stages and will be filled up or down as you reach reproduction or stray away from it. Once a bar is filled up, it cannot go down.
Health directly ties into the growthIndex (which I know think will be better named as the compoundBin), and is really just a representation of how full these bins are. The health is equal to the sum of the (compoundBins for each organelle divided by the number of organelles. So if you have 1.0 for each organelle, you have 100% health, but if you are damaged and two of your mitochondria will go down to 0.2, your health will be (0.2 + 0.2 + 1.0 + 1.0 + 1.0) / (1.0 + 1.0 + 1.0 + 1.0 + 1.0). Attacking an organelle will decrease the compoundBin, shrink it, and change its color to black (blinking red while the damage is in place). Once an organelle grows big enough, it splits in half and your max health is increased since you now have two 1.0 bins for that organelle instead of just one.
The damaged organelles work less efficiently (max efficiency multiplied by compoundBin), while larger organelles work better. This means that an agent that targets vacuoles (and brings them all down to 0.0) will leave you with no storage space except cytoplasm. Damaged organelles will consume compounds (fatty acids, glucose, and protein) in the same way they grow to split in half, except now they will be aiming to get back to 1.0, which is maximum health. As before, the lower an organelles compoundBin, the greater priority it uses for compounds (so you will heal a 0.0 organelle first, before healing a 0.5 organelle, before growing a 1.5 organelle).
An organelle that split in half will be destroyed if its bin reaches zero, while the original organelle will simply stop working if it reaches zero. This means that if your mitochondria split into two organelles with 1.0, and was then attacked by an agent, the first organelle to drop to 0.0 will vanish, while the second one will shrink, turn black, and will stop working.
Okay, that’s basically it for the reproduction and health system revamps. Simple on paper, hard in code.