Topics: gameplay mechanics in Unity, including tags, collisions, and triggers
Related Reading: Class notes, zoom sessions, and Unity game mechanics instructions
A few reminders first:
Your Tasks:
Add at least two jump triggers to your game, providing extra jump height at pertinent locations.
While adding a jump trigger from scratch would involve starting with an empty game object, adding a coller, and attaching the JumpTrigger script, a SuperJumpTrigger prefab has already been provided for you in the Prefabs/ folder in the SLU Gameplay Mechanics package. You can simply drag one into the scene, then position, size, and configure it as desired.
Add at least one audio trigger to your game, which plays an interesting audio sound/effect when the player enters the trigger area.
Like the JumpTrigger, a prefab is available in the Prefabs folder that allows you to add these to your game quickly.
Add at least one teleport trigger to your game.
Like the JumpTrigger, a prefab is available in the Prefabs folder that allows you to add these to your game quickly.
Remember, you need to create an empty GameObject and position it at the target location for the teleport, and then link that location to the teleporter in the TeleportTrigger's script.
Create an object that provides a speed boost when it's collected. It is recommend that you create a Prefab for the object, once you've gotten it setup and configured properly.
Add at least two speed boost objects to your game.
Create an object that increases the game's score when it's collected. The object you use should be different than the one you used above for the speed boost.
Again, it is recommend that you create a Prefab for the object, once you've gotten it setup and configured properly.
Initially, you won't be able to see the score when the object is collected. You need to create a Heads-Up Display with a Score text box. Add that to your game as directed, and link it to the Player Scoring script, so that the Score will be updated as you collect objects.
Add at least five scoring objects to your game, and among them there should be at least two different point values.
If you haven't already, add some sound effects to the gameplay mechanics added above, including:
Note: To ensure the audio sound plays only when the event occurs, the audio sounds should be linked to the corresponding gameplay mechanics' scripts, and not to the AudioSource component.
In selecting audio sounds, you may use the sound files you've already imported from the SLU Prelim Assetspackage, but it is preferred that you find other assets from the Unity Asset Store. Alternately, you can use any MP3, WAV, OGG, or AIFF files you may have -- simply copy them into the Assets folder inside your Unity project directory.
Add some background music and/or ambient noise to your scene. You can place it on either the First Person Controller or the Terrain.
While there are some background music and ambient noise audio clips already available in the book and SLU Prelim Assetspackages, for this problem I specifically want you to find an external background music or ambient noise audio clip and add it to your scene. Again, Unity can use any MP3, WAV, OGG, or AIFF file (and maybe AAC? unsure...). You simply need to copy the sound file into the desired directory/folder within your project's Assets folder.
Again, there are many websites with other freely avaialable sound files (e.g. see the Links menu). Or you may even record your own audio sounds with many freely-available audio editing tools (like Audacity).
Finally, let's make your water more "water-like", by adding an effect that makes the player feel like they're underwater when the player goes into the water, below the water plane.
Like the JumpTrigger, three water prefabs are available in the Prefabs folder that allow you to add these to your game quickly. You simply need to position and size them as desired, and then configure the script parameters -- like water density and color -- to your liking.
Add some "life" to the scene. In particular, combine these mechanics with physical obstacles to create interesting gameplay challenges.
As noted in first Unity assignment, you should have already completed the three steps outlined in Canvas for installing your Unity project from git. This provides the foundation for you to relatively easily submit your assignment.
First, be sure you scene is saved appropriately. Please save it in the "Scenes" sub-folder inside the "Assets" folder. I recommend naming your scene for this homework something like "Hwk5_Scene".
Then, open either the "Terminal" application (on a Mac) or "git bash" (on a PC) and enter the following commands:
The second-to-last step should display a bunch of "create mode ..." lines. Then the last step, assuming it worked correctly, should display the following lines: