Archived

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

FlamePixel

Isometric Engine Design issues

Recommended Posts

FlamePixel    122
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?

Share this post


Link to post
Share on other sites
flangazor    516
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.

Share this post


Link to post
Share on other sites
Marcus Speight    152
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);

Share this post


Link to post
Share on other sites
FlamePixel    122
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)?

Share this post


Link to post
Share on other sites
Mark Sheeky    134
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

Share this post


Link to post
Share on other sites