EDIT: The updated version of the demo (version 5) is at http://www.destructavator.com/ufoai/terrain_test_5.7zEDIT: The updated version of the demo (version 6) is at
http://www.destructavator.com/ufoai/terrain_test_6.7zNote: The download is just under ~70 MB, and the pre-compiled Windows version (built for 32 bit) requires SSE2 (which shouldn't be a problem unless you have very old hardware). It also uses OpenGL, and as such I'd recommend using the latest graphics drivers direct from the manufacturer (NOT Windows Update) for best performance.
EDIT (again)
Please also look at: http://www.destructavator.com/ufoai/TigersEye1.7z
and http://www.destructavator.com/ufoai/TigersEye2.7zSorry, I used the wrong compiler, the working version for 32-bit is at:
http://www.destructavator.com/ufoai/TigersEye3.7z-- For reference, on my several-year-old Dell desktop (i7 CPU, 2.67 GHz) with an almost-as-old Nvidia GTS 450, I can run most terrain selections in the demo at full screen with anti-aliasing cranked up all the way and get around 150 to 190 FPS while viewing most parts of the generated terrain and objects in the demo, using Windows 7 HP. Also, the demo is not currently multi-threaded, right now it is built to use just one CPU core.
The technical, coding thread on this is at:
http://ufoai.org/forum/index.php/topic,6772.msg53968.html#msg53968OK, I've been working on developing code and stuff for a new system for air combat / interception.
It'll work in a 3D environment, and unlike the battlescape all aircraft and things will move and fight all at the same time, although the speed and pause controls from the geoscape will still be available - in fact the player won't leave the geoscape at all, it'll all take place in a custom UI node on top of the main geoscape view.
As I picture it, if the combat starts with the player's aircraft chasing the UFO, the UFO will start in the center of the map, with the Phalanx aircraft at an edge, approaching the UFO. If the UFO is coming after a dropship or player craft, this is switched, and if both are coming at each other, all opposing forces start at opposite edges of the map.
The biggest obstacle I ran into was trying to get background terrain - I needed to code something that could quickly (with an optional seed value) generate background terrain that wouldn't leave the player waiting a long time, and also be displayed as a 3D model in the scene graph able to be rotated and moved around in realtime.
I've worked hard on this, and I've now gotten together some terrain generation code that can do these things in a work-able way.
Don't expect anything photo-realistic like Terragen 2, that wouldn't run fast enough for realtime animation for a video game.
The code I've written isn't fully complete, but could generate different types of terrain for various areas on the map, so arctic terrain would be made over Antarctica, mountain terrain over a mountain region, etc. It could also make lunar or alien-world terrain.
Oh, and any aircraft that pass beyond the border of the generated map would be considered to have escaped combat (for the moment).
The code I wrote also retains data for each spot on the terrain, so when a UFO is shot down the game will know if it fell in a lake, on some trees, on a mountainside, etc. This information would then be passed to the battlescape, so a ground battle in a matching map would occur.
I also plan to extend this to generate buildings, cities, trees, etc. and place them on the terrain.
Right now, if anyone wants to demo the terrain generation, it is currently compiled to run with 64-bit MS Windows, using OpenGL via the Irrlicht 3D Engine (also on SourceForge), just for a quick demo. If you can run it, use the cursor arrow keys to move around and the mouse to tilt and steer to move around the landscape. Use the usual ALT-F4 to close the program.
For the technical side, this code generates and writes WaveFront OBJ model files of the terrain, water plane, and other objects. It also generates a texture map for each, and the texture pixel data, although it doesn't include any PNG writing library of its own, but has get*() functions for getting the data.
I kept this version of my code very general as I intended to use it in not only UFO: AI, but also other games and programs. For UFO AI I plan to modify the code and extend it to feed the generated terrain directly into memory instead of a file, as well as the texture, and of course render it with the game's engine, not Irrlicht.
You can download the demo at http://www.destructavator.com/media/terrain_test.zip .EDIT: Look at the top of this post for the latest download.