I need information to start program a game in 2d( like donkeykong )if anyone know some papers of programming or source , anything.
I want to start a game in 2d because I am study opengl lesson 23 and lesson 10 of nehe and there is in 3d.I wnat to start coding a 2d game first and later in 3d.
My brother is making the bitmaps for the game right know , and I need help width the programming…if you can help me please
If you want to make a game in 2D, you will need to use OrthographicProjection. I use the two functions below.
void setOrthographicProjection() {
// switch to projection mode
glMatrixMode(GL_PROJECTION);
// save previous matrix which contains the
//settings for the perspective projection
glPushMatrix();
// reset matrix
glLoadIdentity();
// set a 2D orthographic projection
gluOrtho2D(0, w, 0, h);
// invert the y axis, down is positive
glScalef(1, -1, 1);
// mover the origin from the bottom left corner
// to the upper left corner
glTranslatef(0, -h, 0);
glMatrixMode(GL_MODELVIEW);