Isometric tile question
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.
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.
If you don't do that, you're going to have to figure out triangle collisions.
My web site - Games, music, Python stuff
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.
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| BYOND Isometric | DMdude | 0 | 1,805 |
Dec 29, 2009 10:11 PM Last Post: DMdude |
|
| OpenGL Isometric Tile Engine | Stalin55 | 17 | 13,745 |
Aug 16, 2006 02:29 PM Last Post: OneSadCookie |
|
| Isometric people | skrew | 8 | 5,301 |
Feb 15, 2006 01:33 AM Last Post: skrew |
|

