# OpenGL Quote from "OpenGL Game Programming"

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello, On page 143 of OpenGL Game Programming (Hawkins, Astle) there is a note:
Quote:
 NOTE Although orthographic projections can be used for isometric games, this is rarely done in practice due to the fact that a higher level of detail can be obtained using conventional 2D methods. This could very well change in the future, however.
Would an OpenGL guru please elaborate on this? What are the "traditional" 2D methods, and why do they have a higher level of detail over textured quads? Thanks, Sam

##### Share on other sites
I think that orthographic still has three dimensions, but just without perspective transformations (to make things further away look smaller).
For 2D rendering I use these functions (from someone here at GDNet, forgotten who though):
void glEnable2D(){	int vPort[4];	glGetIntegerv(GL_VIEWPORT, vPort);	glMatrixMode(GL_PROJECTION);	glPushMatrix();	glLoadIdentity();	glOrtho(0, vPort[2], 0, vPort[3], -1, 1);	glMatrixMode(GL_MODELVIEW);	glPushMatrix();	glLoadIdentity();}void glDisable2D(){	glMatrixMode(GL_PROJECTION);	glPopMatrix();   	glMatrixMode(GL_MODELVIEW);	glPopMatrix();	}

##### Share on other sites
Quote:
Original post by swinchen
Hello,

On page 143 of OpenGL Game Programming (Hawkins, Astle) there is a note:

Quote:
 NOTEAlthough orthographic projections can be used for isometric games, this is rarely done in practice due to the fact that a higher level of detail can be obtained using conventional 2D methods. This could very well change in the future, however.

Would an OpenGL guru please elaborate on this?

What are the "traditional" 2D methods, and why do they have a higher level of detail over textured quads?

Thanks,

Sam

"Traditional" 2D methods would be using pre-rendered isometric tiles and blitting them to the screen. Examples would be Diablo, Fallout, etc.

This method is more likely to have a higher level of detail than real-time 3d rendering because you can make your isometric tiles extremely detailed (because they're prerendered). In the past, this same level of detail was impossible to achieve in real-time, but with newer and better technology, it's becoming more feasible.

##### Share on other sites
You can use glOrtho() to make 2D games. You just don't have perspective corrections. You still have 3D in glOrtho() but you will not have perspective correct objects. So what I am saying is if you want to have a 3D cube in glOrtho() you can and rotate it, just make sure your near/far plane is big enough to allow the cube in the view frutsum.

##### Share on other sites
Quote:
 Original post by sadrius"Traditional" 2D methods would be using pre-rendered isometric tiles and blitting them to the screen. Examples would be Diablo, Fallout, etc.This method is more likely to have a higher level of detail than real-time 3d rendering because you can make your isometric tiles extremely detailed (because they're prerendered). In the past, this same level of detail was impossible to achieve in real-time, but with newer and better technology, it's becoming more feasible.

Hmmm, couldn't you still do this with OpenGL in glOrtho()? All you would need to do is texture map the pre-rendered isometric tiles onto quads and using Alpha blending and/or masking... you could have a isometric tile based game correct?

Maybe I need to see an example of "traditional" vs. OpenGL.

Thanks for the response.

Sam

##### Share on other sites
That is exactly what they gave you. Diablo was a good example. The thing is that before too recently, prerendered images were much faster to draw, using textured quads. If you did them 3d, just positioning the camera for iso view, it could look as good, but would be slower. The advantage would be a movable camera. But by sacrificing that movable camera, it can be done just with textured quads and prerendered scenes. So Diablo could be a "traditional" example. The traditional method can easily be done in OpenGL, as well as the newer 3d method.

##### Share on other sites
kburkhart84 and sadrius have provided you with the gist of what I meant when I wrote that back in 2000. My point was that although you could create an isometric game using 3D models and an orthographic projection, in practice, no one was doing so, at least not for commercial games, because games using true 2D with pre-rendered tiles looked better than what could be done at reasonable framerates using 3D. That has since changed, which is why game genres that once defined isometric games (e.g. RTS games, and sim games like Civilization) are all in 3D now.

##### Share on other sites
Thanks for clearing that up everyone. It makes a lot more sense now.

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633298
• Total Posts
3011256
• ### Who's Online (See full list)

There are no registered users currently online

×