Maize

Maize is a horror collecting game that uses a flashlight for visibility as well as a shotgun to stun enemies. This is a game submitted for the October 2021 Game Jam in the Gamecraft club. We had 48 hours to create and submit this game with the theme "Harvest." Links to the GitHub and Itch.io are below
Contributions
  • Camera Follow

  • Collection

  • Game Controller (Pause Menu)

  • Audio

Camera Follow

This script updates the camera position and smooths how it follows the player. This smooth effect slightly delays how the camera follows the player for a unique effect.

Collectible

This script starts by creating an enum CollectibleType that keeps track of what type of object the collectible is. This collectible script is applied to collectibles and the collectibleType variable can be set on the object in the editor. Upon starting the game, this code immediately finds any neccessary references. When the player collides with the collectible, it determines what type of collectible is being grabbed and uses the game controller to set the total amount of collectibles of that type.

GameController

The section of code I developed for the game controller primarily involves the collectibles as well as the pause menu. We start the game controller class by setting our initial variables for the game. Like the last script, upon starting the game we find all the necessary references for the class. When we run the update method, we check to see if the player has input the escape key and pause the menu if we did. setting the Ispaused variable to active is extremely important to ensure all background elements such as monsters are not moving and ensure the timer is not running.