Rectangular Map

When it became time to think about a larger world map, I decided that it might be easier to go with something more rectangular. It made setting up the map in a two dimensional array easier. See Amit's Hexagonal Grid reference on coordinates for more info.

For this version of GeoQuest, I've expanded the map greatly. It is 64 "columns" by 16 "rows". I needed something larger to work on implementing a scrolling camera. When the camera scrolls (with the buttons), the map will load new hexes as it needs to. The scroll buttons use Accelerating Buttons from Alex Matchneer's (Machty) Ember-Concurrency wonderful addon. The longer you hold down the button, the faster it will scroll. Next will be to scroll the map when the player's ship moves.

I've also added a debug layer to the canvas. I intend to use this to have a visual representation of the map related functions.

Rectanglular Map

The image above shows the state where the mouse is hovering over hex #99. The purple line is the path the ship would take if you click the hex. The yellow boxes show the order of neighbor hexes it processes during the find path routine. The path shows it going around the "blocker" land hexes.

Shortly I'll be implementing a Field of View capability and have the ability to hide the portions of the map not yet explored.