Isometric tile question

Nibbie
Posts: 2
Joined: 2009.08
Post: #1
Hello everyone. I am making an isometric tile based game, and have a question as to implementation. The shape of the tile image I have is basically a diamond (because of the isometric factor), and positioning them together means there's overlapping because of the square UIImageViews that they're displayed in. This obviously creates problems with touch detection. Is there a better way for me to implement the tile-engine? Thanks for reading.
Quote this message in a reply
Moderator
Posts: 679
Joined: 2002.11
Post: #2
I've done some pretty fancy iso stuff, but I think the best thing to do for iPhone is to treat each tile as a circle instead of a square, with the circle touching each of the diamond's edges once. That doesn't fit the whole shape perfectly, but I think it will help people not accidentally select the wrong tile.

If you don't do that, you're going to have to figure out triangle collisions.

My web site - Games, music, Python stuff
Quote this message in a reply
Member
Posts: 194
Joined: 2009.02
Post: #3
When using 2/1 diamond shaped tiles, you need to leave the bottom row(or top) of pixels empty- So if your tiles are 64x32 pixels, it would really be 64x31 pixels with one totally transparent row of pixels. This will prevent overlapping. There should be no problem with touch detection as long as you convert the initial bounding collision to a pixel value and check the tile's transparency.
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2009.08
Post: #4
diordna Wrote:I've done some pretty fancy iso stuff, but I think the best thing to do for iPhone is to treat each tile as a circle instead of a square, with the circle touching each of the diamond's edges once. That doesn't fit the whole shape perfectly, but I think it will help people not accidentally select the wrong tile.

If you don't do that, you're going to have to figure out triangle collisions.

Thanks for your reply. If I could clarify, do you mean that when I'm doing the touch detection, I manually edit the points I'm checking to reflect a circle instead of a square? At the moment, I'm doing the touch just by just comparing the view returned by the touch against all my UIImageViews. Thanks again.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  BYOND Isometric DMdude 0 1,993 Dec 29, 2009 10:11 PM
Last Post: DMdude
  OpenGL Isometric Tile Engine Stalin55 17 14,875 Aug 16, 2006 02:29 PM
Last Post: OneSadCookie
  Isometric people skrew 8 5,683 Feb 15, 2006 01:33 AM
Last Post: skrew