Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Agape

OpenGL Isometric engine with OpenGL

This topic is 5614 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

I''m creating a game that has graphics as a medium priority. It''s a simulation of a network, so I don''t need to do anything fancy. I was thinking, for some reason, to do an isometric engine. Is this something worthwile to do in OpenGL? How difficult would it be?

Share this post


Link to post
Share on other sites
Advertisement
So, Isometric is in 2d right?
I''m making a 2d game right now like starcraft, so I''m the man to explein you how to make 2d easily in OpenGL

Call that fonction to set up an 2d drawing view:
Call setOrthoView(true); to enable 2d drawing
and setOrthoView(false); to disable it.
With this fonction, when you drawing a polygone, the 0,0 is uper left and down right is the 800,600 (depend on your resolution). So, its easy to draw 3d sprite like DirectDraw.

  
void setOrthoView(bool mOrtho)
{
if (mOrtho)
{
glDisable(GL_DEPTH_TEST);
// Select The Projection Matrix

glMatrixMode(GL_PROJECTION);
// Store The Projection Matrix

glPushMatrix();
// Reset The Projection Matrix

glLoadIdentity();
// Set Up An Ortho Screen

glOrtho(0,_Resolution[0],_Resolution[1],0,-1,1);
// Select The Modelview Matrix

glMatrixMode(GL_MODELVIEW);
// Store The Modelview Matrix

glPushMatrix(); // Reset The Modelview Matrix

glLoadIdentity();
}
else
{
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glEnable(GL_DEPTH_TEST);
}
}


Because OpenGL is a 3d API. To draw 2d people generaly have dificulty with it. This little fonction is a miracle

Share this post


Link to post
Share on other sites
No, isometric is 3d, not 2d.
The 2d isometric engines are fake, since you can''t turn the camera around.
Anyway, writting an isometric engine is not much different than writtign a non isometric engine. Sure, there are some optimizations you can make in an isometric engine (like, say, knowing which objects are outside the view cone, etc.), but, overall, it''s not much different.
For some images of an isomeric engine, go to Eternal Lands link, in my sig.


Height Map Editor | Eternal Lands | Fast User Directory

Share this post


Link to post
Share on other sites

  • 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!