I'd like to ask Toady, or anyone with knowledge from fiddling, some questions about how DF implements features of the game (mostly data structure questions). The reason for this is that I'm toying with a basic game engine in my spare time, and I'd like to see how Toady's methods differ from my approach. And let me assure you, Toady, I'm not attempting to recreate DF by myself, and even attempting to would be an exercise in sheer hubris.
Toady, I totally understand if you'd rather not discuss some of the details, or don't have time to, but I'm pretty sure all of the questions could be answered with either a yes/no or a short explanation. So I'll endeavor to make each question as easy to answer as possible. Also, if the details of a question could be answered by my perusal of the Kobold Quest code (which I haven't delved into), I would graciously accept that answer as well.
So here's the list of numbered questions:
About map blocks:
1. Do they have a fixed-size (in x,y,z dimensions, not memory)?
2. Contain a 2 (3?) dimensional array of map tile data structures?
3a. Store meta-information about the tiles it contains?
3b. Like the presence of water in at least one of the tiles?
3c. Or the presence of at least one unit/item?
3d. Or the presence of any walkable tiles?
4. If the answer to 3a is no, how do dwarves go about finding things like drinkable water (assuming they don't just simply scan over every single tile in the map)?
About path finding:
5. Which basic algorithm does it implement, A*?
6. Does it operate on the block-level as well as the tile-level?
7. How is a path that spans Z-levels handled? Does it first look for accessible stairs, then connect the endpoints?
About OpenGL:
8. DF uses OpenGL, right?
9. Renders texture-mapped quads?
[ June 05, 2008: Message edited by: Idles ]