If I was to make a 2D game, and I wanted to move something says two pixels to the left when I hit the left arrow key, that will move the object a different distance on the screen depending on the resolution of the program. Is it naive to move objects by pixel lengths? Should I be creating units of length based on the height and width of the resolution?
Look into time-based animation. It is far superior to a strictly pixel-based movement algorithm.
no, you set up the projection matrix so that it is exactly the same no matter the resolution.
If I use a projection matrix, does it have to be as high as my highest resolution? Like say 1080p?
no it could be anything like 100x100
Yeah but if I use 100x100, then won’t my movement be really jerky if I run the game at fullscreen on a 1080p monitor. For every 10.8 pixels I move in the drawing area, I’ll only move once in the viewport, and I can only move to 100 locations in the y-direction on the viewport right?
no it’s float values so you can use 45.835735f if you like