It seems that the 0,0 tile is the one where your character started the session.
Not so random so.
The client could send this tile to a map server which would compare it to the global map.
If it matches a tile, then the server would be able to calculate the client "absolute" coordinates.
Relative and absolute coordinates
Moderator: Phades
-
Nummy
- Posts: 489
- Joined: Sat Mar 19, 2011 10:01 am
Re: Relative and absolute coordinates
I have already solved this about coordinates.BruThoL wrote:It seems that the 0,0 tile is the one where your character started the session.
Not so random so.
The client could send this tile to a map server which would compare it to the global map.
If it matches a tile, then the server would be able to calculate the client "absolute" coordinates.
Now I need to get a code where detection of mouseOver "sprite"/object is done. still searching...
-
Nummy
- Posts: 489
- Joined: Sat Mar 19, 2011 10:01 am
Re: Relative and absolute coordinates
Ok found out where overlay is drawn and how, now only what I miss is where is checked if mouse cursor is over object... hmmm
Ah never mind, find it
Damn it was hidden pretty good.
Ah never mind, find it
-
konrad
- Posts: 23
- Joined: Sun Aug 21, 2011 7:58 pm
Re: Relative and absolute coordinates
Good for you, but if you solved it you could share idea with others?:)I have already solved this about coordinates.![]()
-
Nummy
- Posts: 489
- Joined: Sat Mar 19, 2011 10:01 am
Re: Relative and absolute coordinates
I use my HF or HF of my alt as starting point 0,0 and then I recalculate all coordinates in relation to it.konrad wrote:Good for you, but if you solved it you could share idea with others?:)I have already solved this about coordinates.![]()
Only problem: don't move HF
-
konrad
- Posts: 23
- Joined: Sun Aug 21, 2011 7:58 pm
Re: Relative and absolute coordinates
Thank you for sharing:)
-
Nummy
- Posts: 489
- Joined: Sat Mar 19, 2011 10:01 am
Re: Relative and absolute coordinates
Not a problem and also you can remember object at some location as "gob" variable if I'm no mistaken. Every object that is drawable has it's own unique number by which is probably referenced in data files or database on server side. With that number you can "remember" which object is on your 0,0 location so you can probably replace HF with something else.konrad wrote:Thank you for sharing:)
For more info ask in thread for layer utility, guy there know this stuff about variables in resources to depths.
-
mekoon
- Posts: 2
- Joined: Mon Jul 25, 2011 5:59 pm
Re: Relative and absolute coordinates
After restart all gobID change. So im long time think about some euristic algorithm that can "guess" about place by compare different gobs in radius and relative position of them.Nummy wrote:Not a problem and also you can remember object at some location as "gob" variable if I'm no mistaken. Every object that is drawable has it's own unique number by which is probably referenced in data files or database on server side. With that number you can "remember" which object is on your 0,0 location so you can probably replace HF with something else.
For more info ask in thread for layer utility, guy there know this stuff about variables in resources to depths.