Bayou Kaiju Postmortem


Bayou Kaiju Postmortem

Introduction

The Story:

Your friend's daughter, Dorothie, has gone missing.  Your friend, a biologist, had gone into the bayou to investigate a new species of lizard she had heard rumors about, and took Dorothie with her.  That morning in the diner, you overhear the locals gossiping about how the lizard men were going to get them and sacrifice them to the swamp monster if they weren't careful.  What a bunch of nonsense.  Who would actually believe in real lizard men or swamp monsters?

Late that afternoon your friend returns without Dorothie and is shaken to the core relaying to you the same rumors you overheard in the diner.  She begs you to go look for her daughter, knowing your tracking prowess especially in the bayou.  You agree but think all the rumors are crazy.  It's probably just some moonshiners protecting their still ScoobyDoo style.

The Motivation:

This is a prototype project based on the theme "Kaiju" or "giant monster”, and I think the prototype fits the overall theme of the assignment.  The actual concept for the game developed out of the rhyme that came to mind when I heard the assignment theme.  From that moment, I began considering, “What’s scarier seeing a giant monster in front of you?”  The answer, of course, is not seeing the giant monster that you know is there!  With the bayou as a setting for this prototype, restricting the player’s field of vision with vegetation and fog seemed the best way to give glimpses of the giant monster without outright revealing the monster from the beginning.

The story and gameplay sequence of the prototype is very simple and straightforward.  Get a weapon, find the girl, rescue the girl, and escort the girl back to safety.  This simplicity of story permitted me time to explore some techniques in Unity that I hadn't had time to pursue previously.  Primarily, this prototype was an exploration of some environment tools I had acquired a while ago but had never used, namely Aura 2 and Aquas 2020.  There were steep learning curves for both and optimizing them for performance was more than what I had time to do for this current project.  Getting these systems to work well with the Unity terrain system and with each other was feat enough.

What Went Right

Environmental Visual Effects

I’ve used the distance fog feature in Unity, and it does a good job, mostly, for producing aerial perspective.  The volumetric fog provided by Aura 2 really takes things to another level.  The mood I was able to create with it, providing shafts of light slicing through the trees, and mist hovering above the water, was exactly the look I was wanting to achieve.  This did not come easily, however.  Powerful tools often have steep learning curves, and Aura 2 was no exception.  The end result though was worth the extra work. 

Combining the atmospheric effects of Aura 2 with the water and underwater effects of Aquas 2020 turned out far better than expected.  With my kaiju breathing fire, and the Aquas shader being able to correctly render the atmospheric fog in front of the water surface, truly enabled me to have Smoke on the Water and Fire in the Sky, a perfect combination.  The other small detail that Aquas enabled were shore effects.  With the default Unity water system that comes with the Standard Assets package, the water surface simply terminates, penetrates, the shoreline.  With Aquas, I was able to produce shoreline ripples.  It’s a small detail, but an important one for making a game environment more engaging and immersive. 

Opening Cinematic

The Bayou Kaiju includes a number of voice-over moments, including an opening exposition.  In the initial iterations of the prototypes, it was easy for a player to rush forward causing voice-over clips to play on top of each other.  The solution to this was to provide a cinematic opening that mandates some separation between the initial expositional voice-overs.  Rather than a simple movie, though, the opening shows, from the first-person perspective, a boat ride through the game space down the river to the pier that serves as the player’s starting position.  During the boat ride, the player is introduced to the environment, directed on how to turn on and off a flashlight, and the motivation for the player.  Appropriately timed, this opening boat ride provides the separation between this exposition and the subsequent directive to find a weapon.

Kaiju Movement

The swamp monster (the kaiju that embraces the theme of this assignment) has three different movement behaviours.  The first is to fly a patrol circuit above the bayou switching between flapping and gliding and emitting the occasional long, wistful roar.  This is accomplished by having the monster execute a dynamic seek to a series of predetermined waypoints.  Setting a maximum turn rate prevents the monster from making unrealistically abrupt turns. 


Figure 1:  The Swamp Monster hovering over Warrior Island.

After the player has found where the girl in need of rescue, Dorothie, is and has dispatched half of her captors, the monster will quit patrolling and follow a quadratic spline path to a point above where Dorothie is being held and hover issuing threatening roars and spewing fireballs at the player.  The first attempt at enacting this transition was to again turn to a dynamic seek, but this yielded undesirable oscillations as the monster would overshoot the goal position.  Tweaking the maximum speed, acceleration, and arrival tolerance could have solved this, but I found it better instead to use a quadratic spline with a control point close to the end point.  This enabled me to precisely locate the hover position of the monster, and it produced the more realistic appearance of the monster slowing in speed at it moved into its hover position.

Upon dispatching the last of the Lizard Warriors holding Dorothie captive, the monster executes another quadratic spline to land on the ground in front of the player, issuing roars, spewing fireballs, and spreading fiery breath across the area.  This worked well and produced exactly the type of motion I wanted.  When the player moves beyond a given range, as they presumably are moving back to the shed, the monster will take flight again and follow a cubic spline, to that they both speed up and slow down smoothly at the two end points of the path, to arrive at the shed ahead of the player. 

Using splines rather than waypoints and kinematics allowed for much simpler motion and more precise motion.  It should be noted that these were useful only because there was zero possibility of the monster being interrupted in its progress along the path.  If it had been possible for the player to engage the monster at some point along the path from one behavior point to another, then a spline may not have been the right tool.

What Went Wrong

Combat System

Figure 2:  A lizard warrior squaring up against the player.

One of the biggest issues with Bayou Kaiju is the combat system and the combat balancing.  I attempted several techniques to try and prevent an enemy from being damaged merely by running into the player.  As it stands now, the player never has to actually hit the attack button.  They can simply run into the enemy lizards so that the hatchet collider contacts the lizard’s collider.  I attempted to dynamically change the tags on both the lizards’ spears and on the player’s hatchet, but this never seemed to produce the results desired.  My thinking was to only enable the “Player Weapon” and “Enemy Spear” tag during an attack action and to switch the tag to something else otherwise, thus giving a way to build a logic test into the OnTriggerEnter subroutine before dealing damage to the appropriate party.  I was able to disable damage by an enemy spear after an enemy’s death but enabling and disabling during and after an attack action never worked as planned.  I need to sit down and create a very simple scene and sort through this process carefully with easily represented objects such as blocks as characters and capsules as weapons.

Pathways not Clear

One of my goals in creating the gameplay environment was to make it a bit disorienting.  This was perhaps a goal too well achieved.  Even with a compass element displayed in the lower right, it was still very easy for players to become lost and end up walking around in circles.  It was also clear what your objective was, but not where you needed to go to achieve that goal.  A good suggestion that I did not have time to implement was to create visible paths or beacons.  While traditional paths do not make sense in a swamp, beacons in the form of will o’ wisps would have been appropriate.  In part of the opening exposition, direction could also have been given as to the direction to head to find Dorothie.  In the game’s current form, the player must walk around aimlessly until they happen across the right area.  There should be more direction and guidance.

Underwater Visuals

While the surface water effects and the depth shader with Aquas 2020 worked great, the underwater effects were a failure.  In the editor, the underwater fog effect worked spectacularly, but the fog effect was completely absent in the build.  This, apparently, is a known issue and one that I should have researched before selecting this particular asset.  The blurring and rippling underwater worked extremely well, and I could have adjusted the distance fog system when the player went underwater or used Aura to create a volumetric fog below the water surface, but these are solutions that should be unnecessary.



Figure 3:  The intended underwater effects as seen in the editor (top) versus in the build (bottom).

 

Lessons Learned

Spline Execution

The use of quadratic and cubic splines to drive fixed-path motion worked great.  By using splines rather than kinematic or dynamic motion, I was able to precisely control the path, end points, and velocities of the boat and kaiju in a far less expensive fashion.  One mistake that I made was that I put some of the spline executions in the Update method which is called every frame instead of FixedUpdate which is called every 1/50th of a second.  The result is that the motion along the spline is framerate dependent.  When the game is played on the highest graphics settings at the highest resolution, the motion is too slow.  Whereas, when the game is played with the graphics settings dialed down and the resolution reduced, the motion is too fast.  This is avoided by placing all motion scripting in FixedUpdate so that the motion rate is constant independent of framerate.

Volumetric Effects are Expensive

While I knew that the volumetric effects of Aura 2 would place a toll on the game performance, I didn’t realize just how taxing it would be.  The combination of the volumetric effects, the water effects from Aquas 2020, and the density of tree assets creates for a very resource-intensive game.  Even on my Intel i9900k with 32 MB of RAM and a GeForce RTX 2070, I was only able to run at a slideshow-esque 15 fps.  The take-away is that pretty is nice, but it comes at a cost.  In future projects, I will need to pay more attention to optimization.

Too Many Choices Leads to Confusion

Even though this world is small, it is open.  Open worlds can be great for explorers, but they can also be frustrating when there is no clear directive on where the player should go or where they can find their quest objective.  In Bayou Kaiju, too many choices are left for the player, choices on where to go, whether to get a weapon, or how to explore.  The openness and abundance of choices, especially in an environment designed to limit field of view, leads too easily to confusion and frustration.  There is a balance to be found here.  More directive on where the various objectives are in the game, more voice-over to encourage players not to overlook certain objectives, and easier navigation would have benefited the game greatly.

Files

BayouKaiju_PC_Build_v1-1-4.zip 227 MB
Apr 12, 2020

Get Bayou Kaiju

Leave a comment

Log in with itch.io to leave a comment.