Skip to content

GDExtension for hexagonal 3d maps in Godot Engine v4

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE.txt
MIT
LICENSE-godot.txt
Notifications You must be signed in to change notification settings

dmlary/godot-hex-map

Repository files navigation

Godot 4 GDExtension for creating 3D hexagonal maps

This GDExtension is a rewrite of the Godot GridMap module to support hexagon cells, and improve its maintainability.

At this time, the HexMap node has feature parity with GridMap barring the explicit removal of per-tile navigation meshes.

The GDScript API for HexMap is not yet stable

Screenshot 2024-10-03 at 6 57 52 PM

Features

  • Hexagonal shaped cells in HexMap (godotengine/godot#85890)
  • Supports LightmapGI for lightmap baking
  • Supports NavigationMesh baking
    • Specific tiles in MeshLibrary can be excluded from baking (see demo)
  • GDScript HexMapCellId cell id helper class for navigating hexagonal space
  • HexMap cells_changed signal that inculdes cell ids for modified cells (godotengine/godot#11855)
  • Editor improvements
    • Variable selection axis (y-axis editing, camera rotation determines selection snapping)
    • Current tile hiding; allows painting tiles to show when smaller than existing tile

Important Changes

  • Hot keys have changed; check the menu in the editor
  • Support for baked per-tile NavigationMesh removed

Fixes from GridMap

TODOs

  • Add lightmap baking support
  • Mark MeshLibrary items as navigable/non-navigable
    • this can be used in NavMesh baking to include/exclude tile meshes
    • Either through navmesh presence in MeshLibrary, or through HexMap data
  • GUI rewrite as PackedScene
    • Speed up GUI redesign
  • Switch to bottom panel GUI
  • Preview placed tile in editor; existing cells can hide the cursor model
  • Investigate copying custom data into baked mesh: godotengine/godot#89254
    • don't know how to create a mesh with CUSTOM0, and where it is stored in the mesh/surface
  • switch erasing to be a tool instead of right-click to allow free look
  • clean up input handling in editor; consume all events during certain states to prevent odd behavior
  • Editor selection modification support (grow up, down, etc)

NavigationMesh

* No support for per-tile NavigationMesh
* NavigationRegion can bake using the HexMap
* HexMap tiles can be exculded from NavigationMesh baking (set `navigation_bake_only_navmesh_tiles`)

About

GDExtension for hexagonal 3d maps in Godot Engine v4

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE.txt
MIT
LICENSE-godot.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages