This came up a bit ago on 2D Chat. A simple demo demonstrating how quick and easy it can be to pick tiles from a 2D isometric map.
//Isometric Tile Picking Demo
//by BMacZero (Brian MacIntosh)
sync on : sync rate 60
set image colorkey 133,0,133
//Make sample iso tile image
create bitmap 1,ISOSIZEX,ISOSIZEY
set current bitmap 1
cls rgb(133,0,133)
ink rgb(255,255,255)
line 0,ISOSIZEY/2,ISOSIZEX/2,0
line ISOSIZEX/2,0,ISOSIZEX-1,ISOSIZEY/2
line ISOSIZEX-1,ISOSIZEY/2,ISOSIZEX/2,ISOSIZEY-1
line ISOSIZEX/2,ISOSIZEY-1,0,ISOSIZEY/2
get image 1,0,0,ISOSIZEX-1,ISOSIZEY-1,1
set current bitmap 0
delete bitmap 1
do
cls
//Draw grid
for x = 0 to screen width()/ISOSIZEX
for y = 0 to screen height()/ISOSIZEY
paste image 1,x*ISOSIZEX,y*ISOSIZEY
next y
next x
//Draw function evaluation
text 10, 10, "X: " + str$(GetIsoTileXAt(mousex(), mousey()))
text 10, 30, "Y: " + str$(GetIsoTileYAt(mousex(), mousey()))
sync
loop
//The visual pixel dimensions of one tile on the iso grid
#constant ISOSIZEX 64
#constant ISOSIZEY 32
//These functions return the grid coordinates for the given
//pixel coordinates on the isometric grid specified by
//the above constants
//ASSUMES that grid 0,0 is CENTERED on pixel 0,0
function GetIsoTileXAt(x as float, y as float)
ret = round(y / (1.0*ISOSIZEY) + x / (1.0*ISOSIZEX))
endfunction ret
function GetIsoTileYAt(x as float, y as float)
ret = round(y / (1.0*ISOSIZEY) - x / (1.0*ISOSIZEX))
endfunction ret
//by OBese87
function round(n#)
n = int(n#+n#)-int(n#)
endfunction n
