Isometric

I’ve added a new little project – Isometric. It’s breaking the rules a little bit because it’s not a fully completed project; but I think better to publish than not. I guess eventually it could be a whack-a-mole type game.

It’s not driven in the most efficient way – I’ve written a little geometry library and use matrices to transform and scale coordinates to match what I need to draw out my little isometric tiles. But it’s a fun way to do it and gives me an easy way to reverse a screen-coordinate mouse click to get a world-coordinate tile; which is otherwise quite challenging with an isometric viewpoint.

The code is, as usual; disgusting at the moment, including some commented out stuff for rendering world tiles like grass and sea; and some “inline tests” which check the code is giving the expected result and pops up alert boxes when it fails! Shocking!

I’ll investigate a JS unit testing framework and integrate it into my workflow next time; it’d be a massive help for this kind of trivially testable stuff.

Leave a Reply

Your email address will not be published. Required fields are marked *