http://www.blitzbasic.com/logs/userlog.php?user=963&log=270
Is there support for holes in the ground so you can build "into" it for things like caves and the like?
There is no native support for holes.
You could manually create meshes for those tiles which you want to have holes though.
Type TerrainTile
Field Current_Detail_Level
Field TileHeightmap.Heightmap ; The heightmap which this terrain tile uses.
; More than one tile may use the same heightmap.
Field Mesh[TERRAIN_DETAIL_LEVELS] ; This is a list of pointers to the entities which represent each detail level of this
; terrain tile. The detail levels are 64, 32, 16, 8, 4, and 2.
End Type
Here is the type where all terrain tiles are stored. As you can see, it's very simple. The system is desgiend to allow you to either load a heightmap and have all the tiles created automatically, or allow you to manually create the tiles and all their detail levels yourself.
Then the system automatically picks the right detail levels and displays the tiles that are near enough the camera.
So you could load a heightmap and the replace some of the tiles with your own custom tiles that have caves. You could create those in a 3D package and import them. You would have to create several levels of detail though. You probably would want to just delete all the polygons inside the entrance at the lower detail levels since the player would be too far away to see in anyway.
Is it a deal of a single, large color map with a detail texture tiled across it? Or, is it like the Torque engine system where you have layers of textures that can be painted, erased, blended by height, slope, etc? Or is it just arbitrary tiling of textures across the surface?
The terrain is made of "tiles". Each tile can use any texture you have loaded. This texture will be stretched across the whole tile. The size you choose for the tiles determines how much the texture is stretched. I set the default to be a good balance between having the texture at a decent resolution, and not having too many tiles visible at once.
These textures also can be flipped on each axis seperately, so you can reuse textures that transition between one surface and another.
The tiles can also have a lightmap applied. The system will allow you to automatically stretch this lightmap over all your tiles.
It would be trivial for you to make it also apply a detail texture to each tile, though I'm not sure how good this would look, as each tile would have to have the same detail texture all the way across it, and then if you changed detail textures at the next tile it would be obvious unless you changed the detail texture slowly across multiple tiles.
Running through an open field would have greens and some browns for dirt/grass..
You can load multiple textures, so you can apply different textures to different tiles to achieve this in much the same way as you would in a 2D game.
4. Placement of objects:
The way my system works is quite simple. You call a function to load a heightmap, and call a function to turn that into a terrain. Then you call another function to apply the texture you want to each tile of the terrain. Then you call a function to apply the lightmap.
Once you've done all this you won't see anything on the screen. You call a function in your main loop, and pass it the location of the camera. The function then chooses which tiles to make visible, and selects the appropriate detail level.
Where you go from there is up to you. You can load objects and place them by using a function that tells you the height at any point on the terrain. By using getting three heights, you can calculate the angle of the terrain in a particular area using a cross product, and use that to angle your objects if you wish.
It works pretty much the same way as the terrains in Blitz. The system will not interfere with the rest of your program in any way. It just makes the terrain appear on the screen.
To make the player walk over the terrain, just get the height at his current position, and move him up to it if he is below it.
It's far from perfect, and if I coded another system I might do things differently, but each method has its own limitations. The method I chose here works pretty well, and is pretty easy to use. Other methods would be a lot harder to use but might get you better looking results.
If you have not checked out the demo, you should. And you can try out the tile texture stuff if you run in windowed mode so you can see the mouse and click on the terrain. I don't remember the hotkeys for changing tile textures... pgup/dn I think... ... I think I either mention them in the demo, or on that page I linked to.