Jump to content
Posted 05 August 2012 - 06:48 PM
Posted 06 August 2012 - 02:43 AM
Posted 06 August 2012 - 02:19 PM
Posted 06 August 2012 - 07:34 PM
Posted 07 August 2012 - 12:29 AM
Posted 07 August 2012 - 07:28 PM
Posted 08 August 2012 - 09:18 PM
It should hold true. I though point P is in screen space and it gets translated into point T which is P in grid space. Essentially grid space is like viewing the hexagon tile from perfectly above or basically without perspective.
One of the quickest and easiest ways to do it would be to use a mouse map like in this article (check out the very bottom for the mouse map idea).
Posted 09 August 2012 - 11:58 PM
If it turns out to be slow you could always use the equivalent technique but as an array (i.e. just assign each color a number and build an array that you embed as an include), that way the only cost is a very quick array index lookup.
I'll certainly be experimenting with this method tomorrow but I've had mixed experiences with Canvas' getPixelData() function.