This is modified OTClient that generates .png images of OTS .otbm map!
Each image show 8x8 tiles, 256x256 px, you can easily use it with Leaflet Maps [like GoogleMaps] to show whole map on www with zoom in/out.
Example image:
I will give full description, when I fix all bugs.
On my PC it generates around 40 images per second on 1 core and up to 200 per second on all cores (4x4.0 GHz). I run 16 threads, so it faster skips empty areas [areas without tiles].
Without SSD disc, it will kill your machine and take around 3213 days to generate RL map images, so don't even try
Short instruction:
1. Compile, copy Tibia.spr, Tibia.dat, items.otb, map.otbm, run client.
2. Type command:
It will freez client for a while and then show message like:
3. Type command:
version for one core generation [no problem with client crashes]:
4. DONE!
Your map images will appear in C:\USERS\YOUR_USER_NAME\otclient\map\
USERS - your Windows language 'users' (like 'Uzytkownicy' in polish windows 7)
YOUR_USER_NAME - your Windows login
Full instruction how to use you can find there:
https://github.com/gesior/otclient/blob/master/README.md
Source code:
https://github.com/gesior/otclient
All changes required (only 17!):
https://github.com/gesior/otclient/commit/6eee8b9673205312cf1b21332067037e7ba81010
Most of logic is in LUA (thread management):
https://github.com/gesior/otclient/blob/master/otclientrc.lua
------------------------------------------------------------
I also got code for Leaflet map [PHP generators]:
- generate zoom levels images (zoom in/out that save a lot of transfer)
- show lower floors when you are on floor over ground (lower floors are 'shaded')
- minimize size of images [less then 10GB for 140 MB RL map .otbm]
- JavaScript class that contains functions like: Map.setCenter({x=23323,y=34332,z=6}) [in game position]
- JavaScript class (+LUA for TFS 1.0) to STREAM ALL PLAYERS [animated move, ~2 seconds delay] on Leaflet map - tested with RL map with 900 players online, no lag!
- JavaScript class for stream that let you search for player by name and 'follow' (map moves when player moves in game)
BUT I DON'T HAVE TIME TO DESCRIBE HOW TO CONFIGURE THEM ALL! I WILL TRY NEXT WEEKEND!
Each image show 8x8 tiles, 256x256 px, you can easily use it with Leaflet Maps [like GoogleMaps] to show whole map on www with zoom in/out.
Example image:
I will give full description, when I fix all bugs.
On my PC it generates around 40 images per second on 1 core and up to 200 per second on all cores (4x4.0 GHz). I run 16 threads, so it faster skips empty areas [areas without tiles].
Without SSD disc, it will kill your machine and take around 3213 days to generate RL map images, so don't even try
Short instruction:
1. Compile, copy Tibia.spr, Tibia.dat, items.otb, map.otbm, run client.
2. Type command:
Code:
prepareClient(1076, '/things/1076/items.otb', '/map.otbm')
Positions in this command 'example' are GENERATED FOR YOUR MAP FILE. These are minimum and maximum x, y, z of all tiles. Use it to skip all empty areas (around 95% of RL map!) and save a lot of time.Example generator of whole map: generateMap(25, 45, 0, 555, 699, 15, 4) [last 4 = 4 threads to generate]
3. Type command:
Code:
generateMap(25, 45, 0, 555, 699, 15, 4)
Code:
generateMap(25, 45, 0, 555, 699, 15, 1)
4. DONE!
Your map images will appear in C:\USERS\YOUR_USER_NAME\otclient\map\
USERS - your Windows language 'users' (like 'Uzytkownicy' in polish windows 7)
YOUR_USER_NAME - your Windows login
Full instruction how to use you can find there:
https://github.com/gesior/otclient/blob/master/README.md
Source code:
https://github.com/gesior/otclient
All changes required (only 17!):
https://github.com/gesior/otclient/commit/6eee8b9673205312cf1b21332067037e7ba81010
Most of logic is in LUA (thread management):
https://github.com/gesior/otclient/blob/master/otclientrc.lua
------------------------------------------------------------
I also got code for Leaflet map [PHP generators]:
- generate zoom levels images (zoom in/out that save a lot of transfer)
- show lower floors when you are on floor over ground (lower floors are 'shaded')
- minimize size of images [less then 10GB for 140 MB RL map .otbm]
- JavaScript class that contains functions like: Map.setCenter({x=23323,y=34332,z=6}) [in game position]
- JavaScript class (+LUA for TFS 1.0) to STREAM ALL PLAYERS [animated move, ~2 seconds delay] on Leaflet map - tested with RL map with 900 players online, no lag!
- JavaScript class for stream that let you search for player by name and 'follow' (map moves when player moves in game)
BUT I DON'T HAVE TIME TO DESCRIBE HOW TO CONFIGURE THEM ALL! I WILL TRY NEXT WEEKEND!