Some experiments with Dart and Hexes...
The red Path showed on the map is the best path found from the character to the treasure chest. Moving from tile to tile has a cost and the notion of best path is determined by the total movement cost. The map can have several types of tiles : * Land - Movement cost 10. * Forest - Movement cost 12. * Sand - Movement cost 15. * Hill - Movement cost 18. * Mountain - Movement cost 26. Edit the map by selecting one of the button, then clicking on an hex on the map. You can see the minimum number of steps the character has to take in order to reach the treasure.
The character and treasure positions can be changed by clicking on their respective button then selecting an hex on the map. You can choose the type of character to use with the Character Type menu. You may have noted that you can place coin on the map. Well, each character react differently to coins, assigning them a different value. The Sage King, does not take coins into account (he is well above that) but other king may want to trade some movement cost for a coin, affecting the path they choose. Each king gives a value to a coin, that can be represented by the movement cost they are ready to sacrifice for them : * Sage King - Coin value 0. * War King - Coin value 2. * Sly King - Coin value 5. * Greed King - Coin value 9. Try placing coins on the map and see how the different kings reacts.
You can save map under the name you want by clicking the Save button. Maps can then be loaded until you quit or refresh your this page.
You can play with visibility by activating a fog that limits the vision of the character. When the fog is present, the visibility of is computed with a line of sight algorithm from the surrounding hex of the map. Each type of tile as a different height associated to it : * Land - Height 0. * Forest - Height 1. * Sand - Height 0. * Hill - Height 5. * Mountain - Height 10. Consequently, when the character is on a mountain, it can see everything in its vision range. When on a smaller ground (let's say, a forest), every higher element (like a hill) will still be visible but block its field of view. Moreover, the visibility affects the path chosen, reducing the knowledge the character has of the map.