facecrime
you set a global variable " screen distance from camera" [Bz]
(this represents your eye distance to the projection screen (you game window) )
and every 3d object has as "distance from camera" instance variable [Az]
then the scale / position of any 3D object is directly related to the "screen distance from camera" variable divided by the "distance from camera" instance variable
eg scaled size = original size * Bz/Az
and x or y position from 0 is original x or y * Bz/Az
its quite simple if you keep every thing in the 2 d plane with no rotation
here is an old vid where I had it in action
https://drive.google.com/file/d/0B6AQ9znz3zwxdkRZdWtoQ1psa0E/view?usp=drivesdk
it is explained better on wiki link below, ignore all the big matrix maths (this is all including rotation) and just go to the last picture at the bottom of the page. (which we can use in 2 d games for simple pan and zoom)
https://en.wikipedia.org/wiki/3D_projection