• Advertisement

Archived

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

Tile Map Terrain in DX8

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
I would also like to know if there''s any faster way than rendering every tile individually.

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

  • Advertisement