Jump to content
  • Advertisement
Sign in to follow this  
swinchen

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
Share on other sites
Quote:
Original post by swinchen
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


"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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!