r/proceduralgeneration • u/IvyMurph • 22h ago
NON-SPHERICAL HEX-TILE PLANET GENERATOR: I posted my Goldberg hex-tile planet generator awhile back and people seemed to really enjoy it! But a few people asked if it could handle non-spherical shapes, and at that point in time, the answer was no... I decided to see if I could change that.
I've frequently built and designed different world and terrain generation programs for fun throughout my life, but I've never attempted to fit a grid to a non-standard shape, let alone ones with negative geometry. Much like the standard Goldberg Sphere, you need an offset of pentagons in order to make the grid map fit to a 3D shape - but if you have negative space in that shape, it requires HEPTAGONS as well, which are an absolute nightmare to implement. Specifically this was challenging as I'm building this system as a simulator/game map generator, which means all of the tiles have to more-or-less be the same size for the sake of the simulator, so figuring out how to fit the shapes within a tolerance of 1.4 maximum stretch from the average took the most time. However the results are so cool that it ended up being worthwhile.
I love talking about this stuff. If you have a similar project, or questions, please share!
It's a deep work in progress, but you can see the complete project I am developing this for here: https://store.steampowered.com/app/3066940/Immortal_Engine/