3 Months on Steam! Past, Present and Future

The Ghosts of Species Christmas appeared to me to demand I reflect upon my misdeeds. Unfortunately, I was otherwise occupied, so I’ve been procrastinating on that ever since. But I’m getting a bit sick of the chain noises and the spooky jerk popping up through the floor when I’m not expecting it (I swear he’s doing it on purpose), so let’s take a look!


Ghost of Species Updates

Species has been on Steam for more than 3 months now, and I’m still not crushing the world in an iron fist. Slightly disappointing, but I’m willing to call it progress! The game’s gotten a lot of feedback and I’ve made a lot of changes since October…

  • Performance Improvements – It’s hard to quantify exactly, but I’ve made some significant optimizations to the game since launch. I may have also murdered empathy in the process, but it’s safe to say Species now can handle far more abominations of nature than it could at launch.
  • Stability – Oh my goodness yes. So many bugfixes. I’ve learned my lesson: in the future, major updates will be released on a beta branch for play-testers and early adopters.
  • Mac and Linux Support – the game actually runs on Mac and Linux now! This is a big deal for me: I always knew I wanted Mac and Linux support, but actually trying to implement it intimidated the heck out of me. So glad I did!
  • Underwater Ecosystems – Aquatic life is now nicely balanced with land-borne life, and both are viable niches for creatures to occupy.
  • Graphics – Underwater worlds in particular look a lot prettier than they did with improved fog, lighting and most importantly bubbles. If I may take a moment to brag, the new sedimentary layers in the cliffs also look pretty awesome.
  • Animation – Creatures body parts are now screwed on properly and spend a lot less time waving in the air like they just don’t care.
  • Anti-cannibalism Measures – I may have screwed over the poor carnivores with this one, but they were cannibals. They deserved it.
  • Over-hunting Suppression – But then they took revenge on the prey species! I had to do it! I had to kill them all! I’M A MONSTER OF CIRCUMSTANCE!
  • “Niches” Automatic Population Control – designed to encourage creatures to continually adapt to new food sources rather than adopting a single strategy and relying on it forever.
  • And so many tiny improvements to the simulation it’d be difficult to list them all here. Let’s just say, I’m satisfied that Species is a better game now than it’s ever been.


Okay? Okay! We’re done here. Take your chains, and…

… wait, two more ghosts? Seriously? Urgh. Fine. Let’s get this over with…


Ghost of Species Multithreading…

What? I’m working on it. It’s multithreading, it’s not exactly a photogenic topic, y’know? What, am I supposed to write a thousand word essay on race conditions? Nobody wants to read… oh, huh. Yeah I suppose I could share the prototype. That’s… actually a good idea.


One of the things that helps a lot when implementing big terrifying systems that you’ve never built before is to prototype them on a small scale. It allows you to learn where the bottomless pitfalls with spikes at the bottom are by face-planting into them in a safe environment (We put these little nerf balls on top of the spikes).

Multithreading falls into the category of “big terrifying systems that I’ve never built before”, so I made a little particle physics simulator to feel out the path ahead:


Singlethreaded. CPU Utilization: 22%. Frames Per Second: 11.

And then, long story short, I implemented the system I intend to use for multithreading. The results are… promising.


Multithreaded. CPU Utilization: 100%. Frames Per Second: 125.


Of course, this is just a particle physics system, not a full game. Current results are not indicative of future performance, and all that. But nonetheless, “yyyyyuuuup”. I’m very much looking forward to getting multithreading working in 0.12.0.

If you want to try the multithreading prototype out, you can download it here:

http://www.speciesgame.com/Downloads/Multithreading Prototype.rar

(Generic disclaimer: The multithreading prototype executable is provided as-is, and is run at the users own risk)

BTW, stay tuned to this blog for the thousand-word essay about race conditions I’ve got planned.


Ghost of Species Roadmap…

So you’re the last ghost. So what’s your deal? Do you just stand there in a hood, looking ominous?


Last time I posted this, I did so without comment.


Let’s rectify that!

The indigo oval in the middle encompasses 0.11.0 and 0.12.0’s features: past and present respectively. Everything else is future.

Generally speaking, features closer to the center of the image will be implemented sooner than those out by the edge. If you can draw a direct line between 0.12.0 and the feature, it’s probably not too far off. The exception to this is the violet “modding” bubble in the top right, which is standalone and could happen at any time.

Lines represent relationships between features, usually of a “prerequisite” nature. For instance, flight is useless without perches, which can’t be added until the tree’s are overhauled. You can follow the lines to get a literal road-map from a possible 0.13.0 feature to one in the distant, post-apocalyptic future. (I realise I’m just assuming the apocalypse’ll happen here, but it seems a fair bet at this point)

The ovals around the features are colour-coded:

  • Cyan – Gameplay. These features are centered around establishing an interesting game-play loop and a science-inspired progression system, wherein you unlock features in the game by observing and experimenting with the simulation.
    • The closest feature here is ‘Sampling’, where you utilize the rovers to “sample” creatures and build a library of body parts for… later use. Oh lordy what did I just type.
  • Green – World. Improvements to the world, mostly from a ‘simulation’ standpoint.
    • The features I’m looking at here are seasonal cycles and a map editor. Admittedly, mostly for my own edification, but I know at least a few people are interested in the latter.
  • Yellow – Creatures.  Mechanical, graphical and animation improvements to the creatures themselves.
    • These are incredibly important, but as you can see on the map most of them are gated behind other features. Most notably, I want to get working on the Phenotype Editor, a “spore-like” graphical creature editor (distinct from the numbers-based gene editor). This will come in handy for previewing and iterating on creature improvements.
  • Red – Creature Interactions. Social and combat behaviors and balance improvements. By far the most important of these is making carnivory and hunting viable in the long term, but that’s also going to be an incremental process over the course of several updates. Calls and social behaviours, such as herd defense and pack hunting, are also high on my priority list.
  • Indigo – Mod support. This is planned. I tend to think simulation games live or die on the strength of their modding community, so this is definitely planned.
  • Violet – Multiplayer. Extremely long term goals. I’ll probably try networking in another context before I attempt to introduce it to Species: I have experience with the subject, but not as much as I’d like.


Mmm hmm. It’s a grave. With my name on it. And… the dirt’s shifting? Sweet, you mean that immortality ritual actually worked? And here I thought it was a scam. Best $20 I ever spent.

Alright, thanks for… whatever this was. I guess?

I’m going to bed and if the ghosts aren’t gone by tomorrow morning I’m going to start to researching how to build real-life proton packs. Bye!




Leave a comment

Refactoring BodyPlan

I’m don’t have too much to say about my multithreading work just yet (aside from “it’s coming along, and early results are promising”), so instead let’s talk about a long-overdue task I undertook at the start of work for 0.12.0. It’s not directly related to multithreading, but it’s related to things that are related to multithreading, so it’ll provide a foundation for future blog posts.

Creature in Species are built out of a series of sub-objects, the biggest of which are the following five:

    Genome //Contains Genetic Stats
    BodyPlan //Contains Skeletal Physics and Drawable Body Parts
    Phenotype //Contains Derived-At-Birth Stats (things like speed, attack damage, etc)
    Specimen //Contains always-up-to-date State Information (Health/Food/Etc)
    Brain //Contains the creatures AI State

One of these things is not like the others, one of these things just doesn’t belong…

… and that thing is BodyPlan. I mean, obviously. It’s right there in the title of the blog post. I’m not exactly being coy about it here.

BodyPlan handles two responsibilities: generating and applying the skeletal physics, and drawing the creature’s body parts to the screen. The reason it was originally built this way is because these things are superficially related: I take the skeleton shape from the drawable art assets, and the art assets are rotated by droop and balance effects when I draw the creature.

But let’s embarrass ourselves trying to justify it. This is bad. This is really bad. To be gratuitously technical for a moment: under the SOLID principles of Object Oriented Programming, this is a severe violation of the first rule: the Single Responsibility Principle.

The Single Responsibility Principle dictates… well, exactly what you’d expect it to dictate based on that name. A class should have one responsibility. BodyPlan has two. Ergo propter hoc, Quasar is a dumbass.

This is important because those rules exist for reason: by violating the SRP, I’ve coupled drawing and animating limbs, heads and other body parts to the skeletal physics. Let’s say I wanted to draw heads or tails separate from a creature, as part of a creature editor or mutation map viewer: I can’t do that. At least, not without also creating some sort of temporary skeletal data for them.

The same also applies in reverse: I need to provide drawable assets like the body cover texture and colour to make the skeleton. This is less of an issue because there’s not too many places where I’m going to want a disembodied skeleton walking around (they fall apart too easily to use as soldiers and they’re too dumb to be servants), but still. It’s the principle of the thing. I might not want disembodied skeletons, but I’d object if someone tried to take away my right to have disembodied skeletons.

So this needed fixing and since I was already waist deep in refactoring everything else for multithreading, I figured I might as well address it. I’ve been splitting “BodyPlan” into “DrawableBodyPlan” and “SkeletalBodyPlan” (which I’ll probably rename simply to “Body” and “Skeleton” for the sake of being concise).

This is the only change I’ve made for 0.12.0 not directly related to multithreading: everything else from here on out will be in service of smearing the game across multiple cores like some sort of weird inedible Vegemite.


My plan was to make a joke about Vegemite, but I’m like 70% sure that would be grounds for having my Australian citizenship revoked.

Leave a comment

Where to Next – Multithreading 0.12.0

Updates will be slowing down for a while as I work on multithreading for 0.12.0. This is a big and promising feature, but also a dangerous one. It’s kind of like summoning an eldritch god: you might get immortality, or your life force might be consumed to power a terrible murder portal through which demons can invade the earth.

(it’s important to make your analogies relatable)

The number one complaint on Steam is performance. And I get it. Species gets more interesting with more creatures. If you’ve got a supercomputer with a trillion cores that cost you as much as the first three Apollo missions, you’re probably going to resent it if it can’t run Species better than a machine somebody got in a garage sale for 5 bucks and may actually be a microwave. Unfortunately, there’s a good possibility it won’t because CPU core speed hasn’t significantly increased in the last decade.

Performance is not the reason I’m looking at multithreading, however.

This is how the game is currently built, using a bit of sample data taken from a quick P. specium simulation:


As you can see, each frame time is given primarily to creature AI, specifically to the method called “UpdateBehaviourals” (that big red chunk of CPU time in the middle of each frame).

Logically, then, that’s the method I should extract and put into another thread, so it can run in parallel to the other operations.


This would be the “simple” (not actually simple) way of implementing multithreading.

And to be fair, a potential 30% performance improvement (assuming ideal conditions) isn’t to be sneezed at. But to be frank, it’s not enough to justify how much development time and risk multithreading the update call introduces.

But most modern CPU’s have more than two cores, and there’s still a big chunk of time on the main thread going unused (that blue block in the picture labelled “await”), which means we’re not done. What if we could *split* the “UpdateBehaviourals” method across multiple cores, by updating some of the creatures on one, some on another, and so on?


That’s a lot better: a whopping 70% improvement! (assuming ideal conditions and that this sample data is representative).

But even more importantly, from my perspective at least, the blue ‘await’ blocks are now on the other threads.We have spare CPU cycles, not on the main thread, but on the threads doing the AI.

This is the real reason I want multithreading in 0.12.0. I still have features I want to add, specifically to Creature AI.Creatures need to be able to rationally decide what movement method to use to reach a target, which requires increased situational awareness.Predators need to be able to find food from further afield, so they can travel to more habitable areas from across the map rather than just dying off once all the prey in their area are gone.Social creatures need to communicate with one another and factor those communications into their decision-making process. And each of those features will have an associated CPU cost, which I simply can’t afford at the moment.

But if I can properly parallelize the creatures “UpdateBehaviourals” routine…that is, not just offload it to another core, but offload portions of it onto all the other cores… then I’ll get a significant amount of spare CPU cycles to work with, and I’ll be able to implement those features without worrying about them impacting performance at all!

Of course, this is even harder to implement than the aforementioned “simple” option, which itself is nothing of the sort. But I’ll have plenty of time and incentive to whinge about those problems soon enough.

For now, let’s leave it on a optimistic note: if this works performance will scale with the number of cores you have.* More cores = higher creature cap!



* (assuming ideal conditions and that the sample data is representative and that the earth hasn’t been invaded by demons pouring from a terrible murder portal)

1 Comment

* Fixed bug causing uncontrollable population explosions when Automatic Population Control was set to “Niches”
* Fixed crash when setting Time Acceleration to 0 while the “Energy” information panel was open
* Fixed crash caused by new migration routine
* Allowed “Energy” information panel to continue to display change information when paused
* Adjusted “H&C” Automatic Population Control to keep the maximum population a bit further away from the creature cap

Leave a comment – Aesthetics and Balance




* Sedimentary layers visible in cliffs.
* ‘Fallen Fruit’ (Fruit/Pinecones) now visible on Palm Tree, Bunya Pine and Norfolk Pine (to better communicate that P. specium *can* get food from the large trees).
* Terrain lighting angle adjusted to make the game less dark overall.
* Creatures will now (attempt to) migrate to a neighboring zone if they’re hungry and can’t find any food source that meets an “optimality” threshold.
* Predators that are suppressing population growth and hunting because of lack of prey will no longer suppress the hunger need, and will attempt to migrate instead of idling or occupying themselves with other behaviors.
* “H&C” automatic population control adjusted to try and maintain the population of both at a higher number and reduce the number of extinctions (even if it means capping out sometimes).
* Sat Map will now display the species average of the creatures you hover over, rather than the individual creature.
* Species List (next to Sat Map/Clade Diagram) will now take you to a specimen when you click on a species name.
* No Audio Hardware bug should now be handled more gracefully (muting the audio and putting some error text on the Main Menu rather than crashing).
* “Out of Order” sign hung on the Web of Life (I tried fixing it and made it worse)
* Parking brake added to rovers (should reduce the amount of slipping down hills, especially on 10x speed.
* Droop and Balance costs slightly reduced.
* “Motivation” gene renamed to “Risk-Taking” to better communicate what it does.

1 Comment

Sedimentary Layers

Charles Darwin’s theory of evolution likely wouldn’t have existed without James Hutton’s concept of deep time, which he based on evidence from his profession as a geologist.

I’ve wanted layers for a while. It bothered me more than it should have that the cliff textures were vertically applied like all the other biome textures. So I took a bit of time out of trying to balance carnivores and did this.

I like it. I think it gives the world much more of a sense of age and natural history.



1 Comment

* Significantly reduced tree regrowth rate
* Reduced tree energy content
* Balanced oxygen absorption of advanced head types to make them less OP.
* Reduced growth cost of limbs.
* Adjusted creatures to take speed into consideration when deciding whether to race others for a food source.
* Increased the threshold at which Automatic Population Control starts raising food efficiency
* Adjusted “H” menu to show only the basic three efficiency options if “Niches” isn’t selected.

* Fixed a bug preventing Automatic Population Control from maintaining the population below cap.
* Fixed another clade-diagram related cause of crashes in long-running games.
* Fixed crash if “Forest Density” was set to 0

Leave a comment