Pre-Lab: Due Before Lab on Friday, October 20
In this quest, your goals are:
- Learn about sprites and animation
- Learn about level design and generation
- Learn about prefabs
Before coming to lab, you need to complete the following:
- Go to https://classroom.github.com/a/5FNiF9I_ to accept the assignment.
- Check out your repository locally and make sure you can open the project. There may be a warning when you do so, but it shouldn't matter.
In Lab: Friday, October 20
Follow the tutorial found at https://unity3d.com/learn/tutorials/projects/2d-roguelike-tutorial.
You do not need to do the final lesson step on doing mobile controls.
You are welcome to begin the tutorial before coming to lab. The tutorial will take over an hour to complete, so you may run out of time in lab. You can finish it after lab as a part of the post-lab submission.
I HIGHLY suggest that the way you do this tutorial is to follow along with the coding, get it working, then REWIND THE VIDEO and watch it again, this time taking more time to process what is saying. Fight the instinct to just "get it done" and try to learn what it is you are actually typing!!!
NOTE: Some things are different in our current version of Unity versus the one used in the tutorial. The Unity team has provided some guidance, but you can't just blindly do everything and expect it to work. Think about what you are doing!
Changes to Video 12: Adding UI & Level Transitions: There is a change to the Unity API that a annotation pop-up and the included PDF in the root of the Assets folder discusses here. However, the solution they provide, doesn't quite work. If you have the problem that your level number goes up by 2, use the following additions.
First, add a new private variable to the GameManager:
private bool firstRun = true;
Then, include the following in OnLevelFinishedLoading:
void OnLevelFinishedLoading(Scene scene, LoadSceneMode mode)
//Don't run on first game load
firstRun = false;
//Add one to our level number.
//Call InitGame to initialize our level.
Post-Lab: Due Wednesday, October 25 @ 11:55 PM
Add to your game the following things:
- Read up about coroutines in Unity / C# here: https://docs.unity3d.com/Manual/Coroutines.html. Using a coroutine, add a timer that keeps track of how long you play the game. The timer UI should constantly update as the game progresses. The timer should be displayed at the top/middle of the game screen. It should not be displayed on the Day screen. The timer should not increase while the Day screen is visible - only when the user is actually playing the game. Display the final play time that has passed on the game over screen. Note that you MUST do this with a coroutine - using another method will earn no points.
- Add a new enemy type with animations (note: it does not have to exactly fit the visual design - sprite sheets can be hard to come by or create on short notice). This enemy will knock the player back one or two squares when it hits the player.
- Add the ability for the player to kill enemies by hitting them in the same way the player hits interior walls. How you handle the logic here is up to you, but it has to make sense and be reasonable in the context of the game (i.e. player still takes damage, maybe more damage?).
To help us grade, we ask that you create Windows and Mac builds for all of your Unity submissions to go along with your projects. However, you do not want your uncompressed builds to be included in your GitHub repos as that will result in a large number of changes to be continuously monitored. To create and submit your builds, please do the following:
- Create a folder called Builds in the root of your project folder.
- Use File > Build Settings to create your builds. See https://docs.unity3d.com/Manual/PublishingBuilds.html for more information on how this works.
- In your Builds folder, find your Windows and Mac builds. Archive the contents of this directory (select everything and right click choosing the appropriate option) and name the file
- Put the zip file in the root of your project folder and check it in as normal to GitHub.
Commit all changes to your GitHub repo before 11:55 PM Wednesday, October 25. Please include in the root of your repository a
README.md file either by creating the file or using the
Add a README button on the homepage of your repo. This file should include citations for any sources you used. Finally, upload the same contents of your
README.md file in a PDF called
README-compid.pdf (adding a link directly to your repo please to make it easier for grading) and upload that to the Quest in Gamer Card.