Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have developed an iso engine for a farm game. In general it works fine, but the problem is that it is not always accurate when pressing the tiles, so the tile I wanted to select is not the one picked. Anybody has some ideas how to improve this?

share|improve this question
You should at least provide some code that shows what you're currently doing so that people can tell you how to improve on it. – Tetrad Feb 14 '12 at 16:50

You should use a transform matrix. Check out this tutorial:

share|improve this answer
Could you provide a few paragraphs on what a transform matrix is? Link-only answers are highly discouraged on the Stack Exchange network. – Manishearth Dec 2 '12 at 2:24
ok basically what we're trying to do is creating a transform matrix that will match the isometric world. So then, when looking up for coordinates of your isometric tiles, all you have to do is vector v = inv(transformMatrix) * vector u. Your game camera is in fact a transform matrix. It just is very basic (identity matrix scaled by some factor). The transform matrix for an iso world is a bit trickier (rotation by 45 degree, scaling, translation) but there is nothing that is really complicated. Hope this helps! – Tony Dec 2 '12 at 3:50
Oh, I have no interest in this post, I was reviewing. I meant for you to add that into your post--it helps prevent link rot. – Manishearth Dec 2 '12 at 9:53

In this answer the ratio between the projected diagonal of a square laying on the ground are 70:30. You can generalize with ease for the particular perspective you are using.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.