Isometric Engine Design issues

Started by
11 comments, last by FlamePixel 20 years, 6 months ago
I''ve been trying to design an isometric engine using DirectX 8, and I''ve run into a major problem. If my tiles are clustered in image files, How can I draw a single (and for that matter, a group of) isometric tile to the screen without showing the edges around it?
Advertisement
Use transparency channels (aka alpha channel).

png files have transparency channels. Look for libpng.

libpng

Another way to do this would be to have a mask value. This means there is one colour that will be removed when the picture is displayed. Unfortunately, this means that some edges may becomes aliased.

I think the png route will be the best.
*DELETED*

[edited by - Mattias Gustavsson on September 19, 2003 4:54:04 PM]
/Mattias Gustavssonwww.micogames.com
What if I have many tiles packed into one file (sharing edges)?
*DELETED*

[edited by - Mattias Gustavsson on September 19, 2003 4:54:16 PM]
/Mattias Gustavssonwww.micogames.com
To get the images out from a single file, use UV coords on your tiles.

Also to stop the edges of the tiles bleeding through use
g_pd3dDevice->SetTextureStageState( stage, D3DTSS_MAGFILTER, D3DTEXF_POINT);g_pd3dDevice->SetTextureStageState( stage, D3DTSS_MINFILTER, D3DTEXF_POINT);

Marcus SpeightIf at first you don't succeed.
Destroy all evidence that you tried.
Ah, thank you. I''m suprised I didn''t think of that. Oh, and another question. Just for my information, what exactly is that filter and what does it do (I try to never use something without understanding it)?
*DELETED*

[edited by - Mattias Gustavsson on September 19, 2003 4:54:37 PM]
/Mattias Gustavssonwww.micogames.com
Thank you guys for all the help. Now I have another question: How do I set up an orthographic projection in DX8?
The perspective matrix for othographic project is:

1,0,0,0
0,1,0,0
0,0,0,0
0,0,0,1

Orthographic is effectively just one face.

The perspective matrix for oblique projection is:

1,0,0,0
0,1,0,0
l cos(a), l sin(a), 0, 0
0,0,0,1

Oblique is the slanted 3D that you get if you draw a cube on squared paper. a=the angle (45 degrees or 30 degrees depending on how you draw cubes on squared paper!) and l is the distance to the ''back'' wire.

Mark
Cornutopia Games
http://www.cornutopia.net
Bytten Independent Games Magazine
http://www.bytten.com

This topic is closed to new replies.

Advertisement