Cinematography and Stealth Game Complete!
Finally! After about a week and a half, I am finished with the cinematography course! I had originally planned on finishing it last Friday, but ended up running into a few slowdowns. Regardless, I was able to finish it up finally on Wednesday!
Looking back at the project, I definitely learned a lot of new awesome techniques, some simple, and some a little more complex. To start, the cinema aspect of unity was awesome to see and learn, and really opened up my perspective when seeing cutscenes in games, and it is awesome to know that a lot of the camera shots and pans, I am now capable of creating.
Also a little side note, the timeline animator is truly an amazing feature, and the simplicity of it truly does not correlate with its powerfulness. Not only can you record certain camera shots, fade-ins, and outs, control game objects during cutscenes, but as Al had shown us, the timeline can be used to create near impossible script for things such as enemy movement or a zig-zagging fireball that can be used in-game. It was really awesome to see that you don’t have to be some crazy mathematical genius in order to create such functions. This is definitely one to add to my arsenal of tools, and I will certainly be incorporating this a lot more in the future.
Back to what I learned on my journey through the cinema and stealth course. When it came to the actual game, I really got comfortable using game object triggers. As simple as these essentially empty game objects are, they can be used very creatively to create some awesome functions. One of the main uses for game object triggers was to tell the game when to change cameras. Another cool use was to activate sound clips throughout the level. One of my favorite uses of the game objects were to create sightlines for our guards. It’s really awesome to think of all the different ways I could now do things, for example in the space shooter, instead of a distance function for my enemy charge, I could also create a child game object to detect whether my player is in the specified range for the charge. Now, I'm sure the first method is much more efficient, rather than instantiating a bunch of game objects, but it is cool to know that I could create this same function in a number of different ways.
The next really awesome tool I learned, is the use of raycasting. Raycasting is such a powerful tool and I imagine it is pretty much used in any shooter game to detect when an enemy or player is hit by a shot. In this game, we utilized raycasting to move our players as well as to throw a coin to distract the guards. This is definitely a function I would like to get stronger with and play with more as I’m sure there are many creative ways to use a ray cast.
On the final day of this project, I was introduced to two new scripting techniques. The first was a Singleton pattern, and the second was an Async operation.
The Singleton pattern is a very interesting piece of code that can be added to any script that needs to be referenced a lot in multiple scripts. This makes referencing and calling functions within the script extremely easy to do. In the script above, you can see both sides of the singleton in use. Everything above the update function is setting up the singleton, and the update, the code “AudioManager.Instance.PlayMusic();” references a singleton made in the AudioManager script.
The Async operation is very useful for things such as load screens. As you can see in the script above, “operation” can be used to track the progress of the load screen from the transition from the main menu to the main scene in the game. On the load screen, the progress bar fill amount will visually display the progress percent of the operation. Also very important, the yield return new WaitForEndOfFrame(); will ensure that the while loop does not crash the program, and allow the while loop to breathe.