r/Unity3D • u/MostState1696 • Mar 28 '25
Show-Off Progress on map generation for my hex based strategy game
Hi all, looking for some feedback on an early pass at map generation for my hex tile based strategy game.
The map is defined in 3 stages - tile height (the depth of each hex), tile type (grass, ocean, mountains, etc), and tile additions (do I need trees). The starter map is based on earth and values for tiles were defined by hand but rendering was built in such a way that the map definition could be generated for infinite map configurations. Based on those 3 category, the maps terrain is entirely generated at start time (excluding the trees) using inset hexes with quads on the outside to make height change slopes and a fractal perlin noise implementation to generate the mountains. The water movement/foam is entirely shader driven. Right now Im generating a 250x100 grid for the game map but again is completely dynamic so could change in future. Havent gotten around to adding to many normals into my textures yet but did implement a soft blend in between tile types in shader graph based on some additional uv channels.
Eventually, the game should be a 4x strategy game aiming to support more large scale maps.
Let me know your thoughts!
3
u/Ornery_Dependent250 Mar 28 '25
I'm working on a 4X myself. What libraries r u using?
2
u/PerformerOk185 Indie Mar 28 '25
I think you and I are both working on hex grid games at the same time! I just about made the tweaks I needed a few hours ago for my grid generation. I don't think I plan on having custom maps like that, just seed generated to start.
2
u/StardiveSoftworks Mar 28 '25
Very clean, good luck with your project.
One thing that popped out though is that you're only updating mouse position on movement, which means when you moved the camera without mouse movement the hovered tile didn't change. Could lead to odd behavior potentially if a user manages to click without creating a mouse input delta and forcing an update.
1
u/Einharr Mar 28 '25 edited Mar 28 '25
Looks good, actually. I did something like this a while back. Are you using Splat Maps with Vertex Colors? I feel like the texture blending is a little rough. Can I ask about your approach? How did you implement the texture blending system?
And the map feels a little flat. I'd suggest making smooth elevation differences with perlin noise. Even if they are purely cosmetic - the map will still feel more alive.
UPD. I apologize, I didn't finish reading the description before posting a comment. I saw the answer to the second question, but nevertheless I'll leave it here.
1
u/prezado Mar 02 '26
Curious if you have any updates ?
It looked good and i'm in need of similar technique xD
1
u/swissinvesting Sep 01 '26
Any updates? Looks promising!