Strange Platformer Bug

That sounds like a bug. I'm not seeing that in the current C++ version. I recommend contacting the author of the XNA port or trying to debug it yourself.

If you like, you can try to reproduce the problem in the C++ version.
Hey again,

I've posted on the XNA forums, with a link back to this thread. Hopefully someone will reply!
I posted on the XNA community forums and on Box2D.XNA Codeplex. No replies yet, but I thought I'd mention that I seem to have narrowed down the problem a little further:

When the player isn't running around on the platforms, they definitely seem fine. They can 'run' for ages without moving out of sync. This is a line of about 12 of those cubes moving in sync along a floor.
I can start the player above the blocks, dropping down onto them to start the 'level'. If I do that, they don't move out of sync. In fact, I can jump up and down on the blocks (which moves me back and forth depending on when I jump, since the platforms are modifying the player's velocity while the player is a passenger - that all works fine) as long as I don't touch the left or right keys, which would cause the player to move horizontally under its own steam.

I've tried this setup using all of SetLinearVelocity, ApplyForce, and ApplyImpulse. Whichever I use, if I walk along these moving platforms, they seem to be affected by that horizontal velocity, and not in a fashion that I can see to be uniform or controlled. In fact, I even tried jumping up first (which I mostly discovered was safe, as mentioned above) and moving under the player's own steam with ApplyForce but only while in the air - this would also affect the motion of the platforms, probably because I'd still have some of that keypress-applied horizontal linear velocity / force working away.

Any more ideas?
Sorry for the repeat posts.

I believe that the problems are occuring when I move between the platforms - so it's like the player's bottom corners (bottom left and bottom right of the box shape) are maybe moving down for one 'tick' (pardon my terminology and lack of understanding of how the solver works) and pushing against the kinematic bodies.

When I make my player capsule shaped at the bottom, my 'strange bug' doesn't happen. The kinetic bodies never move out of sync.

Erin, I know you'd suggested to make the player capsule shaped, and I did intend to try this for the original bug for which you suggested it, but since that original bug was sorted, I decided to put it off as long as possible. I'm now trying to predict whether it will cause problems in the future, later in the development of the game. For example, when the player moves to the edge of a platform, I don't want him to slide off - I want to be able to move quite far off the edge of a platform, as it will become necessary to make difficult long-range jumps that way. I can't have the player slipping off the side and downwards because of the circular shape.

So, can you think of anything I can do about this? If I want to stay with a rectangle shape for the player, and I have this problem with the player's bottom corners pushing onto the side of oncoming moving platforms below him. What about if I used more vertices in the creation of the 'box' shape for the player, to make it hexagonal at the bottom? I guess, though, it'll just be like a narrow rectangle and the problem would still take place, as in this diagram:

http://img149.imageshack.us/i/53304435.jpg/
I don't know what is causing the kinematic platform problem. You might want to set the velocity of the platform based on the difference between the current and desired position.

Using clipped corners on the character should work better than you think. Try it.

Original thread: https://box2d.org/forum/viewtopic.php?t=5151