Difference between revisions of "Project1S21"
(→Project (100 Points)) |
(→Project (100 Points)) |
||
(25 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | = | + | =Whack-a-Mutant= |
− | + | As if the original 2019 Coronavirus was not bad enough, there are now a number of mutated variants of it which are spreading among the world's population. One of the most concerning is the British B.1.1.7. Mutations develop randomly and in unforeseeable locations. Which makes for a great game concept! | |
− | The idea of the game is to find the | + | In this first programming project you need to create a simple game in Unity that resembles Whack-a-Mole, except you're whacking Coronavirus mutants. The game will exist in a 3D world, even though we're only going to use it with mouse and keyboard on a desktop or laptop computer (exception: extra credit option). |
+ | |||
+ | The idea of the game is to find the mutated viruses among an array of original Coronaviruses, and eliminate them. The player has a limited amount of time to eliminate as many mutants as possible. | ||
The project is due Sunday, April 18th at 11:59pm PT. | The project is due Sunday, April 18th at 11:59pm PT. | ||
Line 9: | Line 11: | ||
==Project (100 Points)== | ==Project (100 Points)== | ||
− | Download Unity and do | + | Download Unity and do a Unity tutorial. [https://learn.unity.com/ Unity's own tutorials] are great, but might also like the [https://drive.google.com/drive/folders/1OAT0axpdS46eNmh-6KGHX0GYR_as7w5W?usp=sharing tutorial from edX course CSE190x]. |
− | + | Learn how to make Unity apps and get an app working in Unity (any app). (10 points) | |
− | Here are step by step instructions | + | Use Unity to create a Coronavirus game for your Windows or Mac computer. The game does not need to run in VR, but there is an extra credit option for it. |
+ | |||
+ | Here are step by step instructions: | ||
* 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) | * 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) | + | * Using a photo camera or your phone, take a picture of your surroundings (indoor or outdoor), or some other location near you that Coronaviruses can live in, 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) | * Paste the picture onto the wall so that it faces the user. (5 points) | ||
− | * Create and place | + | * Create and place an array of 5x5 = 25 Coronaviruses between the player and the wall. Each virus should be roughly the size of a tennis ball (0.07 meters '''diameter'''), and the virus center points should be 0.14 meters apart from each other (horizontally and vertically). (15 points) |
− | * Create C# code to highlight a random | + | * Create C# code to highlight a random virus with a method of your choice (eg, change its color, let it pulsate, frame it, etc). (5 points) |
− | * Create a cursor (e.g., a line, small sphere snapping to closest object, etc.) to allow the user to select a | + | * Create a cursor (e.g., a line, small sphere snapping to closest object, etc.) to allow the user to select a virus by pointing at it with the mouse. (10 points) |
− | * Start the game when the user pushes the mouse button. This should start a | + | * Start the game when the user pushes the mouse button. This should start a '''30 second''' timer, which needs to be displayed as text somewhere on the screen. Only display whole seconds, no fractions. (5 points) |
− | * Display a | + | * Display a 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 and counts the number of whacked mutants. (5 points) |
− | * When the user clicks the mouse button, check if they hit the | + | * When the user clicks the mouse button, check if they hit the mutant and if so increase the sphere counter and mutate a different virus. (10 points) |
− | * | + | * If the mutant has not been clicked within one second, the mutant should degenerate back to a regular Coronavirus, and a different virus should mutate. (5 points) |
− | * If the user clicks on a | + | * If the user clicks on a virus other than a mutant, the click should be ignored. (5 points) |
− | * Repeat the above until the timer is up. Then | + | * Repeat the above until the timer is up. Then display a message such as "The time is up". (5 points) |
Here's a mock-up of what the game could look like: | Here's a mock-up of what the game could look like: | ||
− | [[Image:S21-project1-mockup.jpg| | + | [[Image:S21-project1-mockup.jpg|400px]] |
+ | |||
+ | You can use [[Media:coronavirus.zip|this Coronavirus model]] (source: [https://sketchfab.com/3d-models/coronavirus-covid-19-virus-991102145c294fe4b633faecc23f3799 Sketchfab]) | ||
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. | ||
Line 40: | Line 46: | ||
Options for extra credit are: | Options for extra credit are: | ||
− | * | + | * Add sound effects to your game. At a minimum, you need to have distinct effects for: whack and miss, whack and hit, time expired. (5 points) |
− | + | * To make the game more difficult, make the viruses move left/right and up/down a little bit in a randomized way. Each virus needs to move independently from the others. Tweak the motion parameters so that the game gets harder than without motion, but not too hard to be frustrating. (5 point) | |
− | * 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) | + | * 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 (or a streamed version of the video signal on your PC). (10 points) |
+ | |||
+ | =='''Submission Instructions'''== | ||
+ | |||
+ | Once you are done implementing the project, record a video demonstrating all the functionality you have implemented. | ||
+ | |||
+ | The video should be '''no longer than 5 minutes''', and can be substantially shorter. The video format should ideally be MP4, but any other format the graders can view will also work. | ||
+ | |||
+ | While recording the video, record your voice explaining what aspects of the project requirements are covered. Record the video off the screen if you use a VR headset. | ||
+ | |||
+ | To create the video you don't need to use video editing software. | ||
+ | |||
+ | * On any platform, you should be able to use Zoom to record a video. | ||
+ | * For Windows: | ||
+ | ** [https://www.laptopmag.com/amp/articles/how-to-video-screen-capture-windows-10 Windows 10 has a built-in screen recorder] | ||
+ | ** If that doesn't work, the free [https://obsproject.com/ OBS Studio] is very good. | ||
+ | * On Macs you can use Quicktime. | ||
+ | |||
+ | Components of your submission: | ||
+ | |||
+ | * '''Video:''' Upload the video at the Assignment link on Canvas. Also add a text comment stating which functionality you have or have not implemented and what extra credit you have implemented. If you couldn't implement something in its entirety, please state which parts you did implement and expect to get points for. | ||
+ | ** Example 1: I've done the base project with no issues. No extra credit. | ||
+ | ** Example 2: Everything works except an issue with '''x''': I couldn't get '''y''' to work properly. | ||
+ | ** Example 3: Sections 1, 2 and 4 are fully implemented. | ||
+ | ** Example 4: The base project is complete and I did '''z''' for extra credit. | ||
+ | * '''Source code:''' Upload your Unity project to Canvas: Create a .zip file of your Unity project and submit it to Canvas. | ||
+ | * '''Executable:''' If the .zip file with your Unity project includes the executable of your app you are done. Otherwise, build your Unity project into an Android .apk, Windows .exe file or the Mac equivalent and upload it to Canvas as zip file. |
Latest revision as of 14:58, 26 April 2021
Contents |
Whack-a-Mutant
As if the original 2019 Coronavirus was not bad enough, there are now a number of mutated variants of it which are spreading among the world's population. One of the most concerning is the British B.1.1.7. Mutations develop randomly and in unforeseeable locations. Which makes for a great game concept!
In this first programming project you need to create a simple game in Unity that resembles Whack-a-Mole, except you're whacking Coronavirus mutants. The game will exist in a 3D world, even though we're only going to use it with mouse and keyboard on a desktop or laptop computer (exception: extra credit option).
The idea of the game is to find the mutated viruses among an array of original Coronaviruses, and eliminate them. The player has a limited amount of time to eliminate as many mutants as possible.
The project is due Sunday, April 18th at 11:59pm PT.
Project (100 Points)
Download Unity and do a Unity tutorial. Unity's own tutorials are great, but might also like the tutorial from edX course CSE190x.
Learn how to make Unity apps and get an app working in Unity (any app). (10 points)
Use Unity to create a Coronavirus game for your Windows or Mac computer. The game does not need to run in VR, but there is an extra credit option for it.
Here are step by step instructions:
- 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 that Coronaviruses can live in, 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 an array of 5x5 = 25 Coronaviruses between the player and the wall. Each virus should be roughly the size of a tennis ball (0.07 meters diameter), and the virus center points should be 0.14 meters apart from each other (horizontally and vertically). (15 points)
- Create C# code to highlight a random virus with a method of your choice (eg, change its color, let it pulsate, frame it, etc). (5 points)
- Create a cursor (e.g., a line, small sphere snapping to closest object, etc.) to allow the user to select a virus by pointing at it with the mouse. (10 points)
- Start the game when the user pushes the mouse button. This should start a 30 second timer, which needs to be displayed as text somewhere on the screen. Only display whole seconds, no fractions. (5 points)
- Display a 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 and counts the number of whacked mutants. (5 points)
- When the user clicks the mouse button, check if they hit the mutant and if so increase the sphere counter and mutate a different virus. (10 points)
- If the mutant has not been clicked within one second, the mutant should degenerate back to a regular Coronavirus, and a different virus should mutate. (5 points)
- If the user clicks on a virus other than a mutant, the click should be ignored. (5 points)
- Repeat the above until the timer is up. Then display a message such as "The time is up". (5 points)
Here's a mock-up of what the game could look like:
You can use this Coronavirus model (source: Sketchfab)
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:
- Add sound effects to your game. At a minimum, you need to have distinct effects for: whack and miss, whack and hit, time expired. (5 points)
- To make the game more difficult, make the viruses move left/right and up/down a little bit in a randomized way. Each virus needs to move independently from the others. Tweak the motion parameters so that the game gets harder than without motion, but not too hard to be frustrating. (5 point)
- 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 (or a streamed version of the video signal on your PC). (10 points)
Submission Instructions
Once you are done implementing the project, record a video demonstrating all the functionality you have implemented.
The video should be no longer than 5 minutes, and can be substantially shorter. The video format should ideally be MP4, but any other format the graders can view will also work.
While recording the video, record your voice explaining what aspects of the project requirements are covered. Record the video off the screen if you use a VR headset.
To create the video you don't need to use video editing software.
- On any platform, you should be able to use Zoom to record a video.
- For Windows:
- Windows 10 has a built-in screen recorder
- If that doesn't work, the free OBS Studio is very good.
- On Macs you can use Quicktime.
Components of your submission:
- Video: Upload the video at the Assignment link on Canvas. Also add a text comment stating which functionality you have or have not implemented and what extra credit you have implemented. If you couldn't implement something in its entirety, please state which parts you did implement and expect to get points for.
- Example 1: I've done the base project with no issues. No extra credit.
- Example 2: Everything works except an issue with x: I couldn't get y to work properly.
- Example 3: Sections 1, 2 and 4 are fully implemented.
- Example 4: The base project is complete and I did z for extra credit.
- Source code: Upload your Unity project to Canvas: Create a .zip file of your Unity project and submit it to Canvas.
- Executable: If the .zip file with your Unity project includes the executable of your app you are done. Otherwise, build your Unity project into an Android .apk, Windows .exe file or the Mac equivalent and upload it to Canvas as zip file.