I am working on a simple XNA side scrolling game as a learning exercise. It works by creating a level object which creates a matrix of tiles based on a map within a text file. The tiles are then drawn according to a camera's location which is set to scroll continuously in a particular direction. The level is essentially a long pipe with tiles on each side and the player sits in the pipe staying in its location within the viewport. With user input I am gradually moving the player to the other side of the pipe. The problem I have is that the player will keep moving and wont stop when it reaches the tile on the other side of the pipe. I have given each tile an enum value describing whether it is passable or not, but I am not sure the best way to check if the player has reached the edge of the pipe. Everything I have tried tanks the frame rate.
Any advice would be greatly appreciated.