Hi, I am working on a top-down 2D cargame with SDL & OpenGL on Linux. (( like death rally or the original GTA ))
One of the ways I could rotate the player-car is with glRotatef and translate with glTranslatef, then refresh with glLoadIdentity, or I could use maths like
newxvertlocation[i]= xvertlocation[i]*cos(rot)-yvertlocation[i]*sin(rot);
newyvertlocation[i] = xvertlocation[i]*sin(rot)+yvertlocation[i]*cos(rot);
and add to the x/y position of the player to move it and assign Translate to that position to move the ‘camera’.
I guess what I am saying is that i could use glRotatef and glTranslatef to move the world around the player or the maths to move the player around the world.
What do you recommend? What is conventional?