Claymation Game
Project Type: Personal
Project Duration: In Progress (Hiatus)
Software Used: Unreal
Languages Used: C++, Blueprints
Primary Role(s) : Developer
About:
Over summer break in my junior year of university, I made an attempt to make my own game. This game didn't really have a title, so I just named it Claymation Game. I really enjoy the appeal of stop motion and I wanted to try to capture that in a runtime setting such as video games. This project because a pretty big undertaking besides the simplicity of the game design. I was in charge of designing, producing art, and programming. This project is incomplete but I gained a better understanding of the game pipeline as well as programming systems.
At the time of starting the project, I was incredibly fascinated by Little Nightmares. A side-scrolling platformer puzzle game where you play a small child in a world full of strange creatures. Playing Little Nightmares a lot of the moments encountered with the NPCs were heavily scripted, so I wanted to approach a similar game but the AI was less scripted and more systemic. I also wanted to try my hands at local multiplayer in Unreal Engine.
Player:
-
Local Multiplayer Functionality
The first thing I wanted to start on was the local multiplayer functionality. The main game concept was for two players to solve puzzles while being separated by a monster. The players would have the ability to take turns distracting the monster. Below is a very early work-in-progress of cooperative play. Unreal Engine made this relatively easy.
-
Interaction System
This game required an interaction system for players to engage with the puzzles littered throughout the world. So I created an interaction system much similar to the one you find in Little Nightmares. The player can only hold one item at a time and the object should be physically placed in their hands. It was important to create a framework for interactable objects to be easily expandable as each object can be used in different ways. As demonstrated below, the sledgehammer can be picked up and used to break other objects and the lever can be used to fit into the slot on the wall to manipulate the dumbwaiter.
-
Camera Spline System
Upon developing the game, I also came to the conclusion that it would need some sort of spline system for the camera to move along. What I did to achieve this was to create trigger volumes for the player to enter. When the player enters a trigger. The camera spline system is notified that it needs to follow a different spline and will snap to the new area. Now how does the camera know where to place itself along the spline? Well at first I chose the nearest point on the spline to the location of the player to be chosen. However, that created a lot of issues. Entire parts of the spline for the camera would be skipped over because there were other parts that were "closer". However, that isn't ideal. I wanted to try to capture some fun movement with the splines.
In the end, what I did was create two splines. One for the player location and the other for the camera location. The location of the player would be mapped to one spline and then the time value of that location along the spline would then be copied over to the spline for the camera. The camera can then be placed while maintaining the shape of the spline.
AI (Monster):
-
Simple Link-Based Navigation
For Claymation Game, the map is quite small. My idea of the creature is that it was almost as big as an entire room. I wasn't very interested in recast navmesh because the creature was able to cross rooms in one stride. I also wanted the creature to feel like it was maneuvering through the room by having the hands placed on walls and such, making it feel like it barely fits. So I thought of writing my own navigation graph that was much simpler. It is basically a bunch of locations with links to other locations.
The navigation uses A* to find paths. The cost to arrive at each location and the heuristic are calculated through euclidean distances.
Another thing I had to change was the path following. I didn't want to slide the creature across the room, instead, I wanted it to be run by root motion from animations. I would also then perform some delta correction so that the monster would land at the appropriate spots.
Below is what I was able to achieve along with a random wander behavior I quickly put together in a behavior tree.
-
Target Tracking System
Unreal Engine has a stable Perception System that works great! However, since I had multiple players and objects I wanted the monster to perceive. I needed a way to prioritize what object the monster should engage with. So I implemented a target tracking system much similar (and rougher) to the one shared by Crytek. The article was written by Rich Welch in the GameAIPro books.
http://www.gameaipro.com/GameAIPro/GameAIPro_Chapter31_Crytek's_Target_Tracks_Perception_System.pdf
I very much enjoyed this approach as the system would allow me to easily create and change configurations. Each configuration would then be used to describe a "track". The monster would manage then manage a series of these tracks and determine which object it had received to be deemed the highest priority. Creating the system I was able to create and test a little demonstration below. It is a bit buggy when it came to enemy movement. This is because the animations would be interrupted. There are two main approaches to this problem. One being to force the enemy to finish the current animation or to have a bunch of interruption animations.
Conclusion:
The game still needs a lot of work. One of the problems I ran into was that the monster required a ton of animations! Unfortunately, time ran out and other projects were presented to me that took higher priority. I hope to come back to this project in the future!