Tile Map Terrain in DX8

Started by
2 comments, last by Night_Wulfe 22 years, 7 months ago
Hello. I''m looking for information on creating Tile based terrain (for scrolling) in DX8. I can create maps, and generated a Vertex buffer off the data, then draw it to the screen. However, I''m not sure how to go about adding textures to the tiles. From what I''ve been able to gether, I can''t find a way to specify textures for individual tiles without rendering them seperately instead of in one big vertex buffer.
Advertisement
I would also like to know if there''s any faster way than rendering every tile individually.
You have 3 choices:
Choice 1: use a 256x256 texture size and cram all your tile textures into that one bitmap (not very likely)
Choice 2: have each texture its own bitmap -> thus need to render every tile seperately
Choice 3: get a video card that can support large textures (geforce cards) and thus you can put all your tile textures into one bitmap and thus can render everything at once.

currently i am using choice2 and with a voodoo3 2000 PCI card i render 2 textures on each tile with drawing each tile seperately and render 29,000 triangles on screen and still get 25fps, so even though your rendering each tile seperately, its still possible to get very high framerates even with a crappy video card.

Possibility
Why don''t you put several tiles in a single texture (let''s call this a tile set). You would have several set''s. When drawing, you can sort by sets and render the tiles from a single set at once. So you don''t have a state change for every single tile. Don''t know if this would be possible with your current implemantation.

This topic is closed to new replies.

Advertisement