Monday, April 11, 2011

Hooray for Logic!

So, as mentioned in a prior post I was mucking about with HTML5 canvas and hex grids... I believe I have worked out the kinks in my logic and have therefore managed to build a script that draws the grid as I have it in my mind.

In the process of reworking my faulty logic I cleared out all the the "mouse" logic I had before, it shouldn't be too hard to put most of it back in and work out the intersection logic for the offset cells... I hope.

I think the next think I'm going to work on is "moving around" the map.  Right now I always display the map with 0,0 in the upper left corner and I don't even have a way to statically set an "offset". So I'll need to make the draw code work with a variable to determine where to start drawing and then work out way to move around (maybe with mouse dragging or similar).  Then when I start trying to fit my "figure out which cell the user is clicking on" code I'll be able to take this offset into account.

Still nobody wanting to help me out with my project and no real reason to believe it will ever move beyond the "me figuring out how to do stuff" phase... but hey, stranger things have happened.

edit: I've done some more work and have much of the stuff I was talking about needing to do done now...


No comments:

Post a Comment