itch.io is community of indie game creators and players

Devlogs

0.7.3: Bug fixes, GeoJSON export

Medieval Fantasy City Generator
A browser generator made in HTML5
  • The main point of this update is to fix an ugly bug which occasionally caused a pretty serious computer freeze. I can't be 100% sure that exactly that bug is fixed, but I've found (and fixed) a couple of errors which could be the reason of the issue.
  • A number of smaller bugs were fixed including the one with extramural buildings being placed too close to the city wall, the one with both ends of the river on the coast, the one with weird roads etc. The actual list is quite long.
  • To prevent gates from overlapping neighbouring buildings, small plazas are now created around gates.
  • I have finally replaced my naive implementation of Bowyer-Watson algorithm with a port of Delaunator for creating Voronoi diagrams. What does it mean on practice? It means that one of the stages of city generation is now a hundred times faster. This stage wasn't a bottle neck, so you probably won't see a difference, but it's important for further development of the generator.
  • Export to JSON (to GeoJSON to be exact) is added for those who want to tinker with data created by MFCG, instead of images. This is not the final version of this feature, I'm not even sure I want to stick with GeoJSON (it seems kind of awkward to me), so your feedback is most welcome.
  • Two new URL parameters added: gates & export. The former lets you specify the exact number of gates (for example, gates=0 will produce a city without gates). The latter (with valid values of png, svg and json) makes the generator export the map right after creating it. It can be useful for some kind of automation.
Read comments (28)