User blog:LOTRMod/Roads

Look at all the lovely roads we now have!



Since roads are determined solely by the positioning of waypoints (I cannot control the actual paths) getting some of these to work has been a huge headache. In particular, the roads in the Shire and Gondor were awful to sort out. And Harad's roads (not shown here) are still a complete mess.

I also had to introduce a lot of new waypoints all over the world to make the roads follow the right paths, including Dale, the Enchanted Stream, Crossroads of the Fallen King, "Helm's Crossroads", the Brandy Hills from LOTRO (which I regret slightly), several new Shire towns, and two as-yet unnamed waypoints in Enedwaith and North Ithilien that need to be positioned where they are to make the roads follow the correct paths, but I can't for the life of me find anything from LOTR to associate with those places. So I suppose that is mostly good.

Some interesting statistics on roads currently (these will increase as I add more roads)

There are:
 * 21 separate roads
 * Comprised of 72 individual "splines"
 * 579,514 individual pre-calculated road points (this is a lot) at approximately 1 road point per block
 * Therefore, the total length of road in the mod right now is roughly 580 km
 * It takes around 0.25 seconds to calculate all this road stuff while the game is loading, which is really quite fantastic if you think about it
 * Roads occupy at least 92 MB of RAM while the game is running, and quite possibly a lot more.
 * (This is because of all the road points being pre-calculated, and the need to cache them in individual sectors of the map so that every single chunk doesn't check through all roads all across the world while generating, which slowed the game down unplayably on first testing)

From what I can see in testing, roads add on about 30% more "lag" while generating in an area with roads, and about 1.4% if there are no roads nearby.

But bear in mind that this is only during first generation of a chunk. So, basically, unless you're travelling along a road for the first time, there isn't going to be any noticeable lag from roads. This is quite excellent because I half-expected roads to make the game extremely laggy just by the sheer volume of data they need.

Also quite by chance the Great East road passes just south of Weathertop, like it does in LOTR. As I said above I have no control over where the roads go between points, so this is a very happy coincidence.