I made you a biochemistry!
The above diagram still needs some work: I need to establish water, oxygen, fibre and enzyme requirements for the various metabolic processes. I might need to find better sources than wikipedia for that. I’d also like to simplify it: perhaps combine ATP, NADH, FADH2 and Quinol under the catchall of “energy” and eliminate the ATP Synthase and Citric Acid Cycle processes. Oh, and I need to work out how some bacterial colonies digest cellulose, and look into photosynthesis.
By now you’ve probably worked out what this is all about: at some point in the last few weeks I stopped thinking of “diet” and “dietary chemisty” as a game design problem, and started researching actual biochemistry instead. Turns out it’s fascinating. Who knew? Well, biochemists, probably. Slimy bastards been hogging all this fun to themselves.
In any case, the grubby fingerprints of evolution are all over the field of biochemistry. The entire metabolic system is built on progressively simpler but less efficient systems: you can elimate everything but glycolysis and anaerobic creatures can still get energy from ingesting glucose.
Researching it has also been an eye opener. I haven’t really learned any trivia I didn’t know before this, but I have tied together a large number of factoids I’d picked up via cultural osmosis and Attenborough documentries into a coherent, interelated web. “Termites and cows use bacterial colonies to digest plant matter”, “our muscles generate lactic acid when they can’t get oxygen fast enough”, “our body starts feeding on itself when we starve”, “animals breath in oxygen and breath out CO2”, those sort of things. Biochemistry links all these things together and tells us why they happen. Which is awesome.
This really is how I should have been designing these elements of the game from the very beginning. Although I still may not end up simulating biochemical evolution (doing so would violate the “seeing evolution happen” design goal), this bottom-up approach to diet provides us with several interesting elements that would otherwise be simulated seperately: oxygen and water requirements, as well as the… um… expulsion of CO2 and uh… undigestables. If we do include biochemical evolution, said… undigestables… might be digestable by other species, and could serve as as a… um… food… source…
Oh god what have I done. It’ll be just like that digimon I had as a kid.
Of course, the requirement for water and oxygen (clean water! fresh oxygen! nothing to do with shit!) might have some impact on Primum Specium’s ability to survive. How’s PS going to get to water if it can’t even find food consistantly? The bottom-up approach states that problems are caused by the simulation not being accurate enough, so how do simple real-life organisms solve the oxygen and water problem?
The answer is diffusion: their cell membranes are thin enough to absorb the elements they require. Which means that the reason Primum Specium is having trouble surviving isn’t because it’s simple, but the opposite: it starts with a complex rough-skin texture (it’s actually rhino skin). This will have to be replaced by a transluscent membrane of some description. Which should be fun to do.
Displaying a complex, semi-accurate biochemical system like this to the user is going to be an interesting design challenge. Done right, it has the potential to be an interesting insight into how the creatures work, with the added bonus of providing bucketloads of tangential learning. Done wrong, it could very easily become an incomprehensible mess (like the flowchart above) that obscures why some creatures survive and others don’t.
To simplify it, one possibility is to treat it as a discreet process. Minecraft is a great example of discreet processes: you don’t craft 1.24kg of logs into 4.96kg of planks, you craft 1 log into 4 planks. It’s impossible to have less than 1 of any resource in minecraft, which is part of what makes the game so intuitive and satisfying: integers, especially small (two digit) integers, are much easier for most people to work with than fractions or decimals.
Thus, a discreet biochemistry system would involve 1 glucose being ‘crafted’ into 2 pyruvate. This mirrors the molecular reaction, where 1 molecule of glucose is broken down into 2 pyruvate molecules, which is a nice bonus.
In Species, of course, the majority of numbers are continuous. This is a matter of necessity, rather than game design: evolution is a continuous process. In fact, the numbers which have to be discreet (“head type”, “body covering”, etc) evolve very differently to the continuous ones: they operate under a “lucky monsters” system, where the rare mutants who have improved types have to actively survive and outcompete their brethren, rather than the entire population slowly changing on a statistical level.
The non-genetic numbers, though, don’t always have to be continuous. Some of them do: Kinetic energy and movement can’t be represented discreetly unless time is also represented discreetly, as in turn-based games like X-Comm. But diet is one place we could take things in the other direction: rather than continually absorbing energy from plants and meat, a creature’s feeding routine could easily be reconfigured to take discreet, periodic “bites”, with every number between there and energy being discreet.
It’s an interesting concept, and would make possible my ideal representation of the in-game metabolism: a functional infographic where you can actually watch each molecule being broken down into simpler molecules as it falls through the metabolic pipeline.
As always, much of this is long term stuff. Not as long term as some of these posts, though: as I wrap up my work on 0.6.0 I’m already thinking about what I’ll be including in the 0.7.0 release, and I’ll certainly be laying some of the foundations for this stuff.
PS: Random Screenshot.