isometrix, screen cursor
I''ve tried for a day or two to make the cursor overlay a map tile, by finding my mouse''s x,y the map offset, and my tile width height.. i''m about to throw my computer out the window. before i do that, could sombody help me out, and send me the math equation that calculates this? me and my computer would both greatly appreciate any help. I''m useing a 64x32 tile.
thanks in advance guys.
Even a broken clock is right twice a day.
Grey
Hi,
Not sure what you are trying to accomplish - or in what programming language for that matter ...
If your problem can be described as "on what tile did I click ?" than you can find a fast mathematical solution and demo program at http://eddysterckx.virtualave.net/progs.html
It''s in Delphi/pascal - but should be easy to convert.
Greetz,
Eddy Sterckx
Not sure what you are trying to accomplish - or in what programming language for that matter ...
If your problem can be described as "on what tile did I click ?" than you can find a fast mathematical solution and demo program at http://eddysterckx.virtualave.net/progs.html
It''s in Delphi/pascal - but should be easy to convert.
Greetz,
Eddy Sterckx
Yes, what i am looking for is did user click on a tile. i''ve got somewhat of a formula :
int sub = LY/32;
long blitX = LX/64*64+LY/16*32 - (sub*64);
long blitY = LY/16*16;
Where LX,LY are my loword, and highword on the mouse, and blitX, and blitY are my top-left coords for blitting. I looked over your pascal code.. unfortunately, i can''t read pascal. so it was greek to me.. either that or while i pulled out my hair, i pulled out brains too.. anyways i''ve been trying to do this on my own.. no books or anything.. and i''ve found out iso will kick your bootylicious seat if you''re not a math genious.. So thanks for the reply.. look forward to another..
-grey
Even a broken clock is right twice a day.
Grey
int sub = LY/32;
long blitX = LX/64*64+LY/16*32 - (sub*64);
long blitY = LY/16*16;
Where LX,LY are my loword, and highword on the mouse, and blitX, and blitY are my top-left coords for blitting. I looked over your pascal code.. unfortunately, i can''t read pascal. so it was greek to me.. either that or while i pulled out my hair, i pulled out brains too.. anyways i''ve been trying to do this on my own.. no books or anything.. and i''ve found out iso will kick your bootylicious seat if you''re not a math genious.. So thanks for the reply.. look forward to another..
-grey
Even a broken clock is right twice a day.
Grey
For a different approach (IMHO simpler...), try these two articles
http://www.gamedev.net/reference/articles/article747.asp, section "Mouse Matters"
http://www.gamedev.net/reference/articles/article742.asp, section "The Old Method"
//Ksero
http://www.gamedev.net/reference/articles/article747.asp, section "Mouse Matters"
http://www.gamedev.net/reference/articles/article742.asp, section "The Old Method"
//Ksero
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement