ConValance / ebitengine-hexboard

a simple example for a hexboard with ebitengine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ebitengine-hexboard

a simple example for a hexboard (simple cause for example only few biomes for floor0 and only some parts for floor1).
the example draws two floors, you can flip the tiles x, y. the hexpathfinding works (see green path over the bridge).

the pathfinding is now in a local library. for working import the name of maindirectory should be "hexboard"
or change the name of the directory in main.go in import from "hexboard/astarhexlib" to "yourdirectory/astarhexlib"

ebitengine: https://ebitengine.org/
good information for hex: https://www.redblobgames.com/grids/hexagons/

screenshot:
Pic1

last changes:

  • mouseclick left for new startpos, mouseclick right for new target
  • check if path found, new part for floor1 a tree, floor as parameter
  • changed the pathfinding to a local library in file astarhexlib.go

About

a simple example for a hexboard with ebitengine

License:MIT License


Languages

Language:Go 100.0%