lucasmonstrox / tibiapi

ℹ️ Tibia Client API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] - [RADAR]

Kirattus opened this issue · comments

Hi!
In feature there is something to be done about the location of the map.
Any chance of releasing this feature before the others?

Finished today #10 to get floor level. I will implement tomorrow strategies to get full coordinate.

@Kirattus added way to get coordinate here in PR #11

The order of algorithms to get coordinate is:

  1. comparing current radar image hash from previous one, it means, hashes are the same. It will avoid computation when character is stopped. It will respond in 7 microseconds.
  2. hashing radar image and getting it from a Dict with key/pairs of all hash:coordinate. It will respond in 10 microseconds.
  3. locating from small area based on previous coordinate if it is present. I can improve it in near future, reducing the size of small area. But I need to make some tests because I'm not sure if is 100% safe. Also, I can try with hash displacement for each direction after character move. Currently respond in 300 milliseconds, but after improvements, I think the response time will be close to 15~20 microseconds.
  4. locating in the whole floor level image in first locating or before teleport. It will respond in 300 milliseconds.

@Kirattus already done!