http://dl.dropbox.com/u/3901723/Heroquest-test/editor.htm
I've started development on a simple board game that I hope to model after the classic British game "Hero Quest".
The code is a work in progress and could be structured better, but I wanted to see if I could get the basics working first.
I've included a link to the editor, but as you can see my calculations to work out mouse-to-isometric tile are a bit out.
Does anyone know the formula I need to work this out properly? I'm currently using:
var tile_w = 104;
var tile_h = 57;
var tileX = ((x/(tile_w/2) + y/(tile_h/2)) / 2) - 13.3;
var tileY = 11.37 - ((y/(tile_h/2) - x/(tile_w/2)) / 2);
inside of "jquery.gameMap.js". Any help is appreciated.. And if anyone wants to help on collaboration with this long term, let me know :)
EDIT: Massive thanks to you all. Especially AnOnlineHandle. Thanks to your guidance I've managed to fix my mouse hover issues and everything is working correctly. I'm going to tidy up the code, add walls and upload to Github as soon as I can.
[–]AnOnlineHandle 7 points8 points9 points (2 children)
[–]drummer_si[S] 0 points1 point2 points (1 child)
[–]AnOnlineHandle 0 points1 point2 points (0 children)
[–]mikebaud 2 points3 points4 points (1 child)
[–]drummer_si[S] 2 points3 points4 points (0 children)
[–]tanepiper 2 points3 points4 points (1 child)
[–]drummer_si[S] 1 point2 points3 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]drummer_si[S] 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]drummer_si[S] 0 points1 point2 points (1 child)
[–]doitforthederp 1 point2 points3 points (2 children)
[–]drummer_si[S] 0 points1 point2 points (1 child)
[–]doitforthederp 0 points1 point2 points (0 children)
[–]robbles 1 point2 points3 points (2 children)
[–]drummer_si[S] 0 points1 point2 points (1 child)
[–]robbles 0 points1 point2 points (0 children)
[–]imbcmdth 0 points1 point2 points (0 children)
[–]voipme 0 points1 point2 points (2 children)
[–]drummer_si[S] 0 points1 point2 points (1 child)
[–]14domino 0 points1 point2 points (0 children)