R
romacat2

  • Dec 18, 2024
  • Joined Sep 5, 2023
  • 0 best answers
  • Hi) I am find a assets with 2d hex(https://godotengine.org/asset-library/asset/1032) for create strategy game, but I want to create 3d strategy game like Civlization 6, but in Godot 4. I need generation system, shortest way finder and scout function/

    • Tomcat and Jesusemora replied to this.
    • romacat2 I hate doing this, but look at my answers in other posts.

      here is my script for AStar pathfinding in gdscript for use in games set in a 2D grid:
      https://godotforums.org/d/40050-how-to-make-astar2d-work-with-an-isometric-tilemap/3

      how to use Arrays in godot as a 2D grid:
      https://godotforums.org/d/40039-puzzle-game-help/2

      hex are a specially difficult topic. the grid is square, but you have to determine if the current tile is even or odd, and as they are created they are shifted by 0.5 tiles.
      then during pathfinding you need to determine again if the tile is even or odd in the Y coordinate, and use a different set of directions for each.
      one would have:
      LEFT RIGHT UP-LEFT UP DOWN-LEFT DOWN
      while the other would have:
      LEFT RIGHT UP UP-RIGHT DOWN DOWN-RIGHT

      godot's AStar2D is not good for these games because it's designed to work with "nodes", as in, pathfinding nodes. these can be placed arbitrarily, which is good for using a NavMesh, but not when all tiles are evenly spaced and you have so many. the main disadvantage is having to set AND connect each individual pathfinding node.

      edit:

      I need generation system

      this is done with either a perlin algorithm, or the wave function collapsed everyone is always talking about.
      I prefer perlin.

      but first get a working grid with a single type of tile, and then you can think of extending it and adding pretty graphics.

    • Compatibility render in Godot and Eevee in Blender

      • GlyphTheWolf Maybe there is some issue in export setting? Or there are some errors reported by Godot when importing? Have you checked console output of Godot (or output in Godot editor)?

        drivers/gles3/shader_gles3.cpp:242 - SkeletonShaderGLES3: Vertex shader compilation failed:
        ERROR: 0:326: ';' : syntax error syntax error
        drivers/gles3/shader_gles3.cpp:294 - Method/function failed.
        drivers/gles3/shader_gles3.cpp:242 - SkeletonShaderGLES3: Vertex shader compilation failed:
        ERROR: 0:329: ';' : syntax error syntax error
        drivers/gles3/shader_gles3.cpp:294 - Method/function failed.

        • Tomcat Can you share the problematic file?

          ZIP with simplified model don`t upload here...

          • GlyphTheWolf Hm, you:
            1.Create model in Blender
            2.Export as .glTF
            3.Import .glTF to Godot

            Right?
            I use such approach and it works fine for me. I use currently Blender 3.5.0, but before I used also older versions and it always worked. I do not export models with materials though. Anyway not sure if that makes difference, because I guess it shouldn't cause issue with skeleton anyway.

            Maybe there is some issue in export setting? Or there are some errors reported by Godot when importing? Have you checked console output of Godot (or output in Godot editor)?

            I will export to .glb and my Blender is 3.3 LTS and Godot 4.0

          • DaveTheCoder Is it possible that the mesh is there, but is very small? I recently experienced that with an imported mesh. I had to make its scale 100 in Godot to make it the same size as the other objects in the scene. Although if that's the mesh's bounding box in the image, I suppose that's not the problem.

            Hmm. Hologram of object is big and visible(or I add not a full .glb file, only mesh, it visible)

          • Hi, i have a question/
            I will create model in Blender 3.3 with armature.
            I want to import it to godot 4.0, and mesh is invisible.(if I divide the model into mesh-. res it is, but I need bones)
            I will export model to glb and import to godot
            View in blender or glTF viewer:
            In godot(also without bone):