Yeah. Hello everyone. Uh we are Joson and James Darion. James. Uh and we do Rain World. I'm on creature design, creature animation, uh AI and general programming for the project and James. I'm doing level design and audio work and general narrative construction. And we're going to talk about procedural animation. Yeah. In Rain World. So, we thought to start things off a little bit and set the context for you guys, we will play a video. Here we go. Heat. Heat.
Heat. Heat. Cool. So, what is rainbow? Oh, thank you. Thank you. So, what is Rainworld? Rainworld is a survival action platformer where you play as that cute little white slug cat creature. Uh, and you're kind of existing in this large uh openw world
ecosystem of creatur of AI creatures. Um, and all of the AI creatures, the intention for us is so the they have as much agency as the player character. So, they are moving around the world independently. They're hunting. They're searching for food. They're afraid of things. Um, and all of the creatures kind of exist perpetually on screen as well as offscreen. So, you can come into a room, for instance, and you can see some interaction happening that's been going on for like 20 minutes, and you just sort of stumble upon it. Um, yeah, the gameplay is kind of learning to navigate through that ecosystem, uh, how the creatures of the world interact, what they want, etc., and sort of finding your way through it as sort of like an underpowered little little creature. Uh and of course avoiding the death reigns. Yep. So procedural animation is an important part of Rainw World. uh and procedural animation as I will talk about it today is basically animation
that does not happen by drawing frame by frame and also not by uh rigging a character and like replaying an animation but rather it's interactive code uh informing how the visuals will move. So let's take a look at some of these creatures. Definitely. Uh this one here we call the vulture. It's sort of like a large flying printer in Rainw World uh which can switch between modes. You see it can like climb like a monkey and then fly like a bird. And this is this is a concept that occurs quite a lot in the rain world like the dual nature creature which can switch between modes etc. This next one is the centipedes, which are completely disgusting because you can tell they're large bug-like creatures. Um, they kind of work with some sort of generalized sense of clockwork. You can see them all sort of moving at the same time. And you've got this sort of cool inverse kinematics in
the legs actions. I think they're disgusting. So, let's get that out of here. Here we have the reindeer, as it's called. Uh it's a very large creature which is not hostile but friendly or indifferent I guess to the character and you can climb in its antlers. Uh and down down at the bottom of the screen we have the worm grass which is very hostile but also securely anchored to the ground. So unless you fall down there it won't be a problem. These cute little guys are called lantern mice. And uh they're they're dumb, but they're they're very cute. And uh you can find them in dark environments. And as you see, you can use them as a source of like biolumination if you don't scare them off. And this one here is the leviathan. Uh it's a huge sort of mixture of an eel
and a centipede and a whale, I guess. uh which will gobble you up if you swim too deep and too carelessly into the waters of Rainw World. And these guys are some of my favorites. These are called Miros birds. They're like uh squawking, noisy, obnoxious half mechanical chickens. You can sort of see on their legs there's kind of like they have sort of actuators on the legs. Uh but yeah, they kind of hunt in packs and make like a loud racket. You're lucky that gifts don't have sound because it's it's obnoxious. These guys are the lizard and that's sort of like the the most reoccurring antagonist in Rainw World. They love the taste of Slug Cat, which is the main character. Uh the lizards come in different colors. So, the ones here are yellow, but we also have like the white one, for example, which can blend into its background like a chameleon and stay hidden. Uh, these guys hunt in packs, as
you can see. They like surround you and work cooperatively. And this one right here is called the scavenger. It's sort of the jewel of the rain world AI. And, uh, it's supposed to be equal to the player character in every way as far as movement. Um, it can use tools. It can It's, as you can see, it's perfectly comfortable on poles or on flat ground. And, uh, yeah, there's they're they're pretty intelligent. And you can see they kind of they look like they know what's going on. And that's something that we've been working hard on. Go for it. So, why is procedural animation important to Rainw World? Um, so we're trying to create the appearance of like a large natural open world ecosystem. And what procedural animation allows us to do is create a sense of agency and believability for all of the individual creatures. Because with um procedural animation, we can create a scenario where the AI behavior equals the behavior that you're seeing in the
game. For instance, um as you can see in some of the GIFs, uh when a lizard is hunting or something like that, you can see it see you. You can understand its motivations. When it can't um get directly to you, it gets visibly frustrated because it's trying to like navigate around the environment. Um, and that's cool because the player's then able to sort of project into that and project personality into that. So, you have um you have this situation where you have like the player will see a creature do something interesting that hasn't isn't like necessarily a scripted behavior and the player will infer from what's going on. They'll say like, "Oh, this creature is mad at me." Now, that's not really the case, but because we have all of the ingredients visible, it makes this kind of like effect of personality for the individual creatures. And and that's a lot of fun. It's different than if you were were to have, for instance, like a a blackbox scenario where we have a robot doing something and you can't like infer anything from its behavior because it just stands there and then
something happens and it moves. With a procedural animation, you have a a visible cause and effect, which is really interesting. Yes. So, a little bit about the technique. Uh, how do we do this? Uh, let's take a look here. So, one important aspect of how I animate these creatures is the separation of the physics simulation from the cosmetics. Uh, as you can see on the left side, that's a more simple simulation. Uh, when it comes to the actual like point per tentacle, th this this creature here is a tentacle creature that's coming out of the wall and like trying to grab onto things and pull them back. Uh, maybe I should explain a little bit what you're looking at here. The thin red lines, that's the path finding where they like try to find their way towards their goal in the terrain. uh the semi-transparent like squaryy
blocky lines that's sort of like the AI's understanding of the tile matrix because the terrain in Rain World is tile based uh making it not try to just like grab through a solid wall but be able to understand that it should uh grab around it and then you have the then you have what looks like beads connected by sticks right and that's the actual uh 2D float vector physics simulation which is quite simple. It's basically just like locking points at a certain distance. So if they're further away from each other, they are moved towards each other and vice versa. Uh why is that important? Why is it important to separate the physics and the cosmetics? Yep. That's important for two reasons. One of them is performance. Uh as James said earlier, what we do in Rain World is sort of like a perpetually existing world. So stuff is going on even when you cannot see it. Creatures
are interacting with each other when you even when you cannot see it. Meaning that there might be many creatures active at the same time. Sometimes hundreds probably probably sometimes hundreds. Yeah. Uh and what's important to note here is that the these two systems they have a one-way dependence. So like the the complex cosmetics are dependent on the simple physics simulation but not the other way around. Meaning that when the creature is not on screen, I can do only the thing on the left hand side. I don't need to do that. Saving saving processing cycles and also so the the dangly bits on the right hand side those are fairly processor intensive. Yeah, definitely. But they don't they don't need to happen unless you're actually viewing the because they don't they don't inform anything that has to do with how it interacts with other objects. Uh another important aspect of this is control. Uh the simple the simple simulation on the left hand
side is easy for me to tune and work with and get to behave the way I want. And then I can just put that uh the cosmetic layer on top without having to worry about some sort about it affecting the working behavior I already have set up. So, if I were to actually like create a physics simulation which had all of these dangly little hanging tentacle bits that might like uh pull at the main tentacle for example, weigh it down or it might like get into a bob wobbly state or uh become otherwise unstable. But because the dependence is only one way, I can always be sure that it will behave that way that I made it to behave. Pragmatism. Uh first of all, I guess I have to say that I'm coming at programming from an
artist's angle rather than the programmer's angle. So art is the goal and programming is the means, I guess. Uh I'm a self-taught programmer more or less and sort of like everything I do and everything I learn within programming is always about getting to the art result. So I have pragmatism in the way that I know what I want it to look like. I know what I what I want it to feel like and then the programming it's just about like getting there in the best way possible. It's not about building perfect programming solutions that are that have like purity of implementation. It's about getting to the desired result. Uh faking it is easier than making it. That's sort of the same thing like uh if I can choose between making a perfectly perfectly correct physics simulation of some complex phenomena or
just like make it look as if I'm doing that. I I will go for the latter. So basically, you could say that it's like an illusionist's approach. It's a smoke and mirrors approach. If you don't have to pull a rabbit out of a hat physically, it's better. It's way harder to make a rabbit actually appear in the hat than just having it look like that. And if if it's the same end result, all the better to go with the easier solution. So this is another very important aspect of what's going on which is that AI is animation in rain world. You cannot really draw a line between the two. Uh basically the AI has like the overarching unit which will make decisions and those decisions are generally along the lines of where should I go where should I move to. But then you also have the locomotion AI and the locomotion AI is equally is equally
phys is equally animation as it is AI so to speak. So locomotion AI would be about where to put my limbs, how to orient myself, how to like uh basically move through through the world and that entire thing is informed by the environment around the creature. So you might see, for example, that this vulture right here, at one point it makes like a wing flap. There you go. And that's that's not an animation I implemented. I didn't tell it to do that uh in that specific situation or at that specific time. That's the locomotion AI that figured out that maybe it lost both both its grasps or it didn't have like an ideal position to grab onto. So instead, it's switching to the flying motion and then back again. So let's make a rain world
creature. What are we going to make? Yeah. What are we going to make? We're going to make a rain world creature called the daddy longlegs, which is disgusting. It's like this giant ball of tentacles and it's kind of like it's sort of an ideal rain world creature cuz it's really messy and like it stumbles around and it's like lots of tentacles. very very many tentacles. You're about to see very many tentacles. Let's start with one. Start with one tentacle. I think I think I've described it as in between spider and spider's web. So, let's go. So, what's that? What's that? Uh the blob, the blobby looking thing. That's what's going to be the body of the spider thing. And then we have the little red dot, which is the goal it's traveling towards. And what's the red line? The red line is a line showing that those two things are connected. Uh so basically the AI will tell it where the little red gold dot will be. I
think maybe when recording this one I actually had it hooked up to the mouse but later it will be the AI and then I use an AAR path finding algorithm to find my way there through the terrain. And at this point it's very simple. It's basically like a like a car in a racing game, right? It's like uh a physics object that is just like moving towards its destination at an even speed. Uh but we don't want a car. We want something that looks like uh a living organic creature and preferably a gross one. Preferably a gross one. Yeah. Yeah. So, we put some legs on it. Uh you guys should remember these. It's basically the same tentacles as you saw in the plant that was in the wall, right? Yep. So, this this works exactly the same way. Uh the the squarish tentacles keep track of the grid matrix making sure that they don't go through terrain. And then you have the physics simulation which is sort of like where the
tentacles actually are. So look at the beads and sticks because that's that's where the tentacle is actually at. The other thing is more like its brain so to speak. So we want this creature to climb around in the environment. And how do we do that? What is climbing? Climbing is basically like making a decision over and over. And that decision is where should I grab? Where should I release? So you look if if you're climbing a tree, you look upwards and you're you're selecting a branch and you're grabbing it and you're pulling yourself up and you're selecting a new one. And you do that over and over. Uh and we want this creature to do the same thing. So what we're seeing here is a breakdown of one individual leg. Later we will, as promised, put many legs on this thing, but right now
there's only one leg. Um, and the problem to solve is where to grab on. You also recognize the blob and the goal. Those are the same things as earlier. And the red line there is the leg. And then I have drawn three dots. And those three dots are the system for determining where to grab. So the yellow one is the ideal grab position. If every single position in the room was a valid grab position, that's where I would grab. However, you cannot grab onto thin air. So, we have to figure something out to get an actual valid grab position, which is on terrain. That's what we are using the green dot for the temporary goal. So basically how that works is that I have a method set up which can grade every single coordinate on the screen with a score for how good a grab
position is this specific coordinate. Uh and if you're in thin air that's an awful grab position because you cannot grab onto thin air. But if it's on terrain that's a valid grab position. So, so say say if it's in thin air, then I might give it like minus infinity grab points. But if it's on actual terrain, then I want it to have a higher score the closer it is to the ideal position. So, what happens is that every single frame I pick a random position in the room or a random position close to the creature and I check the score of that one and I check the score of my current temporary position and if the new one is better, I switch them. Meaning that over the course of several frames, it will sort of like gravitate towards a better position. Why not just check every position and then pick the best one? because that's that's very intense on
the processor. This way it becomes easier and you might not always get the absolute ideal position, but you will get a goodish one. And I actually think that that little bit of like randomness to it adds some character to the to the animation. So that's not necessarily a bad thing. And then we have the blue dot which is the actual current goal position. So that's where the tentacle is moving towards. So how does this become a grabbing motion? Basically, the body is moving upwards and the leg is moving towards the blue dot and when it gets there, it latches on and then the body continues moving and when the leg is too far behind it, it releases and checks where is the current green dot, where's the current like temporary goal position and it goes there. It grabs on the body
continues. it releases and you have the you have the climbing basically. Let's see it in action. Let's see it in action. Here we go. So, there's nothing on here you haven't seen yet, but there's quite a lot of stuff on here. So, I might explain a little bit. There's the tentacles and the AI tentacles and the paw finding. And then you see the yellow dots, which are the ideal grab positions. So if you're climbing in a specific direction, you will want to put your limbs forward in that direction, right? Uh that's why they are sort of like in front of the creature towards its general vector. How does it it looks like it's looks like it's heavy. How does how does that happen? Yeah, that's another interesting thing. And that's a call back to faking it. It's easier than making it. Uh because instead of doing actual rope physics simulations on all
of these tentacles with elasticity etc which would be way harder than I could handle. It's way above my level. I do something that's much simpler which is that in every single frame I count the number of tentacles that are contacting terrain. And the fewer tentacles that are contacting terrain, the more the body is affected by gravity. And the more tentacles that are contacting terrain, the faster the body is allowed to move towards its goal. So in the in in sort of like the freef fall case where you don't have any grasps at all on the terrain, you will have 100% gravity, 0% like moving towards where you want to go. you just fall. And in the opposite case where every tentacle is grabbing, gravity won't be an issue at all and instead you get a very efficient movement. However, in in in the actual
environment, you seldom have either of those two extremes. You have like a few tentacles grabbing on and a few tentacles searching for new positions. And that makes it so that it's sort of like occasionally weigh weighted down and occasionally moving forward quickly. And because the eye correlates these two things, like you can see that when it's grabbing, it's able to move quickly and when it's not grabbing, it's less efficient. It actually looks like this creature is supporting itself by the tentacles, which is not at all the case. It's It's just floating through the air, but the illusion is created of being supported by the tentacles. Let's see how it looks. Throw some cosmetic detail. So, here we go. And this is what the creature sort of looks like. Uh this is the cosmetic layer. So, that's the
same thing as you saw with the two gifts next to each other, right? Where there's like the previous one you saw. That's what's going on logically. And this is the cosmetics layer, which is sort of like a paper doll just pasted on top of the logic, which is informed by where the physics objects are. Physics objects are, but not necessarily entirely like the tentacles are curvy rather than jagged like Yeah, exactly. Like the previous tentacles were jagged, but here I just like smoothed them out a little bit, etc. And there are more tentacles here actually like some dead dangly tentacles that in fact don't do anything in the game. Like they cannot interact with any other objects. But because they look the same as the actual tentacles, it's hard to tell which is which. So it just becomes like one unit, one gross unit. You can see it hunt,
right? Yeah. A hunting. Here we go in the game environment. So this creature here is blind. It's hunting by sound. So if you look when I hit the ground there, it's actually like reacting. And when it hears a sound, it will send a tentacle over there to uh to feel for what was doing it. And then it's grabbing onto me. So uh this technique comes from my specific circumstances quite a lot. Uh I'm I'm the artist, I'm the designer and I'm the programmer. And that means that I can sort of like work with the technical restrictions and find a sweet spot that works and is also the result I'm going for. Basically, instead of having to as a programmer go over to the artist's desk and tell them this is not possible to
implement, I can just like soft I I I can have like a soft approach where I just look for the compromise that is the best. Uh also these creatures are fantasy creatures. No, none no one has seen them in real life. So you don't know what they are supposed to move move like. So their movement being a bit little bit wonky is you have to give them the benefit of the doubt basically. So if you were to do a human or a horse or something like that, it would be very obvious. It' be very difficult. What if it's a tentacle creature? Yeah, that's what a tentacle creature looks like. No one has seen seen them outside of Rainw World. So what can other people take away from this? uh other people not working under my extremely specific circumstances. I would say that on the spectrum between art and programming, there are actually many design solutions that might not be
accessible if you're an artist or a programmer only. Even if you're an incredibly good artist and an incredibly good programmer on a team, you might miss out on solutions that are in between art and programming. So for that reason, I would encourage artists to learn programming, lots of programming, more programming than you're comfortable with. Uh it's worth it. It's not as hard as it looks. And I would also like to encourage programmers to learn art, learn what motivates artists, what are artists ideas, what is important to artists, the workflow as well. And the workflow definitely. So you can sort of like meet halfway. Cool. So that's our little chat. Thanks for listening. If you guys have any questions, please let us know up here.
Is there a microphone? If not, we're going to be hanging out. So, come grab us there. There's a mic right here if anyone has questions, but there are only a few minutes until we need to wrap up. Yeah. Thank you. Come grab us at the bar. All right. Yeah. Make sure. Oh, go ahead. Sorry. Yeah. Um, what uh physics engine do you use underneath? Sorry. What's Do you use uh a physics engine under the simulation or did you write all your own physics? Uh, yeah, it's homegrown. It's just Yeah, a weird rogue sort of homemade. Cool. That's great. Thank you. Anybody else? Is this PC or mobile or? Uh, yeah. Right now it's right now it's PC. We're going to do consoles and we're we're going to port it as far and wide as possible because you know we have
five years of sunk time. So as far as we can push it, we're going to push it. Thanks guys. Thank you.
Auto-generated captions from YouTube — names and numbers may be misheard.
Game Developers Conference · 2026
Game Developers Conference · 2019
Comments