CS 184 Final Project - Syntax of Input File



Input files syntax


Click here to check a sample .maz file
sample .pac file

Click here to check a sample .pac file
sample .maz file



C maze_width maze_height

S 1 (sky_red, sky_blue, sky_green) sky_texture.ppm #optional, should not include texture file if just want to display color

F 1 (floor_red, floor_blue, floor_green) #optional

P (player_position_x, player_position_y) (player_direction_x, player_direction_y)

#OM for mobile objects, any pixels from the texture file filled with the
exclude color will be ignored when drawing the object; make sure to include
the same number of .ppm files as frames of animation specified

OM (mob_obj_pos_x, mob_obj_pos_y) (mob_obj_dir_x, mob_obj_dir_y)
frames_of_animation
mob_obj_frame1.ppm mob_obj_frame2.ppm ...

OI (static_obj_pos_x, static_obj_pos_y) (static_obj_dir_x, static_obj_dir_y)

frames_of_animation static_obj_frame1.ppm static_obj_frame2.ppm ...

#material of the wall, alpha value between 0 and 1
(1 for opaque, anything in between for translusency), texture file optional

M alpha_value (color_red, color_green, color_blue) texture.ppm
#all subsequently defined walls are of the material previously defined
[(wall_endpt1_x, wall_endpt1_y), (wall_endpt2_x, wall_endpt2_y)] ...