OZiRY
ONLiNE
- Joined
- Mar 11, 2010
- Messages
- 281
- Reaction score
- 5
@Gesior.pl
Can you try to explain the leaflet php code again?
Can you try to explain the leaflet php code again?
You can use current Leaflet Map JS version [no flash, HTML4/5 only], but you need to pass positions of stairs/ladders/teleport to javascript. Do you want to write all these positions to text file by yourself? I don't think so.what OTC has anything to do about it? i was talking about website.
Also to use Javascripts it means website must be build with flash?
Leaflet is JS and there is no PHP code. I can't explain it more. There are many examples and answers for 'all' questions on stackoverflow.@Gesior.pl
Can you try to explain the leaflet php code again?
I wouldn't mind xD got like ~30 maxDo you want to write all these positions to text file by yourself? I don't think so
A:@Gesior.pl
Can you try to explain the leaflet php code again?
Leaflet is JS and there is no PHP code. I can't explain it more. There are many examples and answers for 'all' questions on stackoverflow.
1 color per 1 tile? You mean minimap? I wrote OTClient & PHP minimap generator.I really didn't read everything on this thread, from what I did read you basically created a program that generates images from otbm's.
There is an easier way to store this data & render it as needed, what you could do is generate a pixel map
Using a Pixel map you could take an entire map 2000 x 2000 and store it in less then a 500kb per level * 16 levels, map = 8 megs...
Not bad eh?
Since there are 16,777,216 color combinations 256 ^ 3 (not including the alpha channel) one could assign each tile in the tibia.spr file to a color code.
I doubt the tibia spr contains more 50k tiles, even if it does, there are still 16,727,216 colors left.
Once that is all taken care of you can choose a portion of the image to render whether it is 2 x 2 or 100 x 100 because the color codes act as pointers to the tiles
You could store the whole map in 1 file.. I read somewhere TIFF format supports layers.
This is not just a concept. I actually have a bare bones prototype written up, if your interested in seeing it as its not written for this framework pm me.
Although I wrote it for a different framework its core language is lua.
Tibia.spr does not contains tiles. It contains ITEMS, on each tile [map.otbm] can be few items and you need Tibia.dat file to compose them into 1 tile image.I doubt the tibia spr contains more 50k tiles, even if it does, there are still 16,727,216 colors left.
We mean that Leaflet Map reduce number of images on screen with zoom levels generated by my program.I can zoom in and out if I want, after all I am the one who wrote the program
It's an incomplete application atm but it has potentialWe mean that Leaflet Map reduce number of images on screen with zoom levels generated by my program.
If you zoom out your map on screen will be 500.000 tiles [each 32x32 pixels] - it will kill your CPU/GPU.
@Codex NG
How will it generate tiles with many items on it (floor+wall+black board on it)? Ignore .dat file? What will it generate?
Your screenshot looks like map editor that generate 'ground' items only (so its kind of minimap, except that it's unreadable when you zoom out)..
Ye. You don't have to draw 500.000, but you need to calculate 'color' of pixel made of pixels from X to Y, so your CPU still got to loop over 500.000 tiles.It's an incomplete application atm but it has potential
This is something I wrote last year, I haven't worked on it since, I just wanted to show you that it is possible to reference the x,y of a tile as a pixel in an image.
There are ways loading the map without loading all the tiles when you zoom out.
Check out this site it explains a bit about pixels per inch (ppi)
http://www.photokaboom.com/photogra...ch_resolution_print_size_viewing_distance.htm
That is what I do with OTClient. Generate map cut to tiles 8x8 SQM.Cant he just generate the map this way, and then cut it Into tiles to get the same result? If its even possible to get all the items on the floor sprites?
7. Run: 5compressor.php
if(!isset($_REQUEST['s']) || !isset($_REQUEST['e']) || $_REQUEST['e'] < $_REQUEST['s'])
{
die('Wrong config');
}
You must open this page with parameters:This didn't work for me, it just returned "Wrong config"
Code:if(!isset($_REQUEST['s']) || !isset($_REQUEST['e']) || $_REQUEST['e'] < $_REQUEST['s']) { die('Wrong config'); }
xxx.php?s=0&e=3
xxx.php?s=0&e=5
xxx.php?s=6&e=9
xxx.php?s=10&e=11
xxx.php?s=12&e=12
Include monster images? All monsters? For RL map it would be around 50.000 monsters. Do you want to show spawn on map with exactly position (paste image of monster to image on map) or let players search spawns on site - they type 'demon' and see list of all demons spawns [like 'google map search' with 'points' that appear on map when you search some kind of shop]? Then they can click on list and it will zoom place with monster.Can I somehow include monster images (from spawns) and maybe even NPCs to show my players? And where can I read more on how I can work with OTClient?
Thank you for this great thing you made