Death Maze!

FPS Death Maze!

This is a first-person shooter that I've been working on by myself for the past 3 weeks or so. It's being built in Unity, with art being done in Photoshop and Blender.

I haven't written much in the way of narrative, but the game is set in a hedge maze/garden that is being swarmed by a bunch of grim reapers. I have some cool ideas churning, so I'll soon start adding some context!

Player Weapon

The player uses  an energy weapon that shoots bullets that track to the target. Behind the scenes, what's happening is the player sends a raycast out from the cross-hairs every time the mouse button is pressed. If the raycast hits an enemy, the specific spot on the enemy gets marked and sent to a bullet that gets instantiated. The bullet then uses the Vector3.MoveTowards function to move to its target. To give the bullet the cool arc, I have the bullet use Transform.RotateAround to rotate around the target at a random speed as it moves toward it. To make it more interesting,  I gave the bullet a trail renderer with a custom orange particle texture. I also made a small muzzle-flash sprite that appears in front of the weapon every time the player fires.

I really like this weapon. Not just because the arcing/tracking bullets are really cool and visually pleasing, but because the nature of the bullets also automatically balances the range at which you can fire. You can fire pretty far, and the bullets all move to the exact spot you're aiming for, but because of the arcing, there's a good chance that the bullet will hit something else on the way. This makes it so you can shoot from far away, but if you want to be sure that your bullet will reach it's target, you may want to move a bit closer.

Multiplier

After killing an enemy, there's a 1.5 second gap of time where the player's bullets do 10 points of extra damage on top of their standard 10 points. If in that 1.5 second gap of time the player can kill another enemy, the bullets get another 10 points of added damage and the timer starts again. As expected, if the player doesn't kill another enemy in the small gap of time, the multiplier cancels out and the bullets go back to doing regular damage. This allows for gunplay that feels more pointed and purposeful, and it also leads the player to strategize more (they can choose whether or not to risk defense to attempt to kill another enemy quickly and keep their multiplier going).

Enemy AI

On all the corners around the environment I have cover points. The enemies can move to these and around the map using Unity's builtin NavMesh. An enemy becomes aware of the player if the player is in the enemy's cone of vision and within 25 units (the enemy sees the player) or within 10 units (the enemy hears the player). The enemies have 2 states: offensive and defensive. For each enemy, it randomly picks one of the two states at the beginning of the game. 

Offensive

Offensive enemies are ones that make it their goal to reach the player. At the start, they find the closest unclaimed cover point that is out of view from the player. After a random amount of time (between 5 and 20 seeconds) they find a new cover point that is closer to the player. If they reach a point where the player is closer than any other cover point, the enemy comes out of hiding and attacks the player. 

Defensive

Defensive enemies try to stay hidden from the player. They start out by finding the closest cover point that is out of view from the player. They then sit there and wait for the player to come into view. When that happens the enemy starts attacking while simultaneously moving toward a new cover point that is out of view of the player.

DeathMazeGif2