Project1W21

From Immersive Visualization Lab Wiki
Revision as of 15:31, 23 January 2021 by Robinxu (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Homework Assignment 1: Social Distancing

Prerequisites:

Learning objectives:

  • Setting up Unity projects for 3D applications
  • Using the Unity editor
  • Building a 3D scene
  • Creating a real-time interactive application
  • C# scripts
  • Publish an application: create a Windows executable

Overview:

In this project you are going to need to implement a simple game on social distancing. A deadly disease (much deadlier than COVID-19) has spread throughout the world and kills anyone who is within less than 6 feet (~2 meters) from an infected person that is not wearing a mask. The game is played in first person view in a 3D environment. People randomly spawn in front of the player, walking slowly towards them. The player's goal is to stare at them long enough for them to get reminded to put their mask on. If the person does not put their mask on before they get within 6 feet (~2 meters) from the player, the player gets infected and loses the game.

Our TA Haoqi created a demo video for you: Social Distancing Demo. The buildings in the background are optional.

We are going to give an introduction to this project in discussion on January 11th at 4pm. The due date for the project is Sunday, January 24th at 11:59pm.

1. Building the 3D Scene (30 Points)

The only visible elements of your scene are going to be the infected people that are approaching the player, and the masks they put on when the player is successful at staring at them.

We are looking for the following things in this part:

  • Choose a 3D model from the Unity asset store that represents an infected person. (5 points)
  • Also choose a 3D model for a face mask that you can put on the infected person. (5 points)
  • Resize both to match your application's scale. Note that 1 unit in Unity equals 1 meter. (5 points)
  • Create a collision box where the infected person's head is (or the collision box can cover the whole person). (5 points)
  • Position the player in the scene so that the player is facing the spawn points in first person view. (10 points)

The figure below shows a top-down view of the 3D environment you are creating.

Project1-schematic.jpg

2. Gameplay (70 Points)

  • Start a timer to keep track of how long the player survives. (5 points)
  • Every few seconds, spawn a new infected person in one of the two spawn points (randomly selected). (5 points)
  • Have the infected person walk slowly along their walking trajectory. The person doesn't have to move their legs. (5 points)
  • Draw 'crosshairs'/a 'reticle' (e.g., a small sphere) in the center of the screen, indicating the player's viewing direction. (10 points)
  • Allow the player to turn their head (i.e., the camera) with the mouse: support both left/right rotation and up/down tilt of the camera. (10 points)
  • Change the color or shape of the crosshairs/reticle when it intersects an infected person's head. At this point also start a 2 second timer. You don't need to display the timer. (10 points)
  • Once the 2 second timer is up, render a mask on top of the person's face. (5 points)
  • Detect when each infected person gets within 6 feet (~2 meters) from the player. If the person is not wearing a mask at this point, stop the game and display text such as: "You Survived <n> seconds." Show this message for a few seconds, then restart the game. (10 points)
  • Let the person keep walking until the de-spawn point, then destroy the game object. (5 points)
  • Tweak the game parameters (e.g., speed of the infected, frequency of newly appearing infected, size of collision box, sensitivity of mouse control of viewing direction) to make the game hard enough to be a challenge, but not too hard to be frustrating. (5 points)

3. Extra Credit (Up to 10 points)

  • Add a Skybox to your scene. You are free to use textures of your own choice. (5 points)
  • Trigger indicator: add a visual indicator (no text) showing how long the user has stared at a person and how much longer they need to do it (5 points). Examples:
    • Radial widget: Radial.png
    • Slider widget: Slider.png
    • Hexagons: Hexagons

If you have your own ideas for extra credit, email us (TAs and/or instructor). If we approve additional extra credit options, we'll add them here.

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.

To create the video you don't need to use video editing software.

If you can't make any screen recorder work, just hold your phone in front of the screen and record with a steady hand.

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.
  • Executable: Build your Unity project into a Windows .EXE file or the Mac equivalent and upload it to Canvas as zip file.
  • Source code: Upload your Unity project to GitHub: either use the Unity repository initialized from GitHub Classroom or any GitHub repository that you might set up on your own. Make sure you use the .gitignore file for Unity that is included in the repo so that only project sources are uploaded (the .gitignore file goes in the root folder of your project). Then submit the GitHub link to Gradescope by using 'Submission Method: GitHub', along with your Repository link and the respective GitHub branch. (Note: GitHub Classroom is only for starter code distribution, not for grading. Since we don't have any starter code for HW1, you can set up your own repo with Unity .gitignore file we provided and submit to gradescope too.)

In Summary, submit to Canvas with 1.Video and 2. Zipped Executable files (.exe, .dll, etc.), and submit to Gradescope with 3.Source Code