CSCI 441 - Computer Graphics

Fall 2017 - Midterm Project - Roller Coaster Tycoon



Canvas | CS @ Mines | Mines | Piazza

|   Home |  Syllabus |  Assignments |  Leaderboard |  Schedule |  Resources   |
This assignment is due by Thursday, October 12, 2017 by 11:59pm.

It seems you've been able to evade the Intern as you no longer have a shadow. Returning to your ride you find construction tape blocking the entrance and a permit displayed next to your sign. Wonderful! Construction has begun on your ride! You get closer to read the fine print of the permit.

20 September 2017
Aaru Park

PERMIT FOR CONSTRUCTION OF MEGA-COASTER


Please be advised that construction has begun on the latest attraction at Aaru Park - the Mega-Coaster! No access without permission from Ra. Stay clear of the area until work has completed.

Mega-Coaster?! What Mega-Coaster? This is where my ride is supposed to go!

You storm off looking for the man that seemed to always be around, until now. There seems to be a commotion going on near the great pyramid so you head that direction. Approaching nearer, there is a bright glowing orb hovering above the pyramid. You don't recall seeing that before.

As you push through the crowd and get near the front, the man is trying to calm everyone down. Luckily, he sees you and grabs you by the arm.
Quick! They'll eat me alive out here. We must head into the pyramid. I've been waiting for you. Ra wants to see you right away.
Perfect. Maybe now I'll find out what's going on.

As you move through the pyramid, you can no longer hear the sound of the crowd outside. You don't remember making any turns, but you feel that you've been walking too long compared to the size of the pyramid. Are you going underground?

The man stops abruptly and you nearly walk into his back. He points to a sign on a narrow wooden door.


Lasciate ogni speranza,
voi ch'entrate.

He nods at you and swings the door open motioning for you to enter. You proceed.


Part I - Build Your Coaster


Quickly scanning the room, there are nearly thirty other people gathered - and you saw them around the park as you ran through. Why are they here too? You find the last remaining open seat and wait for whom you assume is Ra to speak as they have already made their way to the podium.
"We have asked all of you here as you all have the same quest - to make Aaru Park the most successful theme park. For years we have been trying to win a Golden Ticket but our attractions were never good enough. Alone, none of you will ever have the resources to build the one great ride. But together, perhaps you can find a way to make the tallest and fastest and best ride on the planet.

We will build the Mega-Coaster in our park but we need to theme areas of the park. Please create a new land for us to build around the Mega-Coaster. Here, take one of these flyers and start right away. Resources are limited so you must hurry. We wish to open the park in a few months time so any delay will hinder our chances for the award."
You quickly take one of the flyers as they go by and begin reading:
The Golden Ticket has a series of jugding criteria. There are four in all, each testing a different skill you have learned in your travels. You must choose some of your fellow Heroes to join you in your land. Aaru Park has ten lands and each have enrollment slots available. Eight lands can accept three Heroes while the remaining two can only accept two Heros.

The first part of your midterm project is to assemble into lands inside the park to begin construction on your ride. Construction materials are centrally located, so you may only partner with other characters located in your park section (Pyramids or Sphinxes). Our class will have eight teams of three and two teams of two (one each for Pyramids and Sphinxes). Do not assume you are the team of two, contact the instructor first to ensure the team is still available. Be aware that as a team of two, you are still expected to do the same amount of work so it will be more work per person. Once you have formed your team, ALL members of your team must email the following to the instructor by MONDAY, SEPTEMBER 25 11:59PM:
  1. The Members of Your Team
  2. Your Land Name
  3. Your Park Section
For the midterm project, you will create a roller coaster track (Hills/drops, turns, etc.) for your Heroes to ride on. Two of your Heroes will be automatically racing along the track while the third Hero is free to explore the world you create. Read on to understand how everything fits together.

The actual midterm project is comprised of several smaller parts, each focusing on one of the topics covered to this point. The requirements for each section are described below.
Section A - Bézier Curves & Surfaces

Previously, we used a grid in the XZ-plane to denote our world. Now, you are to use a Bézier Surface as your ground. This curved surface will now have changes in elevation and be more interesting to move around than a flat grid. You will need to specify the 16 contol points that make up your world (control point specification is described below in Section D). If you wish, you may use more than one Bézier Surface to give more detail to your world (if you do use multiple surfaces, make sure they are C1 continuous at the mesh point). There needs to be at least one Bézier Surface. Your Surface will be solid (i.e. made up of triangles or quads) so be sure to traverse your parameters correctly.

Choose one of your Heroes to be the wanderer. This Hero will be controlled by the WASD keys and can walk around your Surfaced world. Three key points for the Wandering Hero movement:
  1. As the elevation changes, the Wandering Hero should follow these elevation changes. Specifically, the Wandering Hero should follow the curves of the Surface and always stay "on top" of the Surface.
  2. The Wandering Hero should follow the slope of the Surface. As the Wandering Hero changes direction and moves uphill/downhill, the Wandering Hero should always be oriented along the normal to the Surface at that point.
  3. The Wandering Hero is confined to the surface, i.e. the Wandering Hero cannot move off of the Surface and bounds checking must be performed to ensure this.
The other two Heroes will be moving along Bézier Curves. You will design a roller coaster track that the other two Heroes will travel along. The overall curve will be specified by a control file and must be closed (the start point and end point must be the same) and therefore C0 continuous. The curve must also be C1 continuous, you should ensure the points provided will be C1 continuous and you do not need to enforce these continuities in program. The two Heroes will travel along the curve in different manners.
  1. One Hero will travel along the curve at equal parametric intervals. This means the Hero will advance dt units, where dt is step along the parameter t.
  2. The other Hero will travel along the curve at equal arc length intervals. This means the Hero will advance dS(t) units, where dS(t) is a step along the curve's length.
These two Heroes will move automatically as your program runs. They will also be traveling at different rates so you should see them pass and catch up to each other. Each Hero should be oriented with the tangent of the curve, so they are always facing the direction of motion. Feel free to bank your turns and add in a roll component, in addition to the pitch and yaw you will already be doing.

HINTS:
  • You are encouraged to use your Heroes + Mascots from A4.
  • You may want to make a generic virtual Hero class and then have each of your individual Heroes inherit from the parent Hero class. Put these into a HeroBase.h and <Hero1>.h, <Hero2>.h, etc. files.
  • You may want to use a display list for your terrain.


Section B - 3D Drawing & Animation

As before, your Heroes should be made of solid CSCI441 3D Objects. Your Bézier Surface must be comprised of triangles or quads. Your track must also be made of solid 3D objects. Beyond the ground, track, and Heroes, you must also have two different objects scattered around your world. Their locations will be specified by the control file (again, see below).

Whenever any of your Heroes are moving, they must be animated while they move. The other two objects may be stationary or could be animated (think a tree swaying in the wind for instance).


Section C - Cameras & Viewports

Users will be able to experience your program from one of many view points:
  1. From an arcball camera that can rotate around and follows a single Hero
  2. From a free cam that can move about the scene
  3. From a first person camera attached to one of your Heroes
The user should be able to toggle between camera modes through different key presses. When the first person point-of-view camera is turned on, it must appear as a picture-in-picture viewport within the window. Feel free to add additional cameras beyond the three listed (Sky cam, Side-scrolling cam, Third Person cam, etc.)

In addition to be able to select which camera view to use, the user must be able to select which Hero to follow for the arcball cam or first person cam.

If you would like to have the user watch two Heroes move along the track and control the Wandering Hero at the same time, consider creating a split screen in your application so the user can interact with both views simultaneously.


Section D - File Format

The format of the World File you will read as input is up to you to define. In your file format, a designer must be able to specify the location of control points, as well as the location and type of objects to be placed in your scene. An example format might look like:

<number of Bézier Surfaces for ground>
<sixteen control points for each surface>
...
<number of control points for Bézier Curve track>
<control point x> <control point y> <control point z>
...
<number of objects>
<object type> <object x, y, z> <object orientation x, y, z> <object size>
...

As stated above, your file format is up to you to define; however, you must be able to place at least two different kinds of objects, which can be as simple as CSCI441 3D Objects, or more complicated, like a flag or a tree. You must describe your file format in your README.txt file. To demonstrate that your program can read in World Spec Files correctly, include two example files with your program. They must each utilize the full functionality of your file format (i.e. must each contain objects placed in the scene and must each specify control points for a valid track). They should be visually different and a user can distinctly tell a new world has been entered.


Section X - Extra Credit: Text

For extra credit, it would be nice to know who each Hero is so display the hero's name above their head. As the Hero moves around, the name should stay above their head and move with them.

Text is not a primitive supported by OpenGL. Which font do we use? How do we make each letter into triangles? We can use the FreeType library to handle loading fonts and displaying them for us. This will take some extra work on your part (prebuilt libraries will be provided for the lab machines) but you'll need to figure out how to use the library. This will involve textures to display each letter.


Section Y - A Second Window

We would like to not have to memorize a bunch of keyboard commands to change between cameras and Heroes. For extra credit, have your program generate a second window. The first window will be used as before to display your roller coaster. The second window will provide an option menu of buttons to toggle camera modes and Heroes to follow. This window will be a 2D projection (so your A2 submissions may be useful to pick your Heroes). There does not need to be any animation in this second window. But events from the second window should affect what is being displayed in the first window.
Scanning the room, you instantly know who should join you in the guild. You pull them aside, speak for a few minutes, and it's agreed. You three shall begin preparations immediately. You aspire to build the most prestigious ride and strive to stand out amongst the other teams. You already have plans for when you return to your ride of what you will build..


Part II - Website


Update the webpage that you submitted with A4 to include an entry for this assignment. As usual, include a screenshot (or two) and a brief description of the program, intended to showcase what your program does to people who are not familiar with the assignment.


Part III - Presentation


During lab on October 13, each Guild will present their world, Heroes, and track. During this time, the other Guilds will be critiquing your project (by filling out a scoresheet) and at the end everyone will vote for their favorite Guild that they want to join.


Documentation & Submission


With this and all future assignments, you are expected to appropriately document your code. This includes writing comments in your source code - remember that your comments should explain what a piece of code is supposed to do and why; don't just re-write what the code says in plain English. Comments serve the dual purpose of explaining your code to someone unfamiliar with it and assisting in debugging. If you know what a piece of code is supposed to be doing, you can figure out where it's going awry more easily.

Proper documentation also means including a README.txt file with your submission. In your submission folder, always include a file called README.txt that lists:
  • Your Name / email
  • Guild Name / Guild Members
  • Assignment Number / Project Title
  • A brief, high level description of what the program is / does
  • A usage section, explaining how to run the program, which keys perform which actions, etc.
  • Instructions on compiling your code
  • Notes about bugs, implementation details, etc. if necessary
  • NEW: A description of the file format that your program reads as input
  • NEW: A rough distribution of responsibilities / contributions of each student
  • How long did this assignment take you?
  • How much did the lab help you for this assignment? 1-10 (1 - did not help at all, 10 - this was exactly the same as the lab)
  • How fun was this assignment? 1-10 (1 - discontinue this assignment, 10 - I wish I had more time to make it even better)


Grading Rubric


Your submission will be graded according to the following rubric.

Topic Percentage Requirement Description
Bézier Curves & Surfaces 45% Track is closed (end point = start point), C0 continuous, & C1 continuous. (This doesn't need to be enforced in-program, as long as input control points s pecifiy C0 & C1 continuous curves.)

One Hero moves by arc-length parameterization and moves at a constant speed regardless of control point spacing. The other Hero moves by equal parameter steps.

Terrain is comprised of Bézier Surfaces. The Wandering Hero can be controlled and moves around the terrain properly.
3D Drawing & Animation 10% Heroes are animated & comprised of CSCI441 3D Objects. Scene is comprised of track and other scenic objects.
Cameras & Viewports 25% Arcball camera follows Hero and rotates correctly; user can control rotation. Free camera is correctly implemented, can move around the scene, and is user-controllable. Camera from Hero's point of view works correctly; it is attached to the Hero and looks along the Hero's direction of movement.

First-person camera view is placed in a separate viewport. User can toggle between cameras through use of a keypresses. User can toggle between Heroes to follow through keypresses as well.
File I/O 5% File format is documented in the README.txt file. A third-party should be able to write a World Scene in your format based on your documentation. File format supports two different types of objects that can be placed in the scene and objects are correctly placed and rendered in the scene. Two non-trivially different example files are included. Each example fully utilizes the file format (i.e. places objects of each type).
Submission, Presentation, & Guild Reflection 15% Submission includes source code, Makefile, and README.txt.
Source code is well documented. Webpage named <HeroName>.html submitted and updated with screenshot from latest assignment. Submission compiles and executes in the lab machine environment. Presentation is of high quality and equal division of work is reported by team members.


Experience Gained & Available Achievements


Assignment Attribute
Assignments +150 XP
Web Attribute
Web +150 XP
Banana Split
Banana Split
Can You Hear Me Now?
Push Notification
Viewmaster
Soup Du Jour


Submission


Please update your Makefile so it produces an executable with the name rct. When you are completed with the assignment, zip together your source code, Makefile, README.txt, and www/ folder. Name the zip file, GuildName_RCT.zip. Upload this file to Canvas under RCT.


This assignment is due by Thursday, October 12, 2017 by 11:59pm.
Last Updated: 09/20/17 11:44


Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0