Sign in to follow this  
Pygmyowl

Tile-based, textured 2D side-view terrain - best way to draw?

Recommended Posts

Pretty much what the title says. I want to implement something similar to what is used in Terraria: textured tile-based (by which I mean comprised of physical blocks - just in case) modifiable terrain (in 2D, side view). Except with a lot more tiles to draw (I intend to use variable zoom; my current hopes are to draw about 150,000 tiles at the camera's furthest, but I'd still need 4x4 textures for when the camera is up close). What would be the fastest way to draw this? Or maybe I'm way in the dream land here?

 

On a somewhat related note, I'm currently using textured quads to draw objects, because I've read that ID3DXSPRITE is deprecated, not as flexible, and so on. Is this true?

Edited by Pygmyowl

Share this post


Link to post
Share on other sites

ID3DXSPRITE  is very cool. I'm not sure in DX10,11. But in Dx9 it is very easy to use. You should use it for your HUD, menu...

Very fast and robust. Load an image to a texture. Give a pos, then draw (of couse use 1 begin/end for thounsands of draw call) ! NO need for batching, 1 draw call (this is a headache)...

But you will lack shader feature, blending is not very well supported (although you can do many kind, but alpha blending is useful only)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this