Friday, May 14, 2010

Player lag

When I am running and my screen is sliding to the left my player looks like he is sticking to the ground or pipe. Is there a way for me to keep my player from looking like he is sticking to the ground?

1 comment:

  1. By "sticking" do you mean moving back and forth? Or do you mean moving slower than usual? If he is moving back and forth, it may have something to do with the checkMario function when he collides. Otherwise, it may just be the program taking longer for each frame because it is moving every object back one pixel. I may have a suggestion for that though: In the initialize, what if you attached everything that does not move (i.e. blocks and pipes) to a large surface that was the size of the level and you would only have to move that instead of each individual object at a time? Mr. Howe may be able to help with the details, but maybe this will give you a start.

    ReplyDelete