   Z-Axis calculation in 2D
  Hello everyone!I got a little problem with my Mario-like game. (What genre is it btw?)The game needs a zoomable camera, so I implemented a Z-Axis in my camera code. But I got stuck at the point where I need to transform the Block's (My game is made out of blocks) Position and scale. I guess I have to shrink everything to the middle of the screen when moving away at the Z-Axis, but I don't know how I do that. I have made a coordinate system which treads 0,0 as the middle of the screen instead of the upper left corner of the window, if that helps. And also the Scaling of the blocks is aligned to the left upper corner of the block. If that makes things more complicated I can change it.   
  Zooming more often means changing the fov of the camera, rather than moving the camera. Depending on your API, you can setup a magnification variable (initialized to 1.0f) and set the projection matrix using that variable.EDIT: (deleted perspective projection stuff)Oops. 2D projection. Assuming ortho. Use the magnification to change the width and height of your projection matrix.For ortho projection, something like:float projHeight = normalHeight*mag;float projWidth = aspect*projHeight;SetProjection(..., projWidth, projHeight, ... );Then increment/decrement the magnification instead of the camera position.Decreasing mag = zoom in.Increasing mag = zoom out.Ensure mag never goes to 0 (or better, some small value).EDIT2: re-read your post. Blocks aligned to a corner will get messed up unless you control the projHeight and mag so width and height values are compatible with (integer multiples of) your block sizes.EDIT3: You may just want to ignore my response. [wink]   ;  You helped me in a way! [smile]I was looking more closely at the Direct2D API and I found the matrix stuff somewhere. And I got it running. Thank you for pointing me into that direction!   ;  Glad to be of help (?) [wink]   ;  You said "Depending on your API", and this made me looking at the docs. And there I searched for "Matrix" and I found what I need [smile] I jsut didn't expected that D2D has that Matrix stuff.   