Jump to content

Roads and Bridges


DevynCJohnson
 Share

Recommended Posts

We had roads (at least the code was ready to have different move speeds for different terrain), but it causes too many problems with the pathfinder. When there are no roads, we can add jps pruning to the A* algorithm, and make the pathfinder a lot faster.

As for bridges, when they are historical, I don't see a problem. I have some code ready for bridges, though it needs to be approved first.

  • Like 1
Link to comment
Share on other sites

Well, bridges would still be terrain-modifying. They'd just do it automatically instead of you having to manually adjust terrain. Walkable meshes are a lot more difficult, and require tight interaction with the pathfinder.

And roads won't be postponed, but completely disabled. Jump Point Search, the pruning algorithm that is used in the new pathfinder (which is under construction) needs that travelling happens on a uniform grid (a grid where every movement is equally fast). We can have speed bonuses or puhishments for certain areas, but the pathfinder won't see those. So the pathfinder will never decide to follow a road, and doing it manually will just cause way too much micro. Things like "speed bonus on enemy terrain" can be made possible, as it doesn't matter if the pathfinder ignores those (normally you don't traverse a lot of terrains).

  • Like 1
Link to comment
Share on other sites

Just to make things clear, would it be "easy" to mod a civilization so that they can build roads that increase walking speed of all units? This would be irrespective of path-finding for reasons stated above and unofficial because it conflicts with the design goals for the game.

Just in case a modding team wants to mod a Road Micromanagement Mod, for example.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...