1

Click here to load reader

Task 9 - Terrain and Navigation

Embed Size (px)

DESCRIPTION

Outline for COMP336-15B

Citation preview

Page 1: Task 9 - Terrain and Navigation

Exercise 9 – Terrain and Navigation

The purpose of this exercise was to experiment with navigation over terrain, built as demonstrated in class. I use the sample program built in class, but experimented with my own height map and further develop the navigation code.

The first task was to create our own terrain display. I used the code provided in class, but built my own height map using Blender image painting system. The resolution of the height map was 256 x 256, as suggested in the outline. I also modify the water layer in the sample program to better suit the new terrain.

Next, I Improve the navigation provided in class by keeping the character on the surface of the terrain, as well as a number of other improvements suggested in the outline.

I kept the camera on the surface of the terrain by using a single point in the height map to calculate the overall height. I kept the height of the character relatively low to the ground so that the terrain would appear tall and imposing to the player.

I modify the existing code so that the player falls off the terrain if they walk past the other boundaries of the map. After they have fallen off the terrain, the game reset itself.

I also added a jump button (Spacebar) that allows a character to make small deliberate jumps, as well as a crouch button (either Shift key) to allow them to walk in a crouch position.