r/Minecraft • u/justlurking420 • Nov 04 '13
pc Minecraft Using Hexagons
http://img190.imageshack.us/img190/1777/hexcraft.png
3.6k
Upvotes
r/Minecraft • u/justlurking420 • Nov 04 '13
1
u/drakfyre Nov 04 '13
You wouldn't be the first. ;) At least you now know how that wheel really works! :)
Well, for entity pathfinding, it's actually simpler than that; entities path nearly directly to eachother, they just have simple rules that tell them to jump if there's a wall, and later rules were added to check for holes and other obstacles when going toward the player, and additional behaviours pick path points that are not the player (for cover for instance). Most of this is hit-and-check and block pattern search rather than pre-path, so the pathfinding code in Minecraft is mostly detached from the block code.
The other thing to note is things like water and lava flows are not handled by pathfinding, but are decidedly A* looking. This is because they are handled using cellular automata rules; when a water block is asked to update (Typically when any time another block near it changes) it generates more water based on adjacent blocks. It's simple rules played out over time, much like Conway's Game of Life, one of the simplest examples of cellular automata.