Project1S20

From Immersive Visualization Lab Wiki
Revision as of 13:51, 31 March 2020 by Jschulze (Talk | contribs)

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

VR Whack-a-Mole

In this first programming project you need to create a simple Whack-a-Mole game for your smartphone with your VR viewer.

The idea of the game is to find the highlighted sphere among a 2D array of spheres, and click on it. The player has one minute to click on as many highlighted spheres as possible.

Project Description (100 Points)

Download Unity and do a Unity tutorial. Learn how to make Unity apps for smartphones and build an app (any app at this point) that runs on your smartphone. (10 points)

Use Unity to develop a VR application for your smartphone which implements a simple Whack-a-Mole inspired game.

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.
  • Take a picture of your surroundings (indoor or outdoor) with your smartphone and import it into Unity as a texture asset.
  • Paste the picture onto the wall so that it faces the user.
  • 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.
  • Create C# code to highlight a random sphere in a different color.
  • Create a cursor (eg, small sphere, line, etc) to allow the user to select a sphere by pointing their head at it.
  • Start the game when the user pushes the action button. This should start a 1 minute timer, which does not need to be displayed visually (see extra credit).
  • When the user clicks the button on the viewer, check if they hit the highlighted sphere and if so draw a copy of the sphere above or off to the side of the play area as a counter for how many spheres have been hit.
  • Un-highlight the selected sphere and highlight a different one.
  • Repeat the above until the timer is up. Then highlight all spheres at once.

Extra Credit (Max. 10 Points)

Options for extra credit are:

  • Display text in the app:
    • Instead of displaying the score as a number of spheres, display the number of "whacked moles" as text within the VR environment.
    • Display a message prompting the user to start the game
    • Display a countdown timer that shows the remaining seconds in the game
    • Display a message that the game is over, along with the number of correctly clicked spheres. (10 points)
  • 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).
  • New game play: come up with a game that also involves clicking on things but is more fun than the homework project. (up to 10 points)