Quote: "It makes no sense. If i want a pixel perfect render and a grid i could work with i can't see a solution using virtual resolution.
I think this has implications for using the 2D physics where you need to set the virtual resolution small in order to get objects moving fast"
It does work properly, the problem is that your setting a window size and assuming that the windows dimensions...(device width and height) are what you set those values to. They arent though...most likely due to the window being too large to actually fit on your screen so agk opens the largest that it can. This is described in the AppGameKit documentation:
Quote: "By default the window size will be adjusted so it always fits on screen, including making room for the taskbar on Windows. This means that your final window size may be slightly smaller than your chosen size. You can override this by setting the allowOverSized parameter to 1, which will remove all bounds checks and allow you to create windows larger than the current screen."
Your window size (device width and height) probably are not what you think they are. (Qugurun spotted that above)
In my post above i said " -Ensure that your virtual resolution is the same as your devicewidth & deviceHeight, or an integer multiple of those dimensions" .... but you haven't done that.
Either allow the window area to oversize or just ensure that your virtual resolution maps to actual integer numbers of pixels....
Try Using: SetVirtualResolution( GetDeviceWidth()/2, GetDeviceHeight()/2 )
That way one virtual pixel maps to 2x2 actual screen pixels.
Ive tried this in Classic and studio and the graphics lines up correctly - no odd scaling - just a simple 2x2 area per sprite pixel.