   How to remove gaps between 2d tiles in D3D ?
  First of all, I know that there are already threads with this topic, I've already checked them and also I post my problem in this thread:http://www.gamedev.net/community/forums/topic.asp?topic_id=532980But the problem is that everybody is talking about 2d tiles by using Quads, but I'm using ID3DXSprite and IDirect3DTexture9 for drawing tiles... why ?Its because I have many different sprites that I need to draw in one frame, so using Quads and SetTexture function will rapidly slow down rendering... I've already tested that. Also I'm creating 2D game only... So I dont change camera, I set that on startup only like that:D3DXMatrixIdentity(Identity);D3DXMatrixOrthoOffCenterLH(Ortho2D, 0, WindowWidth, FWindowHeight, 0, 0, 1);D3DDevice.SetTransform(D3DTS_PROJECTION, Ortho2D);D3DDevice.SetTransform(D3DTS_WORLD, Identity);D3DDevice.SetTransform(D3DTS_VIEW, Identity);So I have gaps between tiles, as I said I'm using sprite and texture for drawing tiles...Is there any snippet or source code of example, which draw surface ???[Edited by - Overdose7 on April 29, 2009 4:02:37 PM]
  ID3DXSprite is just a vertex and index buffer, and it draws quads. If you want to use quads, you can sort by texture just ad ID3DXSprite does and you'll get similar performance.Your problem looks like a rounding error - have you tried adding 0.5f to your vertex coordinates for the sprite? And are you rotating the sprites in any way?Also, the image seems to be slightly blurry, which is usually caused by your backbuffer not being the same size as your client area - are you calling AdjustWindowRectEx to get the correct size for your window? If you have a 800x600px window and a 800x600px backbuffer, the client area will be smaller than 800x600, since the dimensions passed to CreateWindow is the size of the window including all borders.   ;  I would recommend against using sprites for tiles. It can still be a good idea to use them for the actual sprites in the game, just not the tilemap. It is probably easier to create the tilemap as a static grid of quads, that you draw in one go, not a separate draw for each tile. You make this work by putting all the tile-textures into one big texture, side-by-side, and then adjust the texture-coordinates to get different tiles, without ever changing the actual texture. That way you get rid of all problems like these, + it can be much faster. Maybe later on you will have very few tiles sharing the same texture anyway, so then the sprite-drawing will be just as slow as changing texture in between each tile.EDIT:Actually, it's possible you have another problem.. isometric tiles don't always fit together automatically.Check this thread, second to last post: http://www.gamedev.net/community/forums/topic.asp?topic_id=501804This problem can also be solved automatically by using a grid and square textures, rotated on the fly by D3D. If you want per-pixel perfect display as you have drawn the tiles, then you might have to come up with some method that makes your tiles fit exactly at the edges..[Edited by - Erik Rufelt on April 28, 2009 6:31:18 AM]