• Kylie Blair

Game Mechanics: Zen and the Art of Averting your Eyes


For an exercise in our digital games course, Ramona Caprariu and I decided to focus on game mechanics, and in doing so, created:

Zen and the Art of Averting your Eyes

For this exercise, we created a 3D sketch using Unity and pre-made assets from the Unity Asset Store. In order to meet the criteria of the assignment, we chose to use a non-stereotypical female protagonist, and we wanted to have our character be affected by an interaction.

In our early brainstorming stage, we decided we wanted to try and use a third person character, as well as AI enemies. We had both previously used first-person perspective controllers, so we wanted to try a new perspective. I also personally wanted to weigh the pros and cons of third person versus first person, in order to solidify this aspect of my final game for our class. We ultimately decided that we wanted to focus on AI and triggers for our game mechanic by having the AI follow the character when the character was in proximity to the AI.

While we felt that this interaction was enough to accomplish the task of the assignment, we wanted to build a setting and story to ground our game sketch in. We discussed moments when people chase or follow someone (specifically women, as we wanted to use a female character). We realized that, based on our own experiences, many women have issues when traveling on public transportation. We discussed how making eye contact with strangers has now become an invitation for certain people to harass or even assault individuals. In addition, very few people intervene in uncomfortable situations on the subway, as their physical bodies become barriers that keep individuals close to their aggressor.

Therefore, with Ramona's clever title, we decided to make Zen and the Art of Averting your Eyes. This sketch represents a young woman's struggle to stay away from perpetrators she gets too close to on the subway. It is a third person, escape / obstacle course game, where the player must run and escape AI while dodging people on the subway, in attempts to get to the front of the subway.

For assets, we used:

-cyberpunk character from the Unity Adventure Game Tutorial as our protagonist

- Subway level kit for subway exterior (now deprecated)

- Sci-fi modular pack for subway (now deprecated)

- Sci-fi modular pack for benches

- "Modern Female Professional Secretary" Model

- Man in a suit character

- Unity standard assets third person AI asset

- Video Game loopable music from PlayOnLoop

For assistance with code, we referenced:

- Unity's Roll A Ball Tutorial

-Unity's Survival Shooter Tutorial

- Brackey's Enemy AI for RPG Tutorial

We began by creating a rough-draft wireframe of our game using only Unity's standard assets. We wanted to incorporate a third person character, triggered AI, a Main Menu, a "Game Over" UI screen, and a "You Win!" UI screen.

In our first pass, we worked on inputing a third person controller, adjusting the camera, and making AI that stood in place. Using the roll a ball tutorial for reference, we began scripting a trigger. In this pass, we successfully used the standard third person asset to move and collect a sphere that would disappear upon collision.

In our next pass, we focused on making the AI move towards our character. The first step was to create a nav mesh agent on our third person AI character, to avoid collisions with each other and the world. The next step was to make a script for an AI controller. In the first iteration, the AI immediately ran towards our player. We did not want our AI to swarm the player, so we removed the AI Character Control script's target, and instead created what Brackey's calls a "look radius", a trigger that, once entered, causes the AI to follow you.

In order to keep track of our player's position for the AI, we created a script called "player manager" that is placed within our "game manager" empty object in our game scene. This made it easier on the system to reference a script, rather than constantly searching for the player's tag and updating the location of our player in reference to each individual AI.

At this point, the AI would follow our character when we entered their look radius. Next, we wanted to incorporate the rough draft of the menu screen, a "game over" screen, and a "game win" screen. We made different scenes for each of these screens. We made our build to begin with our main menu, with a button that would go to the next scene, our game. Next, in our game manager object, we created a script that would load the "game over" scene if the player collided with the AI. On this screen, we created a button that would loop back to the game. At this point, our game was successfully working: we begin with a menu screen, click to play the game where we run away from AI that are triggered, and if an AI catches us, it is game over, and we must try again.

We then began replacing the wireframe with more rendered assets. We first made the subway tube using the Sci-fi modular pack. We used the windows, hall, benches, lights, and doors from this pack. We changed the material on the walls to look more like a subway. We also used the animated doors to differentiate between different subway cars, and different levels of the game. We also animated the outside tunnel using the Animation component within Unity to keyframe movement in the tunnel to impersonate the subway car moving through the tunnel.

Menu Screen

work in progress with assets

Game Over Screen

Our main issues revolved around implementing our third person character. Our first issue was making her move and walk properly. When we brought her into to replace the Unity standard third person asset, we wanted her to reference the same animations as the standard third person character. Her model and rigidbody were creating collision issues with the terrain, causing her to be in a jumping position. To fix this, we had to adjust the rigidbody to fit her mesh properly.

Our second issue had to do with the camera. When the character moved, the camera pivoted too fast around the player, colliding through the walls of the subway, but also rotating in a nauseating circle around the character. This was due to the mechanics of the third person prefab we were using. To fix this issue, we adjusted the rotation speed of the camera, and we also removed the ability to walk backwards by changing the negative button in the input manager from "down" to "+", and "s" to "+".

issues with camera collision

changing the input controls to prevent camera collisions

Finally, we added the business men and women with mesh colliders to make it more difficult to run through the subway, thus creating an "obstacle course" feel. We also added a video game audio track to make it feel more hectic during gameplay, and we created a trigger for a "you win!" screen, to indicate the end of the game.

This exercise was a great way to experiment with third person controllers, UI screens, triggers and AI intelligence. We learned a bit more about C# and coding in Unity, as well as the framework for where to place specific scripts. In my opinion, the most valuable aspect I gained from this exercise was successfully creating an interaction between a character and an AI using triggers, and creating a repercussion for that interaction. I plan on using this game sketch in depth as the groundwork for the AI in my future game, Matsu.

Preview trailer of game: