Skip to content

a simple example for a hexboard with ebitengine

License

Notifications You must be signed in to change notification settings

ConValance/ebitengine-hexboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

License

Stars

Watchers

Forks

Languages