#How do i make the hexagons slot together?

1 messages · Page 1 of 1 (latest)

vagrant igloo
#

I’m creating a hexagonal voxel-style plot system for a farming/life-sim game. Each player’s plot is made up of hex tiles (like small terrain blocks), which can represent grass, water, or other features. I’ve also tried to implement Perlin-noise-based elevation to make the terrain look natural, so some tiles are raised. My goal is for the tiles to seamlessly slot together in a honeycomb pattern. Because the layout is generated procedurally with Perlin noise, I can’t manually position each tile. I’m fairly new to scripting and have been troubleshooting this for a while, but I’m stuck on getting the hex spacing and offsets correct. I manually made a small model to show what it should look like. Any help is appreciated.

open dove
#

If so just make one piece, use ReDupe to extend it, and use perlin noise just for the elevations

vagrant igloo
#

ok thank you! i will try that out.

#

ReDupe looks really useful for quickly filling space with repeated objects, and I see why you suggested it. I forgot to mention this but the issue for my project is that each hex tile needs its own unique data — like a name, elevation/tier, whether or not it's water (future addition once i get this settled), ObjectType flags, and a reference in my islandData table. If I used ReDupe, it would duplicate the models visually, but none of the per-tile data would exist automatically, so I’d have to manually assign all of that afterward, which would defeat the purpose of procedural generation.
What I really need is a way to spawn tiles automatically via a script, so each tile gets positioned, named, and added to islandData at the same time. Thank you so much though!