I want to make a top down isometric game (its an RTS) and I have come across a somewhat large problem. I don't want differnt screen resolutions to scale the video, I only want people with largers screens to be able to see more stuff not larger stuff.
When I change the size of the resolution, the mesh that I am drawing on the screen scales just slightly. This is unnoticable to the human eye but it throws off all my bounding boxes, and other 2d images that get drawn over the game (such as energy and health bars).
I am only using 16:9 aspect ratios.
I made an orthagonal camera like so
Code: Select all
// The Resolution of the window/screen
float ResWidth = 1024;
float ResHeight = 576;
// Nothing special about 160, its just the size I want
float Zoom = ResWidth/160;
int AspectX = 16;
int AspectY = 9;
// Create an orthagonal camera
irr::core::CMatrix4<float> CamCMatrix;
CamCMatrix.buildProjectionMatrixOrthoLH(AspectX*Zoom, AspectY*Zoom, 0, 100);
cam->setProjectionMatrix(CamCMatrix,true);