isometric tile recognition
isometric tile recognition
isometric tile recognition
isometric tile recognition
isometric tile recognition
isometric tile recognition isometric tile recognition isometric tile recognition isometric tile recognition isometric tile recognition isometric tile recognition isometric tile recognition isometric tile recognition
isometric tile recognition isometric tile recognition
isometric tile recognition
Go Back  Xtreme Visual Basic Talk > > > isometric tile recognition


Reply
 
Thread Tools Display Modes
  #1  
Old 12-20-2012, 10:26 AM
SoLDSoMeBeeF's Avatar
SoLDSoMeBeeF SoLDSoMeBeeF is offline
Centurion
 
Join Date: Oct 2002
Location: Manchester UK
Posts: 154
Default isometric tile recognition


Hi,

im attempting to create an isomertic game in vb using the glorious BitBlt. my problem is a math one, i hope you can help.

i have a series or isometric tiles in the game area, the problem is at the moment i wish to be able to identify which tile is being clicked on the bitmap. i am certain that there is a caculation i can do to work this out but im having a total brainfart. please help or point me in the right direction. thanks
__________________
"I don't need intelligent drugs Tom, because I don't know what they are."
-Space Ghost
Reply With Quote
  #2  
Old 12-20-2012, 01:44 PM
Flyguy's Avatar
Flyguyisometric tile recognition Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,164
Default

Maybe this article can be of any help: Point in Polygon
Reply With Quote
  #3  
Old 12-20-2012, 04:15 PM
Rockoon's Avatar
Rockoon Rockoon is offline
Joseph Koss

* Guru *
 
Join Date: Aug 2003
Location: Unfashionable End
Posts: 3,615
Default

I see the situation as three separate transforms.

1) During projection, the map is rotated 45 degrees
2) Then the resulting <x, y> coordinate is scaled by what is normally a factor of <k, 0.5k> where k is the tiles width in pixels (or some multiple of it.)
3) Then the coordinates are shifted to match the users desired viewport into the space defined by (1) and (2)

I think the "problem" of figuring out how to reverse the process arises because in sprite-based isometric rendering, you dont generally explicitly do all those steps!

To be more specific, the typical tile-based isometric renderer doesnt explicitly do rotation (1) and scaling (2) but instead it iterates over the map tiles in a conventional way but simultaneously and systematically also tracks this iteration within the post-rotation and scaled space in a way consistent with having actually done that rotation and scaling (systematically adding or subtracting half of the tile widths and heights to both x's and y's)

So my guess is that the inversion part you are having trouble "figuring out" is the transform that you are doing implicitly rather than explicitly, which is the rotation.
Reply With Quote
  #4  
Old 12-21-2012, 12:50 AM
SoLDSoMeBeeF's Avatar
SoLDSoMeBeeF SoLDSoMeBeeF is offline
Centurion
 
Join Date: Oct 2002
Location: Manchester UK
Posts: 154
Default

FlyGuy - legend.
Just reading through that now. It looks excatly like what i was trying to do (although i was using less useful/accurate terminology lol) Thanks a lot man. I'll tell you how it goes when i get to have some fun with it later.

Rockoon - Yes and no.
That does verbosley and accurately describe one perspective on the problem. I guess i didnt think that deep into it myself.
__________________
"I don't need intelligent drugs Tom, because I don't know what they are."
-Space Ghost
Reply With Quote
  #5  
Old 12-21-2012, 03:39 PM
passel's Avatar
passelisometric tile recognition passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,026
Default

Perhaps this thread may also be useful.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
isometric tile recognition
isometric tile recognition
isometric tile recognition isometric tile recognition
isometric tile recognition
isometric tile recognition
isometric tile recognition isometric tile recognition isometric tile recognition isometric tile recognition isometric tile recognition isometric tile recognition isometric tile recognition
isometric tile recognition
isometric tile recognition
 
isometric tile recognition
isometric tile recognition
 
-->