In the last post I described how I investigated and fixed several bugs in mapgen4's boundary points and rendering. I was a bit annoyed at myself because I didn't initially follow great practices while debugging, so it took longer than it should have. But I was also glad I found and fixed the bugs.

One reason I wanted to try a double boundary layer was that I thought it might be neat to "fold" the edges downwards a bit, so that when you look at the map from the side, it'd have some depth. So I tried it, and … it worked! And it was so easy (after I fixed the earlier bugs). I then changed the underground color and added a faint line at the fold:

Underground view

I love the way this looks! I especially like the faint fold lines (dark for land and light for water). The edges aren't quite smooth though, as some of the landscape rendering interfered with the edges. I had to fix that, as well as river rendering. I made it support blue for ocean and brown for land. The blue/brown are hard-coded though, so that means I needed to re-implement the sepia color option:

Supporting the sepia color mode

I also added some horizontal lines:

Horizontal lines underground

Unfortunately these are all hacks. I'd love to have a clean way to do this but I don't have that right now. I'll leave the hacks in for now, and revisit later. It's not an important feature of mapgen4, so I'm treating it as an experiment/prototype for now.

Other notes:

  • I'm trying to write things to my blog and not only to Twitter. I started my blog in Feb 2003, so it's over twenty years old. That's older than Twitter. And given how long social networks last, my blog may outlast Twitter. So I'd much rather my content be here than on Twitter.
  • Writing these three blog posts felt like it took longer than working on the code. Tweeting is quick and easy by comparison. This is frustrating, and is one reason I'm not blogging as much as I'd like to. I don't yet have a solution for this.

Try out mapgen4: adjust the Zoom slider slightly out, then adjust the Tilt_deg and Rotate_deg sliders to see the underground rendering.

Labels: , ,

1 comment:

Amit wrote at April 29, 2023 11:02 AM

Thanks Monstah! I found the small twitter community I was in friendly and helpful but recent events have reminded me that in the long term it's better for me to post things here.