Gameplay Programming
Cat's Meow
Me and my team from UCSC GPM was given a challenge to make a game given a prompt
1) A Virtual Pet Game
2) In a World Run by Cats
3) Using Procedural Content Generation
Now, the catch was we needed to get our Design from Chat GPT
We made Cat's Meow
As expected, it is a Virtual Cat game in a world run by cats using Procedural Content Generation
Movement System
The Movement in the game was unlike any other Character Movement I have worked with. We had the challenge of bringing 2D assets into a 3D world with a Third Person Perspective camera. I chose to use Unreal Flipbooks and some tricky 3D Math to implement the functionality of 8 Directional Third Person Perspective Movement with 2D Assets.Â
Procedural Generation
With our world needing to use Procedural Generation, I made a basic grid based PCG system that spawns actors randomly into the map fine-tuned using user parameters and also the functionality to randomly choose 1 out of 4 maps everytime the player enters the world
Interaction System
I built the interaction system using a sphere trace and a dot product to make sure the interactable is in front of the camera. And the bound the 'e' key to some functionality to handle the Interaction
TPP Shooter
Shooter game with AI and shooting mechanics in Unreal Engine
Shooting system
The Shooting system in the game is done using projection. A vector is projected from the gun's muzzle in the direction of the normal of the muzzle. We get the impact vector whenever a collision is detected in the traced line. This is where we can spawn impact animation.
Artificial Intelligence
The AI is divided into two parts.
The Path Tracing AI mechanism makes the AI follows a valid path to the required destination. This is done by giving the AI a valid space to walk and a target. When the AI sees the player, it starts walking toward the player.
The Behaviour trees are used to control how an AI behaves when an event occurs. For example, when it sees the player, an event occurs, and the AI for walks toward the player. When it reaches a set distance, the AI starts shooting. It also follows a patrol path when the player is not in sight.
Health System
The Health system is built using impact collision between the player and the AI. The player and the AI are given a health bar and whenever they come in contact with a bullet, their health is deducted.Â
Tank Shooter
A fun game with tanks in Unreal Engine
Movement
The player tank's body moves along with the whole tank's movement. The player can use WASD keys to move the tank. The player tank's gun moves along with the crosshair. The tank's gun follows the crosshair in the 2d axis parallel to the body.
Shooting
The Shooting system is done by spawning and adding a force to the missile in the tank. According to the force, the missile's distance is determined. Both the players and AI tanks can launch the missile.
The Enemy System
When the player reaches a set distance, the AI starts shooting. There is a timer to ensure timed shooting. The missile should hit the collision body of the tank or the enemy to deal damage.
Rolling Ball
A ball rolling game with cool physics and multiple levels in Unreal Engine
Movement
The ball's movement is made using the WASD keys by applying torque in the direction needed. It acts as a normal sphere when it interacts with objects. For example, when an upward force is applied to the ball, the ball is tossed high into the air.
Buttons and Bombs
The buttons or triggers are made to perform different activities, from activating a tile, tossing the ball up, lifting a door, etc. When the player interacts, the bomb pushes the player backward and reduces their health. And the health pickup restores a bit of the player's health.
Health and Progress bar
The player has a health bar to determine whether he loses the game. Player's health decreases when they interact with bombs and increases when they interact with health pickups. The progress bar shows if the player has collected all the coins in the level or not.
Levels
The levels in the game are handled by saving the state of the game. The important variables determine how the levels operate and how the player behaves. The game state is also loaded from the previously saved state when a new level is loaded. This means the player goes to the next level without losing progress.
Castle Escape
Steal the Gorgyle and escape the Castle in Unreal Engine
Carrying
Lifting objects is the way to progress in the game. This mechanism is linked to a right click. When an object is pointed towards it and the right click is held, The object follows the cursors and perceives lifting the object.
Triggers
There are triggers everywhere in the game. Firstly, the player must throw the skull to the other side to get the fake statue down. Then, there is a trigger to close and open the final gate to escape the castle based on the statue. You replace the real statue with the fake one and escape.