# Designing a 2D isometric engine with OpenGL

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

## Recommended Posts

Hello guys,
I am thinking about how to do an isometric 2d engine with OpenGL. The player is always located in the center of the scene, the scene moves with the player.

[b]What i want to do[/b]
In the end, the engine should be able to render normal isometric tiles and fake blocks like this: [url="http://opengameart.org/content/isometric-64x64-medieval-building-tileset"]http://opengameart.o...uilding-tileset[/url].
And it should be able to render terrain slopes, I got the idea from these pictures: [url="http://opengameart.org/content/terrain-renderer"]http://opengameart.o...errain-renderer[/url].
My first goal is to set up a flat world, then put in a player, start moving around and work my way up from there. But before that I have some questions:

[b]Frame dependent or Frame indipendent?[/b]
I am guessing it doesn't really matter, both will work in the end and produce similar results (of course when the FPS is capped). But are there upsides/downsides that I haven't seen?

[b]Smooth scrolling with tiles[/b]
The only solution I came up with is that the player moves at a "pixels per frame/millisecond" speed and don't care about the tiles for movement. Otherwise when the player moves he skips forward the size of one tile.
But the older games like Diablo 1 managed to render smoothly, how did they do it?

[b]With the power of OpenGL[/b]
How to draw a 2D Isometric picture is clear. But since I have OpenGL at my disposal, I want to use it to make my life easier.
I first had the idea to simply put the scene full of rhombi. But then I saw that I could draw squares, put the sprites of the player on an orthogonal rectangle and tilt the camera.
To me it is also a bit unclear if I should set up the whole map in OpenGl, or just use some rectangles and change the sprites on them?
I can always go full 3d, but having read some examples I presume it will make the engine more complicated, since I don't have much experience in 3D rendering.
So, how do you do it nicely with OpenGL, keeping the terrain slopes in mind?

##### Share on other sites

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