Update 18: June 14th – 26th
Two weeks, more progress. Also I’m sorry about the title, it’s a joke about making the bird AI. I think it’s funny.
On the personal side of things, I’m about halfway through Shadow of the Colossus (ps3 remaster) for the first time- something I’ve been meaning to get around to for a while. It’s moody and engaging -certainly worth another playthrough before I give my thoughts- and I’ll be playing Ico and Nier (2006) soon after.
Development-wise, most of my progress has been on animations and AI for the bird (named AveApex in the editor), but we’ll see how much I relate about them in the future. I’ve also updated the website! I’m officially rebranding as Red Glacier Games, which has a sort of mystery to it that I’m fond of with other studios named similarly.
The Best Laid Plands Are Still Pretty Useful
First thing I did was apply my experience with the tribesmen (who I ought to add animations to for the polish pass) and planned Unity’s mechanim logic and animation setup ahead of time before jumping into blender and livening the bird up. While I’ve only got the basic flying, walking, and turning animations done now, they’re already fully compatible with Unity’s root motion movement and Blend Tree logic.
Certainly my biggest weakness in implementing the Tribesmen AI was the lack of planning that got involved with it. I made an effort, sure, but my lack of experience and hard decisions of how they’d play resulted in redoing them halfway through, while my lack of specifics in the plan resulted in figuring a lot of it out on the fly.
This time, I did things differently and in a manner my professors would actually approve of. I got out the pen and paper, wrote down and specified the knowledge and behaviors the AI would have access to, and wrote down/pseudocoded the majority of it’s capabilities with regards to the layout they would be coded (Actions, Decisions, Transitions) and with a UML diagram for the objects that would be involved. I also did a lot of math ahead of time so that I wouldn’t waffle around in the editor trying to make it work. (Spoiler alert: that still happened)
After much planning, the implementation of the flying AI went off with minor hitches (in retrospect) but still got weird about halfway through when I accidentally found a much better way to make them fly in a circle by having them chase locations based on a right angle between them and the circle node (found with a simple cross-product to the right the length of the node radius), wheras previously I’d have them adjust based on pre-determined angles per second, which made it hard to adjust the circle size in the editor or made it impossible for them to start up a circle when travelling between nodes. This was a breakthrough on one hand, but I wasn’t prepared for bug-fixing it (locking their angle after a circle was formed so that they wouldn’t oscillate their banking rotations) and figuring it out on the fly, which took some doing.
Essentially, what I implemented essentially boils down to:
- Birds can travel to nodes and start circling around the location at a fixed distance
Which doesn’t sound like a lot but it’s pretty cool, trust me.
Besides that, I also made the shadows a bit crisper, attenuated light (an easy addition to the shader that rounds out light values on surfaces) and got rid of the ambient light, which really adds to the cel-shaded look. The lack of ambient light is best seen in the screenshot of the flying bird up above (see how uniform the shadows are) and the attenuation is best seen below.
Well all I can really say is that next update I’ll still be working on the AI until probably late January, but who’s to say it won’t take more or less time? We’ll see. Next on the agenda is getting them to find targets and swoop down or land near them, then I need to give them seeking behaviors, and finally some basic combat AI. This is all gonna involve some weird programming I’ve never tried before and some new animation, so It could take longer than expected, but I’m optimistic nonetheless.
Until next time, cheers.