Take the 2-minute tour ×  What I have at the moment is a series
of data structures I'm using, and I would like to render the
world onto the screen (just the visible parts).  I've actually
already done this several times (lots of rewrites), but it's a
bit buggy (rounding seems to make the screen jump ever so
slightly every x tiles the player walks past).  Basically I've
been confusing myself heavily on what I feel should be a pretty
simple problem... so here I am asking for some help!  OK! So I
have a 50x50 array holding the tiles of the world. I have the
player position as 2 floats, x ([0, 49]) and y ([0, 49]) in that
array. I have the application size exactly in pixels (x and y).
I have an arbitrary TILE_SIZE static int (based on screen
pixels).  What I think is heavily confusing me is using a 2d
orthogonal projection in opengl which maps (0,0) to the top left
of the screen and (SCREEN_SIZE_X, SCREEN_SIZE_Y) to the bottom
right of the screen.       glu.gluOrtho2D(0, getActualWidth(),
getActualHeight(), 0);