ququasar

I am not Qu. I am merely borrowing his name. My true name would drive you all mad and usher in the end of times.

Homepage: https://speciesdevblog.wordpress.com

Species 0.10.0 Released!

It’s here! Species 0.10.0, aka. the “Predator and Prey” update (because, among the other changes, I finally fixed the problems that made hunting an impossible survival strategy).

 

http://www.speciesgame.com/download

 

131511407432412194

 

Features!

Initialise Predator and Prey: This option starts you off with a simple but mostly-functional two-species ecosystem to start your evolution from. Find it under the “Starting Creatures” dropdown on the New World page.

Temperature: click on any creature to see it’s internal and external temperature, relative to it’s ideal temperature. This will gradually change relative to their insulation, mass and warm-bloodedness.

Stamina: This shows up as a yellow bar underneath health (the green/red bar) and food (the blue bar). Doing stuff like sprinting and attacking will gradually exhaust creatures over time. This is tied intimately to the temperature simulation: an internal temperature that is too cold or hot reduces their maximum stamina and causes them to tire more quickly.

Litter Sizes and Pregnancy Length: About time we got to see some r/k-selection pressures. Species can now decide if they want to invest in individual children, or just spit out as many as they possibly can.

Multiselect: for all your bulk move, feed and murder requirements. Drag a box around the creatures you want to select and then click the tool buttons to use them on the selection.

Context Sensitive UI: Remember the Creature/Species/Ecosystem modes? Remember how awful they were? For the uninitiated, they were really awful. Just… so awful, you have no idea. But don’t worry, they’re dead now. They can’t hurt you anymore. Long live context sensitivity!

Better Water/Underwater Effects: They’re pretty! And possibly a hint about an upcoming feature. But mainly pretty!

Better Grazing: grazing creatures leave little ant trails behind them! This is super cool and also awesome.

Denser Forests: by default, that is. The changes to the vegetation system mean that creatures will find it a lot harder to kill off entire forests. Of course, you can still mess with the settings on the New World page if you want to encourage grazers.

Fruit: even the tall tree’s are edible to low-to-the-ground creatures now, once the fruit drops. Eating fruit doesn’t hurt the tree, which is part of the reason the forests are so much hardier now.

Bug fixes and minor improvements: Just a whole bunch of stuff. Fixed that bug that corrupted your save after a few hours when you made use of the Nursery. Added a really subtle particle system for seeds, changed the fire effects, added a camera icon on the sat map, consistant-ized the Temperature units, and made dozens of minor tweaks to the game’s balance and the creature’s AI. You get the idea. Lots of little things.

 

It’s a whole new world out there! I hope you like it.

 

Cheers,

Quasar

Advertisements

1 Comment

Welcome to the Team: Mike

Good news everyone!

 

brainwashed convinced a minion colleague to help me show them, show them ALL!!! out.

 

Mike Stankiewicz, (Stankiem on the forums) is joining the team, and will be working with me to expand Species audience and help bring the game to Steam.

 

Wish him luck!

1 Comment

Species 0.10.0 Experimental

Check it out here:

 

http://www.speciesgame.com/forum/viewtopic.php?f=31&t=2396

 

Beware the bugs.

 

Cheers,

Qu

Leave a comment

Praedator and Litatio – Part 1

(Note: This post was written a significant amount of time ago, but I never got around to posting it. With 0.10.0’s release closing fast, I’m publishing some of the backlog…)

 

I’ve taken a break from the vegetation system and have been implementing the Initialise Predator and Prey option.

 

Meet Primum praedator and Primum litatio. (lit. First hunter and First victim)

 

PraedatorAndLitatio

 

Cue the arguments over whether Primum litatio is blue or green.

 

I’ve tried to keep them both as basic and as close to P. specium as possible, aside from the obvious colouring differences. This has led to a few problems, and some necessary changes.

 

Most notable of these has been finding a way to make them dedicated herbivores and carnivores in spite of the fact that they have the same head type. I couldn’t give them one of the more advanced head types because there are multiple herbivorous and carnivorous branches emitting from the P specium head, and I didn’t want to artificially force them down any particular branch.

 

So, creatures have a new (and probably long overdue) invisible gene in their torso called “Digestive System”. Both head type and digestive system will factor into the “diet” stat, allowing them to move towards carnivory or herbivory regardess of their head type. There are limits: a fully herbivorous head type can never reach dedicated carnivory, and vice versa. But the naturally omnivorous starter head can reach both.

 

StatComparison

 

I’m not sold on it yet: I actually want to divide both stats by 2 so the most you can get with only one of them is 0.5, but with the current implementation this would mean that Primum Praedator wouldn’t be a dedicated carnivore. But it’s getting there.

 

Another problem I wasn’t expecting, but which makes sense in hindsight, was interbreeding.

 

131417732794336879

 

This isn’t really surprising. They’re just colour variants of P. specium with the digestive system change and a couple mental changes: Praedator is more aggressive (for obvious reasons), motivated (hunting being a high-risk high-reward behaviour, they tend to go for the biggest reward), and empathic (this prevents them from hunting members of their own species, or at least reduces the amount it happens).

 

To solve it, I introduced a number of small changes in other genes. Minor or invisible changes, wherever I could: tail curvature doesn’t mean much to creatures without tails, but it increases their genetic distance.

 

This wasn’t quite enough, so I also gave them eyes.

 

 

I would have preferred to let eyes evolve naturally, but I needed to keep them from interbreeding and the placeholder facial feature system is still quite volatile and doesn’t react consistently to natural selection. When I eventually overhaul it, I may revisit P. praedator and P. litatio.

 

The final change is to combat. To make hunting viable, attack damage has gone up and health pools have gone down. Praedator can currently kill Litatio in 1 punch.

 

Theoretically Litatio could do the same to Praedator, but they’re non-aggressive and an attacking Praedator doesn’t give them the chance to fight back. Short version: a P. specium’s attack damage currently exceeds its health.

 

I’ll probably reduce this to two hits before release.

 

So far, it’s been a partial success. Praedator is engaging in recognisable hunting behaviour, and even surviving to reproduce… for a little while. Their population is not stable, though, and they slowly die out over the course of a few generations.

 

Litatio, meanwhile, aren’t engaging in any prey behaviours (ie. fleeing) yet and I’m not sure why: they have eyes and a cowardly demeanor, so they should be. It may be a bug: I’ll have to look into it. Regardless, it’s not slowing them down any: they’re like P. specium on steroids, vacuuming up food and reproducing at a terrifying rate. Herbivory maaaaay be a slightly overpowered strategy right now.

 

Some improvements could be made: reducing the number of times they scan the envionment and ‘make decisions’ would speed them up a little (for instance, eating your prey after killing it shouldn’t require them to make a new decision), and maybe reducing the energy cost of running. Creatures run faster while hunting, but it costs more per meter than walking, and is somewhat redundant when you’re chasing down a recoloured P. specium that hasn’t even noticed you’re there.

 

Cheers,

Qu

1 Comment

Species 0.10.0 Release Schedule

Merry Holidays, fellow sapient organisms,

Species ALRE 0.10.0 will be released for community testing on the forums 8 December, 2017 (Friday).

The full version will be released on 22 December, 2017.

Quasar

Leave a comment

Vegetation System – Trees

 

The tree system has kept me occupied for a while now.

 

131365048499164085

 

Here are the problems I have with the existing system:

 

  1. Periodic updates – Size.

 

Updating tree’s only once in a while keeps them from destroying your CPU, but it also looks awful. It works fine when they’re just growing at 1x speed, but any time the tree’s try to update faster than that (such as during time accelleration, or when they are dying), it’s obvious that their animation is running at less than 1fps.

 

In order to fix this, I’ve had to completely re-think their growth mechanism. Previously, if a creature ate from it while it was growing, the tree would have to pause it’s growth while it regrew it’s foliage.

 

This isn’t a bad system in and of itself, but it made the size of the tree’s. A tree born at a specific time could grow uninterrupted to full size, or it could have leaves bitten off repeatedly and have to pause each time. So to define it’s scale we need to keep sending it from CPU to GPU.

 

This meant the periodic updates, in order to prevent the sheer number of tree’s from melting your computer (just kidding, I can’t melt your computer. It would explode well before that point).

 

But if it *wasn’t* unpredictable, if we could determine in the shader what scale a tree would be at that moment in time, that would open up different options…

 

So for the new system, instead of a single “scale” value, we’re sending two values to the shader: “TimeOfBirth” and “TimeOfFullGrowth”. Unlike scale, however, these values will never change: a tree will always reach full size at TimeOfFullGrowth.

 

These values are passed to the shader along with a parameter every frame called “currentTime”. Using the tree of them, the shader can smoothly interpolate the tree between it’s minimum and maximum size. Bam! No more periodic updates… well, for size, anyway.

 

  1. Periodic Updates – Consumption.

 

The other big piece of information I kept sending to the trees was their consumption level. This value determines how much foliage they display, and is why you can see tree’s ‘retract’ their leaves as they are consumed.

 

Tree’s will no longer do that in 0.10.0. Instead, tree’s will have exactly 4 consumption states: inedible, edible fiolage, edible fruit, and fallen fruit.

 

treeExamples

 

Tree’s will simply pop between states when their energy level gets high enough. To communicate the contained energy in a tree, then, they will have a set of bars when you hover over them, similar to the ones that appear over a creature when you hover over it.

 

131371100780464801 - Copy

 

The green bar is foliage, the cyan bar is fruit and the yellow bar is fallen fruit.

A bar has to fill up completely before becoming edible (and causing the tree to change states), and empty completely before becoming inedible (and, again, causing the tree to change states).

131371100184058716

Naturally, these states will also have varying attributes. For now, the main difference is that fallen fruit can be reached by any creature regardless of size, allowing even Primum specium to feed off of large trees.

 

Further down the track, foliage will have less carbohydrate and more fibre, and fallen fruit may have some sort of rot or decay associated with it.

 

  1. Growth-rate.

131369714598405604.jpg

Back when I was designing the biome system, I didn’t quite understand the definition of the word “biome”. A biome includes not just the ground cover, but the vegetation and fauna that inhabits it.

 

Obviously the fauna in species can take care of itself: doing any defining of my own on that front would defeat the purpose of the game. But you may have noticed that the ‘biomes’ in Species do a poor job of defining the flora on them. A large area designated “woodland” or “tropical rainforest” by it’s fertility and temperature can be completely devoid of non-grass vegetation.

 

This is because, in Species 0.9.0, tree’s don’t just appear out of nowhere unless the “square” it’s in has no vegetation of the appropriate type. A world-size 1 map is broken up into a 20×20 grid, so a “square” is around 25 pixels wide. You can see the pixel size in the previous post.

 

If the square already has vegetation, the game expects it to reproduce on it’s own. Tree’s reproduce once they reach full size, spawning new tree’s of the same type in a radius around them. Only children that spawn (or ‘seeds that land’) on a viable biome will actually start to grow: a cycad tree won’t grow if it spawns on a savanna biome.

 

This system allows trees to have hereditable and mutable stats: if a blue-tinged tree reproduces, it’s children will also be a close shade of blue. It also allows flora to expand into inhospitable biomes: as they stabilise the ground around them towards their preferred fertility, that provides space for their children to grow.

 

But it has it’s downsides. Suppose you increase the in-game fertility. Massive swaths of desert instantly become ‘woodland’, but it takes a long time for tree’s to start expanding into the region and as they do they are eaten by hungry herbivores. Especially late-game, herbivores can completely strip a map of tree growth.

 

Ideally, trees should be a feature of biomes. If an area is designated ‘woodland’ it should meet a specific density of woodland trees. Inversely, if an area has no trees, it should be desert or grassland.

 

But I also want to keep all the good features of the current system, especially the hereditability side of things (which has a lot of potential for the future). Some idea’s, like a soil seed bank, would potentially put those features at risk.

 

I haven’t come up with any big design-change to address these issues: instead, I’m simply optimising the values of the existing system. Faster regrowth is the obvious one: with the new smooth growth animation, I can afford to amp up growth rates. I’ve lowered the energy content of tree’s to compensate. I’m also attempting to optimize the biome stabilisation with faster fertility decay rates and stronger tree-stabilisation effects, but which only kick in when a tree is dropping fruit.

 

Speaking of the tree stabilisation effects: I got rid of the odd ‘pulsing’ effect by transferring them from shader parameters to sprites, which allows me to handle a lot more of them every frame. This has had some… odd… side effects on the temperature map. Tree’s now stabilise temperature, which can cause things such as tree’s pushing ice away in a large radius, but it’s worth it for the background benefits.

 

And speaking of temperature: large tree’s now have shadows beneath them (like all the shadows in the game, they’re fake: just textured planes overlaid on the ground), and lower the temperature for area’s close to their trunk. This allows creatures to cool down by basking in the shade. The amount of cooldown shade can provide is capped at a few degrees, and does not stack with nearby trees, but I haven’t been able to replicate that for the shadow’s visual appearance. It can get a bit excessive in particularly dense forests.

131369715101530832.jpg

Cheers,

Qu

 

5 Comments

Vegetation System – Grazing

The ground cover/grazing system in Species 0.9.0 is a mess, but an interesting mess. It has a lot of strange little redundancies and quirks simply to remain functional. Much like myself, them. I feel a sense of kinship with it.

And so it must die. But let’s talk about it first.

In 0.9.0, when a creature decides to graze, they will always target a point either 200cm or 400cm away from themselves. This completely arbitrary distance makes up for a quirk of the cost-benefit analysis that creatures perform when deciding what to eat: a food source they are already standing on has no cost associated with walking to it. By making them move a distance before grazing, we increase the chances of browsing trees and scavenging corpses, as well as making grazing a slightly more interesting a behaviour.

The point they pick will be the highest ‘value’ point at that distance from them, which prevents them from grazing on desert grass if there’s green grass behind them.

They will then move to that location and begin the graze routine. While grazing, they gradually gain food while emitting a negative fertility aura around themselves. In theory, the negative aura should eventually exhaust the area and force them to seek out new food, preventing them from becoming a completely sessile organism.

This generally works, but the fertility-effect provided by fresh-water in 0.9.0 is extremely strong. In the right place on a ‘lake’ or ‘oasis’ map, a grazer can theoretically remain sessile their entire life.

[tangent]

This quirk, incidentally, is because of the way the underwater biomes work. The water in 0.9.0 is a transparent, blue plane, but the terrain below it isn’t actually tinted blue by water fog or lighting effects. The textures themselves are blue for underwater biomes in order to give the impression of depth. Unfortunately, those textures look really strange if they are uncovered, so a strong fertility-effect forces them to only appear underwater and to rapidly recede when the water does.

Obviously, 0.10.0’s water fog and lighting effects completely negate this need: I’ve changed the underwater biome textures to more generic rock/sand textures, so they won’t be unsightly when uncovered. That in turn free’s us to use a much less powerful fertility effect, which means groundcover re-growth rates on watery maps will be much more in line with what you see on landlocked ones.

[/tangent]

Back to sessile grazers.

In order to prevent sessility and to keep creatures moving about, I implemented a time limit to grazing. After a certain number of seconds have passed, a grazer will automatically reconsider their options. If they’re still hungry, they’ll reactivate the grazing routine… and pick a location 200cm or 400cm away from their current one to graze from.

This utterly arbitrary system works… okay, I guess? Better than it has any right to. But frankly, it’s a hack job, a Frankenstein monster of code, and I’ve never been happy with it.

The energy from grazing is extremely inconsistent: a savanna area might provide X calories before being exhausted, or it might never be exhausted due to regrowth if it’s near water or being stabilised by trees. The scale of the aura further increases the inconsistency and general wishy-washyness of grazing. It’s all-but impossible to tell how much grazing ‘energy’ a creature will be able to extract from an area.

So for 0.10.0, this has been completely reworked. Both the arbitrary distance and arbitrary time limit have been removed, and instead of an aura, creatures treat the individual pixels of the ground cover map as food sources.

131378010420944581

Each pixel is effectively an extremely low-yield tree.

131381811056673865

When a creature eats a pixel, the ground cover instantly reverts to 0 fertility, converting it into the ‘wasteland’ biome. Grazers will need to stay on the move in order to get enough energy from grass, and will leave a trail of consumed ground cover behind them. Large numbers of grazers will still have the ability to turn an area into a wasteland, but it will be the result of lots of small, sharp bites out of the ground cover rather than the large, gentle ‘aura’ bites they were taking before.

131364182180572873

For the moment, the ‘scanning’ behaviour prevents super-fast creatures from abusing this mechanic and scything their way across the landscape, absorbing every square of grass along the way. After eating a pixel, creatures re-analyse their needs and environment in order to decide what to do next, and I put them in idle for a second and make them look left and right when they do that. For the moment that’s okay, but I’m thinking of changing it from “scanning” to “chewing” and giving it a variable duration based on head type.

The end result of all is that the energy a creature gains from grazing a pixel is a measurable, quantifiable amount, based on the biome of that pixel, and open to the same optimality calculations as trees and corpses.

It’s also an acknowledgement of the simulations artificiality. You probably noticed the grid overlay in the above screenshots: we’ll be keeping that in 0.10.0. When your mouse is over a ground pixel, (as opposed to a creature or tree), you will be able to see it, as well as it’s energy content (either as a green mini-bar or as a number somewhere on the screen).

131382318067191176

In real life, of course, grass isn’t broken up into tiles like this. The system we’ve got in 0.9.0 actually goes to great lengths to blur the grid and hide it’s existence from the user.

But Species isn’t real life, and I’ve come to the conclusion that acknowledging the artificiality of it’s world isn’t a bad thing, especially if it allows me to improve the mechanics upon which the simulation is based.

Besides which, it’s in the tagline. “Artificial Life, Real Evolution.”

Don’t worry though, I’m not about to go all abstract and matrixy on you. Within the context of the game, the game world is the real world, not a simulation. Ground pixels notwithstanding.

Cheers!
Qu

5 Comments