Difference between revisions of "Project1S21"
(Created page with "=VR Whack-a-Mole= In this first programming project you need to create a simple Whack-a-Mole game in Unity. The game needs to create a 3D world, even though we're only going ...") |
(→Project (100 Points)) |
||
Line 28: | Line 28: | ||
* Repeat the above until the timer is up. Then un-highlight all spheres and display a message such as "The time is up.". (5 points) | * Repeat the above until the timer is up. Then un-highlight all spheres and display a message such as "The time is up.". (5 points) | ||
− | + | Here's a mock-up of what the game could look like: | |
+ | [[Image:S21-project1-mockup.jpg|500px]] | ||
Record a video off the screen while you play the game from start to finish. Make sure you include a shot of your final score. Upload the video to Canvas by the deadline. Also, add a comment stating which parts of the project you got done or didn't get done. | Record a video off the screen while you play the game from start to finish. Make sure you include a shot of your final score. Upload the video to Canvas by the deadline. Also, add a comment stating which parts of the project you got done or didn't get done. |
Revision as of 14:43, 31 March 2021
VR Whack-a-Mole
In this first programming project you need to create a simple Whack-a-Mole game in Unity. The game needs to create a 3D world, even though we're only going to use it with mouse and keyboard (exception: extra credit option).
The idea of the game is to find the highlighted sphere among an array of spheres, and click on it. The player has a limited amount of time to click on as many highlighted spheres as possible.
The project is due Sunday, April 18th at 11:59pm PT.
Project (100 Points)
Download Unity and do the Unity tutorial. Learn how to make Unity apps and get an app working (any app). (10 points)
Use Unity to develop a 3D application for your computer which implements a simple Whack-a-Mole inspired game. This application does not need to run in a VR environment.
Here are step by step instructions for it:
- Create a thin box that you use as a wall as the backdrop of your application. The wall's height should be approximately equal to your vertical field of view. (10 points)
- Using a photo camera or your phone, take a picture of your surroundings (indoor or outdoor), or some other location near you, with your smartphone and import it into Unity as a texture asset. You are allowed to edit the image as much as you'd like. (10 points)
- Paste the picture onto the wall so that it faces the user. (5 points)
- Create and place a 3D array of 5x5 = 25 spheres in front of the wall. Each sphere should be the size of a tennis ball (0.07 meters diameter), and the balls' center points should be 0.14 meters apart from each other (horizontally and vertically). Color the spheres in a color of your choice. (15 points)
- Create C# code to highlight a random sphere in a different color than the initial one. (5 points)
- Create a cursor (e.g., a line, small sphere snapping to closest object, etc.) to allow the user to select a sphere by pointing at it with the mouse. (10 points)
- Start the game when the user pushes the mouse button. This should start a 20 second timer, which needs to be displayed in text somewhere on the screen. Only display whole seconds, no fractions. (5 points)
- Display a sphere counter in a different part of the screen. This should be a number that can be up to 3 digits long. It starts with zero. (5 points)
- When the user clicks the mouse button, check if they hit the highlighted sphere and if so increase the sphere counter. (10 points)
- Un-highlight the sphere and highlight a different one (randomly selected). (5 points)
- If the user clicks on a sphere other than the highlighted one, the click should be ignored. (5 points)
- Repeat the above until the timer is up. Then un-highlight all spheres and display a message such as "The time is up.". (5 points)
Here's a mock-up of what the game could look like:
Record a video off the screen while you play the game from start to finish. Make sure you include a shot of your final score. Upload the video to Canvas by the deadline. Also, add a comment stating which parts of the project you got done or didn't get done.
To create the video you don't need to use video editing software, but you should use software to capture your screen to a video file. To record off your desktop computer, we recommend OBS Studio, which is available free of charge for Windows and Mac.
Extra Credit (Max. 10 Points)
Options for extra credit are:
- Instead of (or in addition to) highlighting the sphere that is to be clicked on, wrap a picture of a mole around it as a texture (5 points), or find (5 points) or create (10 points) a 3D model of a mole and load it instead of the spheres (10 points).
- Add sound effects to your game (5 points).
- Get your game working on your VR headset, or on your smartphone with a VR viewer (such as Google Cardboard). The video recording of a run of the game is still required and needs to be recorded off your VR device. (10 points)