The Basics
This page shows all of the basic mechanics of my game, like player movement, animations, and boundaries/borders.
Player Movement
To set up player movement, I made a C# script that reads the players input using the Input class in unity. The Input class allows us to use the WASD keys to move our characted horizonally or vertically on the axis. To control the speed of the character, we multiply the direction, speed, and time.
After that I added the script to the Player object in unity.
Player Animations
I created the animations by adding the sprites into the Animator in unity. I used the Animator to setup which sprites show when the player is idling, walking vertically, or horizontally. The Animator makes it easy to set up the states of the character.
Player Tracking and Camera Bounds
I used a cinemachine camera. This makes it easier to implement camera movement. To make the camera follow the player object, you just go into the settings of the camera and set it to follow the player.
Next, I created map bounds by adding cinemachine confiner onto the camera. This allows you to set the boundaries of the camera. Doing this prevents the camera from moving to a new area unless you walk through the collider. When you walk through the collider, it triggers it to send the player through the transitional waypoint.
Borders
Borders can be added using collider objects in unity. Borders can create the illusion of a scene being 3-Dimensional by preventing the player from walking off of cliffs, into buildings, or any other objects in the scene. As you can see in the video, the player cannot walk over the "cliff," or through it.