Endless Hallways
This project was a 5-week project that I learned how to use both Unity and how to approach and use different game engines in general. Below is the result of the first week project.
Goals and achievements for this weeks project:
1. Dynamically manipulate the position, rotation, and scale of an object in the scene.
Status: Complete.
Cube automatically changes position going side to side and reversing direction when reaching the edge of the camera. Cube rotates when the START ROTATION button is pressed at a preset global value, and stops when pressing the STOP ROTATION button. RESET ROTATION button resets the rotation of the Cube.
2. Dynamically manipulate the color of an object.
Status: Complete.
Cube starts white and changes based on the RED GREEN and BLUE (RGB) sliders at the bottom right corner of the camera. The sliders at max value is 255 and 0 at min value.
3. Save and load some object state.
Status: Complete.
Saves the speed of whatever the slider value is at (out of 10), and can be loaded back when the value is changed.
4. Unique manipulation.
Status: Complete.
When the SPACE BAR is pressed, all of the button functions are disabled, the Cube rotates based on a randomly generated value, scales based on a preset loop, color changes on a preset loop, and speed changes based on a randomly generated value;
Week 2
Goals and achievements for this weeks project:
1. Have a player character that is controllable via the keyboard.
Status: Complete.
The Player cube is controllable using the W (Forward), A (Left), S (Backwards), and D (Right) buttons. The Left Arrow Key rotates the Player Left and the Right Arrow Key rotates the Player right. Space makes the player jump.
2. Have a navigable space that the player can't clip through.
Status: Complete.
Player is not able to clip through walls when running into them.
3. Have collectable objects that destroy on pickup and modify UI
Element that reacts to the number that you've picked up (e.g. score)
Status: Complete.
Gold collectables are scattered around the plane that add one to the score in the top left text box. The collectables rotate constantly and are destroyed upon collision with the Player. Also adds 1 to score upon colliding with Player.
4. Have both a 3rd Person Camera & 1st Person Camera follow the player
(and a UI element to switch camera view).
Status: Complete.
Press C in order to switch between cameras. The camera being used currently is displayed at the bottom right of the screen.
5. Allow the player to "shoot" in two ways. Way 1: Instantiating a projectile.
Status: Complete.
Press F to shoot a bullet object that follows the direction that the Player is facing when initially shooting. The bullet is destroyed upon impact of a wall or enemy, or is destroyed after 5 seconds if the bullet does not collide with any object. To switch Fire modes, press the TAB button.
6. Allow the player to "shoot" in two ways. Way 2: Raycast.
Status: Complete.
Press F to shoot an object in the forward direction that the Player is facing. The object that is hit by the Raycast is changed to a randomized color. To switch Fire modes, press the TAB button.
7. Add an "enemy" that reacts in some way to being "shot".
Status: Complete.
A red Enemy is spawned at the start of the program. The Enemy moves side to side at a constant speed and cycle of time. The Enemy has 10 health that is displayed at the bottom left of the screen. Upon the health reaching 0, the Enemy is destroyed.
8. Unique Additon
Status: Complete.
I added the jumping mechanic to the Player using the space key. I changed the Raycast shooting to change the object it collided with to a random color. I added extra texts other than the score so the player knows more information about whats happening, such as current Camera and current Fire mode. I added a health variable to the enemy and tracked it and displayed it using a text box.
Week 3
Goals and achievements for this weeks project:
1. An improved character controller
The character should be able to face multiple directions and shoot multiple
directions. You don't need to use both instantiation and raycasting anymore
- pick your favorite or keep both if you want!
Status: Complete.
The player is able to look and shoot multiple directions. I also have a free-look camera when pressing the C button. It is a little hard to see where you are shooting at the moment, but it should be better when the player is not a rectangle object.
2. A designed level
(You should design a level for your game using Probuilder. This is pretty open-ended, but keep in mind the level design tips from lecture. Pick 4 of the level design tips and explain in the README how you implemented them in your level.)
Status: Complete.
1. Alternative paths - once you leave the spawn area, there is 4 different halls that the player can walk through.
2. Gates and valves - The spawn area has a gate that can open by shooting the button next to the gate.
3. Use lighting intentionally - The lighting is not showing the much right now, but the lighting used on the wall of the room with 4 doors will have important information, so I set a couple of spotlights in that spot to show that.
4. Add fun little surprises - When walking through any of the four gates, you will return to the same room, which I will explain at the bottom, and the orientation the character is walking stays the same to sort of simulate walking in a constant loop. (Not perfect though since if you hug the walls, you will be transported to the center of the hall.
3. Baked and realtime lights
(The scene should be lit by a mix of realtime and baked lighting.)
Status: Complete.
The spawn uses baked lights while the other room used realtime lighting.
4. Use a NavMeshAgent
(Create an "enemy" AI (doesn't necessarily have to be an enemy) that tries to get to a target. That target can be the player, like an enemy that chases you, or another location, like in a tower defense game. The enemy should do something when it gets to its destination. For example, it could try to bump the player and damage them. Or it could stop a distance away from the player and shoot them. Or it could bump into its destination and make the player lose points until they shoot the enemy. Whatever works!)
Status: Complete.
Currently there is only one player that rushes at the player within a certain radius, but I am planning to spawn them in different ways and maybe have different types of enemies.
5. Unique Additon/Plans
For this game, I am planning on making it so that you have a limited number of arrows(bullets) that you can use. You can pick them back up as well if they are in the wall. The game I am trying to make with my hallway room, is a game where you have to enter the hallways of the room in a specific sequence in order to get out of the room. A riddle or hint will be displayed on the lit up wall on the opposite side that the player walks in on. There will be an object that turns green after each correct choice in the sequence is made, and when the player walks back into the room there will be health packs and arrow collectables that the player can pick up. On the other hand, when the player gets the sequence wrong, the entire sequence must be done from the beginning and enemies will spawn rather than bonuses. This week I allocated a lot of time creating the core mechanics (shooting arrows, camera, and the looping hallways), but now that I got a lot of that done, I can put more effort into smaller details and designs + enemy spawns and helpful drops.
Week 4
Goals and achievements for this weeks project:
1. Create at least one shader graph and apply it to an object in the game. Create at least one material using the shader graph that couldn't be created by just tweaking the settings on the default material, and apply it to an object in the game.
Status: Complete.
All of the textures use the shader graphs, but only the floor texture has a material that cannot be created by tweaking the default material (the checkered pattern).
2. Create at least one "local" particle effect. At least one particle effect that's tied to a location in the scene. e.g. a candle's flame would be a "local" particle effect.
Status: Complete.
The two lights closest to the door are local particle effects that drop snow to the ground.
3. Create at least one "global" particle effect.
A particle effect that follows the camera, some ideas:
- Rain
- Fog
- Snow
Status: Complete.
There is a rain that follows the player.
4. Create at least one "local" post-processing effect Bloom, film grain, etc.
Status: Complete.
When running to the back (opposite side of door) of the spawn room, there is a local post-processing effect that adds multiple effects, but most noticable is the added blue colors to the screen.
5. Create at least one "global" post-processing effect
Status: Complete.
Adds multiple effects that can be checked on the Global Volume.
6. Walking Animation
Implement a walking animation for the player
Status: Complete.
When walking, the player objects "walks" in a sort of step by step motion by "stepping" forward with each corner and loops.
7. Idle Animation
Implement an idle animation for the player.
Status: Complete.
When Idle, the player object slightly extends and retracts in a bouncy sort of way, that was intented to be a little like a "breathing" motion rather the super bouncy motion from the lecture.
Final notes -
Shoot = Right Click
Change Cam = C
Movement = WASD
Week 5
Goals and achievements for this weeks project:
1. Music
Have at least one song that plays in the background of your game. This should start when the level begins, and should not be affected by distance from the audio source.
Status: Complete.
Music Source: https://incompetech.com/music/royalty-free/music.html
2. Sound Effect
Have at least one sound effect that plays during your game. This should only play at specific moments, and should be affected by distance from the audio source.
Status: Complete.
Sound Effect plays upon arrow being fired.
Source: https://freesound.org/people/Lydmakeren/sounds/511490/
3. Main Menu
Have the game start with a main menu with a button that the player can click to start the game.
Status: Complete.
There is a menu to start the game.
4. Sound Settings
Have 2 sliders on the main menu that the player can use to affect the volume of background music and sound effects individually. These should save/load between playthroughs.
Status: Complete.
There are 3 slides: Master Volume, Music Volume, and SFX Volume on the main menu scene. They save to player prefs when they are changed and are auto loaded when going to the Menu Scene.
5. Pause Menu
Have the ability to pause the game during gameplay and go back to the main menu.
Status: Complete.
Pressing escape makes a PAUSED text appear with a button that allows the player to resume or to go to the main menu.
6. Build
Create one build of the game for Windows.
Status: Complete.
Build is located in the builds folder of the project folder.
Final notes -
Shoot = Right Click
Change Cam = C
Movement = WASD
Pause = escape
Font Source: https://www.fontspace.com/category/futuristic