I have a simple game that I'm trying to do for learning purposes, but Matrices are a bit hard, especially in DirectX.

I currently have a tilesystem that renders tiles at the screen and a character position at the center (on startup)

When the player move to the left, the ground should move to the right so he's always at the center of the screen. I use a Sprite to transform the Tiles and the player, but having trouble because the ground is moving and the player stands still on the ground still positioned at the center.

This is a topdown 2D game so I only need to transform Position (and perhaps rotation)

I have one matrix for the camera that translates the scene, so it should be centered on the player and another matrix on the player, but when I move my Camera whenever the player moves, the player moves more and the camera is behind although I use the same transformation, Scale, Center, Rotation and Position... Right now I have a Sprite object that renders the "tiles" and I create another Sprite object that renders the player, I set camera transform on the "tiles" and the player matrix on the player sprite. Something is very weird.
–
DeukalionFeb 2 '13 at 14:54

altough this method requires me to move the camera in the opposite direction that the player is moving, so if player is moving +100, the camera should move -100 to still be positioned at the same location relative to the camera, but it's also possible to Invert the matrix with