Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

closed as unclear what you're asking by Nate, Sean Middleditch, Nicol Bolas, Anko, bummzack Aug 22 '13 at 12:52

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

You should post your code, what you have tried and we could work from that. – Katu Jul 12 '13 at 10:47
It would greatly help if you posted code, otherwise, it is nearly impossible to help you without doing it all from scratch myself. – Jon Jul 12 '13 at 10:51
This link may help - – dan369 Jul 13 '13 at 0:18