Project 4: Mapquest
In this project, you will create a first-person walker. The user will use the keyboard and mouse to navigate around a terrain and collect objects. The terrain, the collectibles, and the other objects in the environment fit a coherent theme of your choosing. For example, an alien might traverse the moon and collect flags, ignoring spaceship parts and cups from fast food chains that have been littered around.
To receive credit for this project, you must meet the following requirements:
- Create your project in a folder named
mapquestin the single Git repository that you are using for all your projects.
fetch, read in a grayscale image that serves as a heightmap. Convert the heightmap to a mesh. Create a class
Heightmapthat has a method
getHeightthat accepts a pair of non-integer coordinates. It returns the height at the given coordinates by bilinearly interpolating between the heights of the surrounding four integer coordinates.
- Write a
Cameraclass that encapsulates the player’s position and point of view. As the player moves across the landscape, the height is adjusted according to the player’s position on the heightmap. Allow the player to move forward, move backward, strafe left, and strafe right using WASD and the cursor keys. Allow the player to look up, down, left, and right by moving the mouse.
- Populate the terrain with collectible objects that are animated in some way and lit distinctly so the player knows they are important. When the player collides with these objects, remove them from the scene and play a congratulatory sound.
- Decorate the terrain with inert objects appropriate to your theme. For example, you might add rocks or flora in natural settings.
- Share in
#gallerya link to a screencast in which you walk through the terrain and collect the objects. Host your screencast on a streaming service like YouTube or Vimeo.
- Your code must be cleanly formatted, the variable names must be meaningful, and comments should explain non-obvious code.
- Your Git log should reveal a steady pattern of commits. In general, you should commit and push after every work session.
If you finish early, consider exploring these extra challenges:
- Add fog or other atmospheric effects.
- Surround the world with a skybox.
- Fill a cavity of the terrain with water that reflects the skybox.
When you have completed all requirements, push your code to your remote repository and send your instructor a direct message on Slack to schedule a 10-minute review. Only one project can be granted credit each week. Plan accordingly.