Author Topic: Why there are no hachures in the map editor  (Read 633 times)

0 Members and 1 Guest are viewing this topic.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 503
Why there are no hachures in the map editor
« on: April 30, 2020, 11:52:42 PM »
Ezra's prototype had a way to draw contour lines as hachures.
People have seen this in a video and ask why this feature didn't make it into the current version.
This is because it's very difficult to get them to work "right" without some draughtsman drawing each one manually.
Which is probably why they stopped using hachures in cartography.

In principle, it sounds kind of easy.

Contours are dashes currently, and other terrain has dotted lines.
I can alter some of the properties on the line you see for a contour.
What happens if.
Say I make the dashes really short and the line wider.... and the gap between the dashes smaller.
We get lines run across the stroke.
Sounds like a plan.

The problem is what happens with the ends and when the angle of your contour doesn't quite suit.

You can see some of the issues here:



The simple approach doesn't work.

Solving those issues would involve a lot of work.
Because if simple is out then I'd need to build hachures myself, completely from scratch.
Calculate the direction the user is drawing in.
Calculate a 90 degree offset so you can then draw a line across it.
The really really hard bits then start to kick in.
Because you need to work out if those lines will cross like some of those thick bits in the picture.
Work out an algorithm to avoid that.
Then what do you do about more acute angles where the gap between the outer edges of hachures increases?

It's a fairly complicated subject and IMO relatively few people will like whatever I do.
The time spent on anything isn't just free.
It's mine.
And time I spend on anything doesn't deliver a working game is very difficult to justify.