Announcement

Collapse
No announcement yet.

for reference: working hex grid blueprint

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    for reference: working hex grid blueprint

    Here is a blueprint for basic hex grid generation.

    First working solution, am sure there are improvements that could be made. Starts at 0,0 (blueprint itself is offset to accommodate), and expands horizontally (A) right and vertically (B) down. Y being horizontal and X being vertical messed me up, so I refer to them as A and B instead.

    Would like to use unique meshes per tile instead of instancing the same one, in case anyone is wondering, and need to start building some arrays.

    Next step out of curiosity, is figuring out how to place a text render over each tile with their Grid Position AB values, or other info from the blueprint that may become relevant.

    Feel free to provide comments or suggestions.

    Click image for larger version

Name:	hexgrid1.PNG
Views:	1
Size:	480.0 KB
ID:	1212594

    Click image for larger version

Name:	hexgrid2.PNG
Views:	1
Size:	471.7 KB
ID:	1212595

    #2
    Using unique meshes instead of instanced one will take a lot of performance / load time - just saying.
    @CarstenZarbock - Follow me on Twitter, thank you

    Comment


      #3
      I made something similar for a bomberman-like game I was working on, all in one actor using instanced static meshes. Great performance.

      As for text for debugging, I simply added a text render component at the same location I added a grid - I just increased the Z a bit so it wouldn't be inside the mesh.

      Comment


        #4
        I have done everything you have described, along with networking the grid over many clients.

        Suggestions:
        Your grid should have an instanced static mesh component for every type of hex tile you will use.
        Move math to c++, it will be a lot cleaner.
        the instanced static meshes were not replicated over the network, but the actors of each hex were (the actors just contained data, like instance ID and hex type, gameplay info (occupied, vacant, etc).
        I made a blueprint node library in c++, exposing tons of nodes that do hex math. Perhaps i should release this as a plugin.

        Comment

        Working...
        X