Hi Andrew,
Great to hear from you again - hopefully quicker next time!
I've attached the world bitmap. Each pixel represents a terrain grid 14km * 7km. The world's surface consists of 2784 * 2784 grids, so that's the resolution of the bitmap. The file size is 7.39 Mb, so it's not too large.
I used three data sources to create the bitmap:
1. Landclass data.
2. A list of cities
3. A list of airports
I used Lua code to process and combine the data into the final bitmap. The landclass data was the best I could find for my purpose but it still wasn't very good.
For the simulator I use two languages: Visual Basic and Lua. I used VB to create the Aircraft Factory program and also to make a terrain processing tool which converts shuttle SRTM terrain data into .obj files which I can import into Softimage. Aircraft Factory automatically creates about 6000 lines of Lua code for each vehicle type. If I update the vehicle code I update the appropriate library files used by AF. I can then use batch mode to update the code for all the vehicles in a few seconds. Without AF updating the code for all the vehicle types would be a nightmare!
As you probably know, Lua is the scripting language of Cry Engine. It's very powerful and easy to use, the syntax is vaguely similar to Basic. It can easily access a large library of C++ Cry Engine libraries. E.g. to set an entity position, the code is self:SetPos(x, y, z); To get the terrain height by ray trace it's
local hits = Physics.RayWorldIntersection(EntPos, {x=0, y=0, z=-8000}, 1, ent_all, self.id, self.id, hitData);
Crytek keep threatening to end support for Lua, but it can still be used in CE5, though possibly it requires GameSDK. However, I'm not developing the simulator for CE5 as CE3 is far more suitable and CE5 seems to have a fatal problem, possibly two.
Roads and railtracks are created by the same Lua entity. Each road or railtrack is a section 30 meters long which can have a set bend angle e.g. zero or 15 degrees. The entity deletes sections beyond a set distance and loads sections that have come into range, so very long roads work fine as only a sub section are loaded at any time. As I think I mentioned, I've used road lengths up to 100km, but there's no reason why roads much longer shouldn't work. I might try e.g. a 1000km road to see how it works.
It's a lot of fun using the simulator editor to create and edit roads or railtracks. It works in two ways. You can select individual sections and change the bend angle. Each time you do that all the subsequent sections will be re-drawn. The second method uses waypoints. Each waypoint is drawn as a sphere. You can select a waypoint and move it as required. The road follows the waypoints just like a spline following its control points. One big benefit is that you can edit a section of road without having to re-edit all the following sections.
I recently updated the roads code so they can have pavements and curbs, this works very well for cities. The code also allows objects to be placed along roads e.g. traffic lights shown in the previous post.
"so when the raycast hits and checks material type it knows whether or not to drop forest objects or grassy objects."
That's a nice idea. I have toyed with the idea of creating code that can analyze terrain textures and recognize buildings and trees. Currently the editor allows you to choose from a library to place and move objects on the terrain. This allows realistic alignment e.g. teees with tree images on the terrain, but of course it's very time consuming. To be able to automate this would be magic.
Yes, the world system literally moves all elements of the map dynamically in-game. This keeps the player withon 5 km of the Sandbox origin, even after travelling thousands of miles. I'm actually amazed it works so well. The jumps are essentially invisible. However, there is a catch: all elements in the map must be capable of being moved dynamically and accurately whenever a jump occurs. This works fine for terrain grids, all brush objects attached to the grids, all simulator vehicles, the sky dome, clouds etc. But there's one exception: effects. It seems that, once emitted, the effect particles can't by moved by the code, even if the effect itself is loaded into an entity slot. So, if I'm flying a fast jet and I fire a missile, the smoke trail will be fine until a jump occurs. After a jump the smoke will be displaced by 5 km, which isn't very realistic.
Possibly the code could move standard game characters in a jump. But it's not a problem as I don't use standard game characters, including the player. When you're walking in the simulator in game mode, you are actually in a vehicle named, appropriately enough, Walker. It is very similar to the standard player character, and has some enhancements e.g. commands to change the view height and walk speed. Walker is actually a standard simulator vehicle, the main difference being that it moves on legs rather than wheels. Because it's a simulator vehicle, it's jump-friendly. Walker can also be used for AI characters, including animals. They can be set up to follow waypoint paths just like vehicles. They should also be capable of combat just like vehicles, though I haven't tried that.
So, in a nutshell, the world system does keep the player in the map bounds, but all elements of the map must be jump-friendly. Things like AI navigation areas probably wouldn't work, but the simulator does have alternative methods.
I saw your videos showing the transition from space to a planetary surface. I've spent a *huge* amount of time on this problem! The spaceflight system works really well, you can easily fly from Earth orbit to Saturn. But the really big problem was to make a realistic transition between space and planetary surfaces. I've done a lot of work on this recently so that now the world and space systems work well together. The transition uses smooth control of the transparency of the planet sphere. In orbit the planet is fully visible while the terrain is disabled. As you descend to the surface the planet becomes more transparent and finally fades away revealing the detailed terrain below. There probably isn't a perfect solution with Cry Engine, but this works pretty well.
I'll see if I can make a demo video in the next couple of days.
Meanwhile, you can see the manual. Although well out of date it contains a lot of information, and there is some info on the world system.
https://filedn.eu/lVP0lntroxNm8qxOBmfu6 ... anual.html
As always, feel free to ask any questions!
All the best,
Chris