A Maze of Hope Postmortem


Introduction

When you are in a place of warmth and light, surrounded by friends and beauty, there’s not much need for hope.  Hope and perseverance are what you need to make it through the times when we do not have those things.  At the time of this writing, we are all under some aspect of a stay-at-home order due to the novel coronavirus, COVID-19, pandemic.  As a result, many of us feel like we are alone in a dark place, unsure of what the future brings and if we will ever be able to see each other again in anything other than by the pale, sterile glow of our monitors.

This game is a metaphor for our journey through these dark times when there doesn’t seem to be hope, that what hope of having the stay-at-home mandates lifted keep getting pushed back to later dates, and our sense of loneliness and aloneness are amplified daily.  There is light about us, though, if we know where to look, and as we quietly reflect and mediate, we find that there can be peace to be found in our solitude, and that there is hope for a better future if we also have perseverance to not give up.

Be not afraid of going slowly.  Be afraid of standing still.

Dotted throughout the game are illuminated Zen lanterns at which one’s character may pray.  Doing so displays a quote about hope and perseverance from famous teachers, philosophers, and sages.  As one continues to make progress through the assorted mazes and approaches the end goal of the cherry orchard in full bloom where your friends await, the sun becomes higher in the sky, it becomes brighter, and the terrain fills with life and vibrance.

What Went Right

Third Person Controller

For previous prototypes and projects, I had always used the Unity Standard Assets controllers which aren’t great.  I decided it was high time that I wrote my own controller.  While the third-person controller created for A Maze of Hope is not especially portable in its current form, it does provide a nice basis from which I can build a more generic controller for use in future projects.  The controller script now contains a lot of game-specific functions and model-specific commands to the animator state machine.  These need to be removed, but for this project, the character movements using the standard WSAD and mouse-look mechanics works well.

Dynamic Sun Movement

The fundamental mechanic of A Maze of Hope is the changing of the sun angle and intensity as the player progresses toward the cherry orchard goal.  Thinking of multiple ways to do this, I arrived at the simple solution of using a lerp based on the player distance from the goal location. 

The sun is modeled by the skybox as a directional light, so I began with the unit direction vector for the light as having a positive pitch, or from the perspective of the local Euler angles, a negative pitch.  The Y and Z Euler angles were predetermined, and only the X Euler angle was changed.  As the player’s distance from the goal decreased, the angle was migrated from a starting angle of -10 degrees to a final angle of 60 degrees.  The shallowness of the final angle provides good light and in the right direction for the ending scene.

Prayer Mechanic

Although risky with the religious connotations, I felt that given the specific theme and setting style of the game, I could make a prayer mechanic work.  Throughout the game, there are illuminated lanterns at which the player may have their character pray.  When they do, the motion controls are shut off during the prayer animation cycle and one of ten quotes from various prophets, sages, and philosophers on the topic of hope and perseverance is displayed.  This is intended to be a motivation for the in-game character as well as a reminder for the player themselves. 

I think the mechanic works well.  The timing took a bit of effort to sort out, and the cycle of kneeling down, praying, and standing up, took some planning to configure correctly in the animator state machine, but the end product works.  Choosing a unique and decorative frame for the sayings distinctly different than the standard dialog works to distinguish the prayer insights as holding more importance.

What Went Wrong

World is too Large

It was fun to decorate and lay out a large space, but it was really too much space for the game.  Less walking or running and more decision making would have been better for the core gameplay loop.  As it stands there’s a lot of running from one junction or point-of-interest to another with not much happening in between.  Compressing the space between POIs and intersections would have permitted a more condensed experience, and a more continuously engaging experience.  There was too much time between interesting moments that allowed the player to become bored.

Narrative is too Sparse

There is some narrative to the game, but not much.  It could certainly do with a bit more story to help improve the engagement with the player.  Currently, the player begins in a dark, rocky, snowy place, but no commentary is provided as for who the player is, how they got there, or what really motivates them forward.  Some guidance is provided as the player begins to walk, but I feel that the motivation for the player to continue with the game would be improved with a deeper backstory, and a people-connected reason to keep moving forward.  The character mentions her affinity for cherry trees, but that connects her to ta thing, not to people.  People and our connection to people is a key element of having hope, and I don’t think I delivered on that aspect well enough.

Need More Interactive Elements

Related to the previous two sections, more interactive elements would help shrink the downtime between game moments and would give more opportunity to tell the story and build the narrative.  There are many areas that could be explored by the player in more depth.  Searching around the castle in the first level could offer a clue as why the inhabitants are no longer there.  Same with the temple at the very beginning and the fortress toward the end of the level.  Each point of interest in the subsequent levels could be opportunities for player engagement and interaction. 

NPCs appearing with increasing frequency from one level to the next would be another method for increasing engagement and also for building the sense of hope as one gets closer to the end goal.  While I still feel that the first level should be devoid of people, I think an increasing frequency of NPC encounters would help tell the overall story.

Lessons Learned

Animation Ordering Matters

In trying to get the animation behaviours right, an important lesson learned is that order matters.  Now that should be an easy lesson, but there’s more to this than just ordering the sequence of animations, ordering the way in which commands are issued and variables are set within the animator state machine are critical.  My initial attempt at the ending scene resulted in an awkard mismatch of animation states and transitions.  The most embarrassing of which was allowing the character’s walk animation to continue playing while the pause menu appeared in the final scene.  The character didn’t move; they just walked in place.

Setting the various Boolean variables in the Animator state machine before sending the trigger event to execute the Formal Bow animation produced the desired behavior.  After seeing how well this structuring worked for the ending scene, I went back and looked at the method for having the character cry at the discovery of a dead end.  Sure enough, I was having the same issues there that were resolved by the same solution applied to the ending scene bowing animation.

Character Controller Component is Limiting

Using Unity’s built in Character Controller component is handy, but it does have its limitations and restrictions.  The biggest challenge in using this component is the restrictions that it places on directly changing the transform component of the character.  Translating the a game object with this component attached can only be accomplished through the Move() or SimpleMove() methods.  These are inconvenient if what you wish to do is to teleport to a different location instantly.

This behaviour is not required for this game, except for my own use to speed up testing, it could be a hindrance for game in which you do use a teleport pad or portal to jump from place to place.  The solution, or really the work-around, is to disable the Character Controller component, translate by updating the transform.position value, then enabling the Character Controller component again when you’re done.

myController.enabled = false;

transform.position = landingPosition;

myController.enabled = true;

It is a bit of a hack, but it works.  It would be better if there was a way to have this functionality built in without having to enable and disable the component.

Sometimes Invisible Walls are Necessary

I have always held a great distain for invisible walls in games.  It often comes across to me as a failure of level design.  If I am not supposed to go to a certain region, then show me an in-game reason why I cannot go there.  Running into an invisible wall is frustrating and breaks one’s immersion and engagement with the game.  Sometimes, though, they are necessary.  In the barren area, the third zone, of the game, there are mountains whose sides begin as being rather shallow.  They quickly escalate in slope and height, but this leaves saddle points between them that through persistent use of jumping, one may traverse and end up outside of the intended gameplay area.  To solve this, the best solution would have been to modify the meshes for the mountain models and eliminate the possibility of traversable saddle points.  In the interest of time, I chose to use invisible walls.  Even though I resort to using an invisible box collider to keep the player from going beyond where I intend for them to be, there is still a physical, in-game reason the player can attach to the impediment. You can’t climb mountains well while wearing a kimono.

Get A Maze of Hope

Leave a comment

Log in with itch.io to leave a comment.