Goals for this homework

  • Continue to familiarlize yourself with Unity UI
  • Understand Unity physics and collisions
  • Become familiar with user GUI and basic game management

You are expected to complete this assignment individually. If you need help, you are invited to come to office hours and/or ask questions on Ed. Clarification questions about the assignments may be asked publicly. Once you have specific bugs related to your code, make the posts private.

Now that you’ve set up Unity and completed your first project, we think you’re ready for something a bit more complicated! You’ll be following Chapter 30 to make the Mission Demolition game, and we’d like you to start from scratch again to get the hang of setting things up. The code snippets will again be on the HW3 Gradescope assignment so you can copy and paste them easily in addition to some guiding questions.

Mission Demolition

To create the Mission Demolition project described in Chapter 30, follow the sectionss "Art Assets" and "Coding the Prototype" as described. Once you get to "To Prototype to First Playable," make the following modifications:

  • Adding More Castles: Add only one additional castle. It can be a replication of the castle image in the book – no need to overthink this!
  • Adding UI to Scenes: You should get used to using the TextMeshPro gameobject instead of legacy Text. You’ll just need to alter the code as follows:
  • Add “using TMPro;” to the header
  • Reference “TextMeshProUGUI” instead of “Text” objects
  • Additionally, the book says that the number of levels should be equal to the number of castles you make. This doesn’t necessarily have to be the case – you can reuse castle prefabs in the “Castles” array. I recommend making 3 levels and reusing one of your two castles.
  • Showing Different Views of the Level: Follow as directed.

Additional Features

Once you've finished implementing the game as described in the book, choose TWO more additional features listed below. For each one that you choose, write a paragraph about what you did (e.g. what is your scoring scheme or how do your new projectiles behave)

  • Design a scoring mechanism: Similarly to the Apple Picking project, implement a scoring mechanism and a high score tracker. It is up to you how you would like to score the game, whether it's by a timer or minimum shots taken.
  • Add multiple types of projectiles: Create two additional projectile prefabs that are distinct from one another (size, mass, bounciness, color, phyics material, etc). Have the game randomly select which projectile is equipped when the user activates the slingshot.
  • Add another material from the castle blocks: Create a new castle wall prefab that disappears when a projectile hits it. This wall should still interact with the other walls as normalphysics-wise. Add a few of these special walls to your existing castle prefabs. (Hint: Look into the "OnCollisionEnter" function!)

Submission

Submit all your .cs files to the HW3 Code Submission assignment on Gradescope. This includes CloudCover.cs, FollowCam.cs, Goal.cs, MissionDemolition.cs, Projectile.cs, RigidbodySleep.cs, Slingshot.cs, and any .cs files you made for your additional features. Be sure when submitting the video of gameplay to include a brief paragraph describing the additional features you selected and briefly how you chose to implement them.