I am trying to build a simple procedurally generated map, which basically is just a 3D representation of a 2D tile map; let’s assume, for simplicity’s sake, that there are only two types of tiles: “wall” and “floor”.

Now I’m looking for a good way to build mesh of such map. My first (somewhat naive) attempt was to create walls by cloning and positioning a cube model (the floor is just one big plane mesh).

This is somewhat working, but now I get random dark lines between wall blocks (pointed by red arrow on the screenshot). Also, I don’t like it anyway, because there always will be a lot of faces that will never be displayed, which is probably not very optimal.
So, the question is, what would be the best way to build such map? I don’t want to just generate the whole mesh vertex by vertex, because later I will probably want to make models of wall blocks a bit more complicated, by adding some details to them. I thought about constructing the map by cloning not cubes, but separate faces (squares); I haven’t tried that yet, but I’m not really sure if it’ll help me with that “dark line” glitch. May be I should not just create group of cube/square clones, but rather combine them into a single mesh somehow? Or is there some other way I haven’t thought about?