I work on a hexagon map based browser game. I have this: http://www.dark-project.cz/wesnoth/map-view/1 and now I have a problem I want to mark the fields at which the unit can go (it has limited movement). If the movement is 1 there isn't any problem but if it's higher it doesn't work right (try it).
I work with a coordinates system http://www.dark-project.cz/wesnoth/coor.png
My actual js is here: http://www.dark-project.cz/wesnoth/js/map/base.js
In other question ( Movement algorithm on a hexagon map) @unkulunkulu recommend me to use the BFS algorithm. But I have no experience with algorythms like this and its implementing into javascript and then its use on hexagon map. He say that the BFS algorithm is better for that because I can easy expand it later (add some obstacles etc.).
If you have some link to a javascript tutorial about this or something similar it will be amazing.