Unity Chan Saves The Day (PC Game)

The Project

Unity Chan Saves The Day is a semester long project which involves the ideation, programming, and development of a computer game at CMU. This project was done in a team of 3 and involved the implementation of technical concepts such as A* path finding, dynamic movement, AI decision making, and AI learning using Unity. Within the team, I was a major contributor to the coding, character animations, character design, environment design, and UI/UX design.

The Game

Unity Chan Saves The Day is a single player 2.5D platformer.

Goals

Collect fragments of magic particles

Solve gravity orb puzzles

Kill enemies

Get through all of the levels

Story

Unity chan (a japanese high school student of course) finds an artifact (power sword) in ruins after falling down a hole on the way to school She then becomes a magical girl. And is sworn to save the day from the demon king. Their spirit world is among our world but unreachable by humans and Unity Chan is trying her best to survive and escape from the spirit world.

Design Process

During ideation, the team started with a brainstorming session of the story, setting, characters, visual style, goals, and mechanics of the game. We started with a list of different options for each element, and we narrowed down the list through a discussion of feasibility and value. Because game development is risky and arduous, our team needed to handle risky parts of the development first. Our team focused on developing the environmental interactive elements such as gravity orbs first, followed by level and character design.

Level Design

AI Learning

We used a hierarchical n-gram predictor on the boss character. The script will predict the moves that the main character (Unity Chan) makes. Five types of actions that it predicts are “move back”,”move forward”,”attack”,”jump”, and “jump attack”. The script creates a new n-gram object which stores all of the actions in sequence. It then generates the n-gram table, which is used to create predictions.The script only updates the table whenever a new action is made.

Decision Making

Planning-based decision-making is also applied to the boss in the game. This is a special planning based algorithm because every event could happen more than once. Each node in the tree can generate 3 nodes, which means 3 events: “Get Energy”, “Get Angry/Become Normal”, and “Attack”. The boss will take the predictions from the learning component and plan the sequence of actions that it should take based on the HP cost. The planning also takes into consideration of energy (yellow bar) which prunes the tree, by removing the branches with energy below zero. The boss will not be able to perform an attack if the energy is zero, and each action cost a certain amount of energy. The target node also depends on another key feature, which is cumulative damage, where it takes into consideration of all of the damage in the sequence and picks the best one. The Boss is able to dodge and perform different kinds of attack based on the prediction. If the boss cannot gain more energy by consuming health and he doesn’t have enough energy to do an action, he surrenders and turns back to the normal color.