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.
Another note about Ed. Ed is your community resource - please use those as discussions amongst yourselves. We are not monitoring it all day, rather we each have check-in times once a day. Therefore, you need to start early enough to wait for feedback and/or build a vibrant, supportive community that helps each other while we are completing other necessary tasks (research, developing assignments, preparing for lecture, performing advising tasks, etc.).
In this homework, you'll be working through a tutorial in the textbook to create your first game!
First, read and follow the guidelines in Chapter 17 to download and set up Unity. A few notes:
Follow the instructions in Appendix A to set up a new project. The project will be titled Apple Picker. You'll need to follow the following sections:
For the rest of this assignment, you'll be creating your own game! For this homework, you'll be creating everything from scratch, so you can get familiar with the entire process of bringing a game into reality. For future homework assignments, we'll be providing more skeleton so that you can focus on the more interesting parts.
You'll be following Chapter 29 in the textbook. Note that, as mentioned before, you’ll find that some buttons are in slightly different places, as the book is a bit outdated. That said, everything discussed in the book can still be done in Unity, so don’t worry if something isn’t exactly where the author describes. Also worth noting is that the HighScore section uses Text, whereas the default in our version of Unity will be TextMeshPro. You can still find Text in the Legacy section of the Unity menu, which you should use for this assignment.
The textbook has you hand-type code from the textbook, which we think is pretty silly. Instead, in the Gradescope assignment for this homework, you'll find all of the code snippets for you to copy/paste into your project, along with some guiding questions to ensure that you're following the code. Head on over to Gradescope now to complete this part of the assignment!
Once you finish implementing the game as described in the book, we'll have you make the game a bit more complex by adding two new types of apples. They are described at the end of the chapter as well, in the Next Steps section. The book also gives a bit of guidance for how to implement each of these. When an apple drops from the tree, it should have a 10% chance of being a Gold Apple, a 10% chance of being a Poison Apple, and an 80% chance of being a normal apple.
Hint: You can successfully implement both new types of apples without creating any new scripts (i.e. you don't need to make a goldApple.cs).