TWLan Forum

Full Version: Minimap script giveaway
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
INFO: This scripts generates a PHP GD minimap, the right image from map screen ingame, it has the diplomacy too.

DEMO:
[Image: captureab.png]

INSTALLATION:
  1. Go to htdocs, and paste map.php from the archive.
  2. Go to game_map.tpl in htdocs/templates and replace
    PHP Code:
    <img src="graphic/continent/{$user.id}-{$conmap}-{$contime}.png"
    with
    PHP Code:
    <img src="map.php?id={$village.id}&x={$map.x}&y={$map.y}"
  3. Delete content from htdocs/templates_c/
  4. Enjoy the game !
DOWNLOAD: SPEEDYSHARE.COM

Cheers, sinner.
Very good!
i dont test it, but this must work Wink
a map with diplomacy is very wanted here.

You get an positive rating Smile
Thanks, Dsaddicted, my next goal is to remake the whole game_map.tpl , because it's loading quite slow when you have lots of villages.
P.S. - I remade it already, but didn't test it for v1.4, i`ll test it as soons as possible.
Hello Thanks for the tool to something I've been waiting even longer. That would be: good and neat job/work!



And excuse for my horrible English


best wishes,
Nils
(21.08.2011, 04:30)sinner Wrote: [ -> ]Thanks, Dsaddicted, my next goal is to remake the whole game_map.tpl , because it's loading quite slow when you have lots of villages.
P.S. - I remade it already, but didn't test it for v1.4, i`ll test it as soons as possible.

oh this would be fantastic. i always get annoyed by the slow loading map Wink
@ON21 it is no class!
@Dsaddicted, i'll test it today, at the time that i made this v1.4 wasn't released, so I used v1.3 to develop it. In few hours I will post the patch for the map lag for v1.4
thank you very much Wink
thank you very much Wink
@Streffen, google übersetzer. Es sollte gute und Saubere Arbeit heißen!
@ON21: That would be: good and neat job/work
@Steffen, ist geändert.

b2t
(21.08.2011, 13:19)sinner Wrote: [ -> ]@Dsaddicted, i'll test it today, at the time that i made this v1.4 wasn't released, so I used v1.3 to develop it. In few hours I will post the patch for the map lag for v1.4

thank you very much Wink i will test it then this evening
Nice script, dude. Are there barbarian villages too, or not? (Didn´t test it yet)
If not, it would be very nice from you, to implement them Smile

MfG Manuel
first of all nice script... but wondering how it impacts the performance to use new generated minimap images on each page reload instead of cached ones...
blner, what chached images, there are no cached images even in v1.4, because everytime you have a different {$contime} so there are no cached images. Even though, it's ridiculous to have cached images, you will see an map like 2 weeks old when there are no barbarian villages beside you on the map.
So no, there are no cached images in the v1.3 / v1.4 neither.

Emanuel, yes, there are barbarian villages, you have like three barbarian villages in the demo too.

The v2 of the map will be html one, one big array select for the minimap, then chunk a separate array to show the big map, both html, no GD included, no load, no lag.
(21.08.2011, 14:47)sinner Wrote: [ -> ]Manuel, yes, there are barbarian villages, you have like three barbarian villages in the demo too.

Yeah I wasn´t sure if they are barbarian villages. So thanks for this script Smile Nice work!

MfG Manuel
The main problem is, that, still the lag is not solved, because the image still generates in graphic/continent/ i'll get this problem solved tonight.
(21.08.2011, 14:47)sinner Wrote: [ -> ]blner, what chached images, there are no cached images even in v1.4, because everytime you have a different {$contime} so there are no cached images. Even though, it's ridiculous to have cached images, you will see an map like 2 weeks old when there are no barbarian villages beside you on the map.
So no, there are no cached images in the v1.3 / v1.4 neither.

Don't talk about things you don't understand or know well enough.
The conmap is cached, you can test it: reload the map 60 times, there will no new conmap-image be generated.
There's this comment line:
PHP Code:
// Karte neu laden, wenn sie älter als 5 minuten ist 
So the conmap won't be reloaded if is has been reloaded in the last 5 minutes.
You can also test it like this:
Load the map, then remove all the contents from htdocs/graphic/continent and then reload the map and baam, there's no conmap!
(21.08.2011, 16:48)Molt Wrote: [ -> ]Load the map, then remove all the contents from htdocs/graphic/continent and then reload the map and baam, there's no conmap!

That supposedly shouldn't happen. The conmap-code actually tests whether the file exists, and if not, it'll regenerate a continental map.

But, Molt and blner are right anyway: The continental map is indeed cached in htdocs/graphic/continent.

Pages: 1 2 3