CS 4331-002 - Virtual Reality Project 2
Due: Thursday, April 12th, 2018
Video Demonstration
Try it out
- Download the game on our project’s website (go back to the home page): https://webglhitasnag.github.io/
- Or from the latest release: https://github.com/WebGLHitASnag/VR-Project-2/releases
Project Report
We learned….
- …game development methodology and procedures.
- …that most of the development of our game pertained to tasks that were necessary in Project 1 (i.e. model placement and aesthetic design).
- …more about the Hydrologic Cycle than we thought there was.
- …about a small sample of Unity’s API.
- …scripting with C#.
Tools Used
Biggest issues
- Learning to use Unity and C# without any one in the group that has any prior experience.
- A majority of our time definitely went into knowing how GameObjects and Components were managed by the engine within the hierarchy. Moreover, how to write working C# code that performed as we needed it to.
- Small things like hiding buttons or delaying actions caused more issues than they should have.
- Integration of the project as a whole
- There were merge errors (i.e. duplicate Library data within scenes) between 4 branches of development and this caused a lot of slow down.
- Maintaining portability (i.e. not including any extra dependencies for the final build of the game to run).
- Taking into consideration the low level of performance provided by the computer in our lecture room, we wanted to keep the game as light as possible.
- Dealing with Unity’s randomness/unclear compile errors.
- Scenario: Project is saved, working changes are commited and pushed to their respective remote branches, Unity is closed. Unity is opened again and the game has reverted to a point in development that was before what was committed and the current working branch needs to be fast-forwarded.
- VR implementation
- Since this game is for our Virtual Reality class, we were hoping to be able to at least implement the use of the Oculus HMD and Touch Controllers into our game, but since no one on the team had a supported GPU and travelling to the lab to debug, attempt to setup VR, and debug again wasn’t viable, this was not possible.
- Building the project
- Various bugs arose in the packaged executable build of our game that were virtually impossible to track down. (Exhibit A)
- Various bugs arose in the packaged executable build of our game that were virtually impossible to track down. (Exhibit A)
Grade Requirements
Contributors
Work Distribution
- Xujia: Menu page, Level 1, planning
- Jakob: Level 2, planning
- Mayur: Level 2, planning
- Simon: Level 1, planning, documentation
Key features
- The purpose of our game was to teach our players about the Hydrologic Cycle (also known as the Water Cycle). Level 1 of the game serves as a lesson to teach the basic concepts of the Hydrologic Cycle and level 2 gives the player a chance to apply what they learned and visualize the cycle as it happens under their control.
Menu
- At the menu the player can select which level they would like to start on, view controls, the leaderboard (currently a work in progress) and game options (also a work in progress)
Level 1
On level 1, the player is required to pilot a boat to the land mass holding the classroom. Once reaching the inside of the class room the player will be given the option of starting a conversation with the teacher model within. The teacher will then give the student a lesson on the water cycle. Once the player has completed the lesson, they will be able to go back on the boat and pilot the boat to level 2.
Chat-like dialogue system. This is main way that the lesson is taught within the classroom.
Animated model
Animated with Prefab animations provided by the Asset Store (linked at the bottom of this README)
Working aquatic vehicle
- Camera transitions achieved with this C# code:
- Camera transitions achieved with this C# code:
{
//Selecting 0 moves the camera into the boat
if(Input.GetKey("0"))
{
boat.GetComponent<Rigidbody>().isKinematic = false;
boat.GetComponent<boat>().enabled = true;
boatCamera.SetActive(true);
player.SetActive(false);
}
//Pressing 1 sets the camera to FPS mode
if(Input.GetKey("1"))
{
boat.GetComponent<Rigidbody>().isKinematic = true;
boat.GetComponent<boat>().enabled = false;
boatCamera.SetActive(false);
player.SetActive(true);
// move to starting position
player.transform.position = playerStartPos.transform.position;
}
}
Level 2
In level 2, the player will begin on a terrain that will give them 3 options for what body of water they would like to trigger the water cycle on. Once they’ve walked into a teleporter and reached the part of the scene that houses the selected body of water, the player will be required to find a sphere, skinned to look like the sun.
After finding the sphere, the player will
scroll up
on the mouse wheel and use thee
andr
keys to control the temperature of the orb. As soon as the orb is active and has reached the correct temperature, the water in the scene wil begin to evaporate, a cloud will form, and it will begin to rain. A timer is used to keep track of how long it takes the player to complete the level.Players with with the shortest time on their timer’s have received better scores than those with a longer time. It is a game of speed!
Once a sufficient amount of water has evaportated, a cloud will appear above the body of water and it will rain.
Here’s a preview of the river area.
And a preview of the ocean area.
Planned timeline
- We used a Trello board to track the progress and development of the project! :clipboard:
- Trello Board link: https://trello.com/b/s1oLJZb3/cs-4331-002-group-6-virtual-reality-project-2
External asset sources and Unity packages
- Classroom: https://sketchfab.com/models/2a1e3b294c1e4e91bed794bfa520c4f4
- Cloud: https://sketchfab.com/models/116f49c23c4347eba340d0f59b0601f7
- Character model: Unity Asset Store
- Island Terrain Pack: Unity Asset Store
- VR Samples: Unity Asset Store
- ProBuilder: Unity Asset Store
- TextMesh Pro: Unity Asset Store
- Rain Drop Effect 2: Unity Asset Store
- Sky5X One: Unity Asset Store
- Nature Starter Kit 2: Unity Asset Store
- Standard Assets (provided by the TA): https://drive.google.com/open?id=1QZkop1Vl17tabTXLwWEYegCt9uq5Vr4r
- Octocat logo: https://www.flaticon.com/free-icon/github-logo_25231
References (more available on the Trello Board)
- Menu development: https://www.youtube.com/watch?v=zc8ac_qUXQY
- Animation Control: https://www.youtube.com/watch?v=wdOk5QXYC6Y&t=627s
- Dialogue System: https://www.youtube.com/watch?v=_nRzoTzeyxU&t=3
- Water animations w/ Blender: https://www.youtube.com/watch?v=VeGHNcOedAw
- Boat control: https://www.youtube.com/watch?v=s_RIfCfMlPc
- Water information: https://water.usgs.gov/edu/heat-capacity.html