Original Post
I'm about to start work on an engine similar to the 'cube' engine (but not similar enough that their source code would be of much use). Essentially, the world is expressed as a three dimensional grid of cubes. Maps are built by basically sticking cubes together. Occlusion is performed with an octree of cubes. Is there a known, fast algorithm for combining quads? Perhaps with sample code? Essentially:
+---+
| |
+---+---+
| | |
+---+---+
Could really be expressed as this:
+---+
| |
| +---+
| | |
+---+---+
..IF the faces can be considered the same, ie have the same textures and possibly some game-specific properties. Three quads become two.
+---+---+---+ +----------+
| | | | -> | |
+---+---+---+ +----------+
And so on and so on... Efficiency and simplicity of implementation are paramount.