This project is read-only.

Providing Matrix for 2D game?

Aug 4, 2009 at 3:56 AM

I don't know anything about Matrices, what can I provide for the Matrix argument for a 2d game? I'm just wanting to draw a few lines across the window.

I tried to just extract what was in your demo, but not having a 3d viewport the camera arguments are throwing me a bit.

Matrix viewMatrix = Matrix.CreateTranslation(0, 0, 0) * Matrix.CreateScale(1.0f / 300, 1.0f / 300, 1.0f);
Matrix projMatrix = Matrix.CreateScale(1f, 760/768, 0.0f);
Matrix viewProjMatrix = viewMatrix * projMatrix;

Thanks for this nice tool!