Hi! Today is Day 40 of my 60 day challenge to become a Unity Game Developer!
I am almost finished with the game! Woot woot 🙌
Take a look:
All I have left to do is finish up a few more game manager and main menu components as well as clean up a couple of things. So far this game has been a little bit of a struggle for me. Getting the camera angles just right for the cutscenes was really tricky and time consuming and although I’m pretty happy with how they came out, I still feel like they could be a bit better. Going to try and work on that a bit tomorrow. The good news is that I learned soooooo much. Learning to use Cinemachine and Timeline showed me what powerful tools they are to be able to capture the exact cinematic style and look you envision for your game. One of the things I love the most about game development so far is the ability to really showcase your creativity and personality in your work. Very excited to use these tools in my own future games!
There was a lot that happened under the hood today so here is a brief summary of some of the things I worked on:
Creating the Animation for Guard Enemies:
In the animator a parameter was created to distinguish whether the guard should be playing its walking or idling animation.
Creating the “eyes” for my enemies:
- In order to be able for the guards to “see” Darren, the main player, and trigger the game over scene a 3d object needed to be created as the base. By turning off the mesh renderer, the outline of a collider was left which was then used to detect collision via trigger. By making sure the trigger was set to true and a rigidbody was added, the desired behavior was achieved.
- The purpose of this section was to create a distraction to move guards away so that the player can sneak past. Darren throws a coin which makes a sound and all the guards rush over to check out what is going on. This is what’s going on in the gif above. In order to make this happen I needed to instantiate the coin. I also needed to add in the audio clips of the coin hitting the ground, the voice over explaining how to distract the guards with the coin, as well as the animation of Darren throwing the coin.
- There are security cameras that can also detect Darren’s movement and trigger a game loss. In this section, I got a refresher on how to record an animation from scratch by moving the object in the scene view whilst recording. After that, just needed to add in a mesh collider and rigidbody in order to detect collisions. Also added in logic to change the spot light from green to red if Darren is caught within the trigger zone.
- Worked on implementing the sleeping guard cutscene at the given trigger point.
- Learned about the singleton pattern which you create a blueprint in which you can use one instance for all classes. It works by using a static variable to access the class which allows for more code optimization and abstraction. Also added in the intro cut scene and its audio clips.
- Work on main menu functionality.
- Want to redo some of the cutscenes.
- Need to fix the second security camera. Have very weird behavior where the camera appears to float off the wall and out the window.
Man, 40 days later, 2 games in, and I cannot believe there is only 20 days left from my original challenge date! It really is crazy how far I’ve come. I am really proud of myself for the progress I’ve made. Seriously can’t wait to see where I’m at by day 60.
See you tomorrow :-)