Creatures of Worlds Adrift: A Beginner’s Guide

October 23rd 2015 · Colm Ahern

Hello everyone!

My name is Matkins and over the past couple of months I’ve been developing AI for the creatures of Worlds Adrift. The creatures will be a crucial part of the world, as they often pose a threat to players, but just as importantly, they’ll make the world a fascinating place for the player to explore and interact with.

Worlds Adrift is a persistent world and we decided the creatures should work the same way: Each creature is a persistent entity that exists as part of a simulated ecosystem until it dies, regardless of whether players are nearby. If they don’t feed they will starve, and if they don’t reproduce their numbers will dwindle. However, we want players’ actions to affect this delicate ecosystem, so what you do when exploring and harvesting resources will heavily affect the creatures’ food sources, habitats, and peace. Perhaps it would be best to keep this in mind! But in the meantime I’d like to give you some insight into how we’re breathing life into these magnificent beasts, hopefully without getting too technical.

Navigation

Usually AI controlled characters in games find their way around using a pathfinding algorithm. Such algorithms usually use pre-calculated data about the walkable surface, or navmesh. The result is AI that can figure out how to get from A to B very efficiently. Because Worlds Adrift will have potentially tens of thousands of procedurally generated islands, this kind of system would not be trivial to implement. And our creatures spend most of their time flying anyway, so navmeshes aren’t even that useful to us. We would need to create the 3D equivalent, nav volumes. But hold on a second. Is this solution really necessary?

CreatureConcept

Why should our creatures have inherent knowledge of the topology of each island? And why do they need to be able to get from A to B in the shortest route possible? Existing path finding solutions seemed highly optimised but not quite applicable to how our creatures should behave. So we decided to go back to basics and build up navigation strategies that were more natural and believable.

If a creature sees something of interest then it could move directly towards it, using avoidance steering to weave through any objects partially blocking the path, such as trees, rocks, other creatures, etc. But if it can’t see what it’s looking for it has to employ a search strategy. This varies from randomly wandering around when it’s not particularly urgent, to strategically gaining height and scanning a larger area of the island if desperate. Finally it will abandon the island and fly to another if all the above fails. We do not give any guarantee that the creature will eventually find what it is looking for. And if that means it ends up dying, then so be it.

So there you have it, a perfect simulation of a stupid creature. Ship it!

Well, hang on, we can make these creatures a lot smarter with another rather simple system. We can give the creatures the ability to return to things that they’ve seen in the past that they weren’t interested in at the time but are interested in now. We do this by leaving a “breadcrumb” trail. So just like Hansel and Gretel, the creatures can retrace their path through the rugged and forested terrain to get back to where they once were. This can be optimised as the creatures follow the trail back by skipping any breadcrumbs between the current one and the oldest one in view. And of course if the creature happens to see a different instance of what it is looking for whilst following the breadcrumb trail, it just abandons the trail and heads right for it. Creatures with memory are better equipped to sustain themselves, and it makes them a lot more interesting to watch too.

Sky_Whale

Behaviours and Drives

The creatures will have many behaviours, including the basics; feeding, fighting, resting, wandering, and mating. They also have fluctuating drives such as; hunger, anger, tiredness, curiosity and libido. Each creature is governed by their “behaviour picker” which determines the behaviour that should be active each moment. It does this by scoring each behaviour based on the multipliers it specifies for each drive.

With this system the creatures can be made to behave and respond in completely different ways by just adjusting these multipliers. We can use this to configure different species that are more aggressive, passive, exploratory, and so on. It also leaves open the possibility in the future of introducing new drives or new behaviours that fit neatly into the existing system.

So…what will be next?

We are working with three different species of creatures for now. From the bottom of the food chain to the top we have the herbivorous beetles, the aggressive and omnivorous manta rays, and finally the majestic sky whales. The rays and whales are less bound to any island and will tend to travel much larger distances than the beetles. The sky whales will be so large that players will be able to jump on them (though we haven’t decided if this is a good or bad idea!) Each species will behave drastically differently towards players.

Check out this video below to have a look at how the creatures behave, in-game.

Thanks for reading. I look forward to sharing more info and some sneak peeks of the creatures in action over the coming weeks and months.

Matkins (Matt Atkins)

Coder

Comments

36 Responses to “Creatures of Worlds Adrift: A Beginner’s Guide”

  1. ironkiskis says:

    The whole idea seems nice, but will there be any different species in the future? Something like dragons or hyper active monkeys? And them beetles in the video look too slow…

    • runix runix says:

      I think it’s pretty safe to say that there will be more than 3 species, yeah. Is still extremely early in development, after all.

    • frizzank says:

      I would love to see some that eat resources so you would have to compete with them.

  2. Frankie Frankie says:

    great idea devs nice work btw you need to increase the AI the speed a little bit 😀

  3. drakeny drakeny says:

    Oh man *-* this looks so nice, also, let us ride the whales!!

  4. novamonk novamonk says:

    Thanks for the info about creatures. Also thanks for the sneak peek at the lightning weather effect. 😀

  5. MrAmazing MrAmazing says:

    This looks amazing, but because you’re looking for an involvement with the creatures from the players, would the players be able to tame creatures in the game? Things like having the sky whales able to be controlled and even used as a form of flotation for your airships, or having them as sentries or being able to attach them to your ship as cargo carriers? I feel like this would be something interesting to add and would make interaction with the creatures more necessary. Also, what plans do you have in the case that an entire species might go extinct?

  6. Fenix Fenix says:

    Looking good! That’s a really nice approach to programming realistic creatures. Give them a form of memory, but not an all-seeing view of the world.

    Can’t wait to see more as this develops!

  7. GGreenBass GGreenBass says:

    I’m really curious as to how much thought you’ve put into how the different creatures behave and react in regards to things humans do. For example, would an insect become more aggressive as you move closer to its territory, or destroy some of its food sources or habitats, or just start throwing rocks in their general direction? Are some creatures more likely to flee? Could you do the opposite; provide them some kind of food or resource they need, and decrease their hostility to you? Have you thought about whether creatures will want to keep their distance from humans or simply ignore their presence? Are creatures likely to remember what a player has done, or simply remember that ‘humans tend to be dangerous’ or ‘humans tend to give me nice things!’, and react accordingly? If a species suddenly becomes widely hunted, can they die out? Will they make themselves scarce? Or if a player kills one of a creature’s kin, are others likely to notice and react in fear or in hostility?
    What happens if a player happens to construct a cage around one of the creatures, whether through clever (ab)use of the crafting system or physics engine? If trapped for some prolonged period of time, would they even be able to recognize that something is keeping them from their resources? Would this make them more aggressive?
    If a physics object hits a creature, how could a creature decide whether to blame a player?

    And then of course there’s the question of how they will respond to airships.
    But more than anything, I’m interested in giving you devs some brainfood, just something to think about. A lot of this may simply require waayy too much coding or system complexity or even just be somewhat impossible, but I think the more that creatures pay attention to the players’ actions and the world around them, the more lifelike not just the creatures, but the entire world becomes.
    Who knows, maybe space whales like giving rides to humans because humans tend to fend off some kind of predator! …That is, until you release a patch that suddenly makes their eyeballs a crucial crafting component.

    The degree of interactivity is obviously up to you, but I just didn’t want your team to run out of questions to think about 🙂

    • Anoki says:

      I really like these ideas.

    • Goober Goober says:

      Those ideas sound cool. I wonder if creatures will be able to evolve, or at least change their habits based on player interactions, like if a species of beetle is hunted to near extinction, they could perhaps evolve to fly faster or develop protective shells. Maybe each species could have 2 or 3 variations, tame, normal, or toughened, which they would slowly change into over many generations.
      This could also help in preventing total extinction of a species, as the tougher variants would be much harder to kill.

      More food for thought. Also I hope there will be cats :3

  8. shade-argost says:

    Question: Will we be able to tame and/or ride some of the larger variations of these animals?

  9. eashman eashman says:

    Who needs a ship when you have a skywhale, amiright?

  10. ARefrigerator says:

    WOOOHOOO!! Sky whales! My wish has been granted.

  11. kristakis kristakis says:

    +1 for whale riding!

    Will there be the option to capture/tame a creature to use as a pet? I’d love to have a guard dog prowling around inside my ships to give pirates a nasty surprise 😀

  12. Damascus says:

    Cool how much you get out of the creatures with just a simple raycast. So I guess there’s the possibility of stumbling across a bunch of different creatures intermingling, even attacking each other, and we can decide to mess with them or just let things proceed?

  13. greenjuice greenjuice says:

    Now we just need skywhale footage

  14. uberboom uberboom says:

    Is it theoretically possible for the creatures to go extinct? Or will they occasionally just spawn in.

  15. Anoki says:

    Why do the flying beetles have eight legs? Shouldn’t they have six?

    Also I would like to see some kraken-type monster for the skies aswell as the Sky Whale, something with long, threatening tentacles.

  16. azuratte says:

    All of the AI behind the scenes stuff, awesomesauce. Skywhales, yes please and thank-you.

    To the complaints!

    I don’t feel beetles flying like they do in the quick video… look good or make sense.

    They fly much to slow for a creature to flap wings that fast. To move at 3mph, they’re not long for the world. It really should be more of a jump/fly than a meandering hover. I realize you’ve taken the thought of a skittering beetle and enlarged it, making it slower. But would not a creature with that flight characteristic and size fly much less due to energy consumption?*

    Flight should be a gtfo move or drastic jump for next island move more than a casual flight over the meadow.

    *yup, read the part where they fly less than the other two creatures, still complaining though… mostly out of love.

  17. mitchell says:

    Will the whales be able to be battle scarred? so you could recognize them and have a sort of Moby Dick situation going on? Not that I would do that, but just that each persistent animal could be marked and recognized somehow, so that you might fly passed some old friends or something. Or could some animals recognize your player, and come to greet you. Or maybe you killed an entire manta ray school… except for one, and now hes devoted his life to tracking and hunting you down! IDK maybe have a species that can track you. You could tame them and use them to track other ships by like exhaust fumes or infrared.

    My main point is about how persistent is the interaction between players and animals. Like if you breed a few generations of an animal, will those animals be domesticated? Like if you released them to the wild, would they fear players?

    Personally I’d love to have a blood feud with a tracking creature. To just like look out into the distance and see the animal in the far distance, and be like “That scar on that wing…. It’s him alright, hes found me. MEN! STAND READY!” In like a super gruff pirate voice.

    • mitchell says:

      OH! you could have like a tech and instincts thing. Instincts never change and each animal has the same instincts. But teaching gets done from the parent. stuff about how the world works, who to trust, where to eat, mating spots, prime food spots, key points of interests, whether to kill players, or scam food off of them, and what herds they are friendly with.

      And without a parent they don’t have this teached knowledge. and knowledge older than a few generations gets replaced, so if you’ve domesticated animals for enough generations they become dependent on you or think of where you domesticated them as “home”.

  18. ThunderWolf says:

    It looks amazing, add the species to which you can fly.

  19. stickboybob says:

    throw in a couple sky whales and you’ll pretty much have windforge 2.
    and man do i want that. god yes.

  20. finsaur says:

    I would maybe like a taming system, I assume that it would be difficult to implement, I just want to ride a giant beetle into battle.

  21. HybridLiam HybridLiam says:

    Imagine taming some creatures and making them stick onto other players airships to basically weigh them down to the abyss! haha – Don’t take this idea seriously lol

  22. Alteraphim says:

    What happens when a species goes extinct?

  23. Addianis Addianis says:

    You all can have your skywhales and beetle riders. I want to have a whole school of wind rays follow me as my buds. Just wandering along and out of no where you see this large school of them and people get all worried. Then see my ship and become relieved that it is only I.

  24. SakaiLeonard SakaiLeonard says:

    What about an eagle meets Ikran that is the only truly tame able creature which can be ridin and be used to swoop down and snatch an opposing ships crew off the deck and are fed using a specific resource.

    And how about a cloud turtle a massive but docile creature the eats trees whole

    I like the idea of hitching a ride on the creatures but I feel that taming them just eliminates the core purpose of the game. One species could work but the aren’t so big that they replace the ships.

  25. ann0minus ann0minus says:

    All these cuddley anthropomorphic desires for symbiotic game play with the whales & the rays have potential but belie the known physics in our real world.
    After all the only predators of the whales & rays in our oceans is mankind.
    That said ~>The benefits of Pandoran/Avatar relationships with other elements in the game has great potential. I feel the behavior of any other creatures in the game should manifest actions like swarms, predation, & even environment destruction. After all as players we will inevitably be doing exactly those things to every sky island we touch.
    Keep up the good work.
    Up ship ^ ~ “Eyes open; no fear.” ~ S0

  26. TwistedLogic TwistedLogic says:

    I’m interested to see what other behavioural characteristics develop later on 😮 I’m always interested in seeing more natural behaviour in games, especially ones like WA. Keep up the good work! 🙂

  27. Brandon1234 says:

    i read some comments and maybe they can add some kind of sky wolf narwhal sword fish pack things that hunt sky whales and the rays (or the rays can be some how a rival) whales could have some kind of ecosystem that follow them around and attempt to protect them kind of how we have cleaner fish in our oceans but with more added on to the ecosystem around the whale

Leave a Reply

You must be logged in to post a comment.