Azgaar / Fantasy-Map-Generator

Web application generating interactive and highly customizable maps
https://azgaar.github.io/Fantasy-Map-Generator
Other
4.48k stars 636 forks source link

Draft: Alternative grids #1100

Open Azgaar opened 1 month ago

Azgaar commented 1 month ago

Description

Alternative grids, based on idea of #832.

Type of change

Versioning

netlify[bot] commented 1 month ago

Deploy Preview for afmg ready!

Name Link
Latest commit 66004de6f40fb2bf9a8bbe5484133e6917f9e6a9
Latest deploy log https://app.netlify.com/sites/afmg/deploys/66a77615ec41060008923bf9
Deploy Preview https://deploy-preview-1100--afmg.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Azgaar commented 1 month ago

Generally it works, but there are a couple of issues with hex grid geography that prevent from releasing the change.

  1. Hex geometry is not ideal Voronoi calculation algorithm does not provide ideas voronoi cells geometry for hex points, probably due to algo simplifications.
image

The better option would be to calculate hex grid directly and not Voronoi grid. But it will take time to implement and custom solution will probably be bugged.

  1. Generation code relies on grid to be a rectangular grid of cellsX x cellsY cells. The issue is bypassed by adding additional cells to odd rows that make cellsX a stable value, but there are still unknown issues (possible related) on bigger cells count.

  2. This is a low-priority ticket. Most users probably don't need it. Regular grid looks too artificial while the whole FMG idea was to generate more realistic maps. So the PR is in on-hold for now.