C481 B581 Computer Graphics
Dana Vrajitoru
C481 B581 Homework 11

Due date: Monday, April 17, 2017.

In this homework we'll write a game where a player controls a character moving through a maze.

Ex. 1 Download the following files in a dedicated folder:
glheader.h
main.cc
bitmap.cc
bitmap.h
interface.cc
interface.h
Box.cc
Box.h
Maze.cc
Maze.h
Player.cc
Player.h
Makefile
tiles.bmp
pattern.bmp
marble.bmp

Compile the program with the command make and run it with the command maze. Here is a snapshot of the program:

a. Finish the implementation of the class Player. You can use a box for the player or a glut object. Design your own texture for the player and apply it to this object. Note that the texture file must be a bmp file with dimensions equal to powers of 2.

You can use a play list for the Player, in which case you should initialize it in the function draw. Or if you use a Box object, declare it as an attribute in the class Player and initialize it the draw function.

In the Player class, when the player runs over a food item, make the player eat it, and then grow in size by 0.1. Start with a player size no larger than 0.5.

b. Modify the maze to have it at a size of 15x15. Design your own maze for the bigger size, but leave the existing part as is except for the walls that should be moved to the outside border. Add a few more food items in the maze.

c. This interface is designed not to be moved with mouse and keyboard - instead, the arrow keys move the player. Modify the interface such that when the player is about to get out of site, the values of trans[0] and trans[2] are modified to keep it in sight.

Note. You can adjust the speed of the player in the interface if it's too slow or too fast, and add the WASD keys to the movement if you want/

Upload to Canvas: all the files you add or modify, including the texture file for the player.