Use arrow keys to move around.
A hallway can be drawn by putting a square in the center of the screen and adding lines from the corners of the square to the corners of the screen. The door is just a rectangle and a dot for the handle. The door helps make the illusion seem more realistic. To make it seem that the player is walking toward the end of the hall, each point of the square needs to be farther from (0,0). When the points are pushed farther from center, the square looks bigger and seems closer to the player. This is accomplished by multiplying both the x and y values of each point by a scale factor, I've used the variable "player Y" for this. To look left and right, the drawing just needs to be shifted right or left. To do this, I just add "player X" to the x value and the y value of each point in the drawing. When "player X" is a positive number, the drawing shifts to the right, when it's negative, the drawing shifts left.