1
Graphics / Re: What data structures should I use for a Roguelike random dungeon tilemap?
« on: November 16, 2016, 03:31:01 pm »Why would you think it's not possible to use one texture if it's procedurally generated? How will you procedurally generate the texture then?
I'd assume you'd use a render texture to render the different procedural elements onto. Then you could simply get the texture from the RT and use that.
300 x 300 tiles = 90000 tiles = 180000 triangles
Whether this can be rendered easily or not highly depends on the hardware, but generally this should be doable for most systems. However if possible, I'd probably still try to use a vertex array if at all possible.
Sorry for explaining it poorly, turns out that I don't understand texturing completely. So my intuition tells me to create a "Tile" data structure that contains a Rectangle shape, and associate a texture with it (e.g. a wall texture or floor texture). Can you explain to me why it would be more efficient to use a vertex array, and maybe a possible way to implement it? Not in complete code of course, but in general steps.