Posts: 38
Threads: 9
Joined: Jul 2011
(This post was last modified: 21.08.2011, 01:57 by sinner.)
21.08.2011, 01:56
INFO: This scripts generates a PHP GD minimap, the right image from map screen ingame, it has the diplomacy too.
DEMO:
INSTALLATION:
- Go to htdocs, and paste map.php from the archive.
- 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}">
- Delete content from htdocs/templates_c/
- Enjoy the game !
DOWNLOAD: SPEEDYSHARE.COM
Cheers, sinner.
Posts: 2'315
Threads: 32
Joined: Jan 2010
Reputation:
51
Very good!
i dont test it, but this must work
a map with diplomacy is very wanted here.
You get an positive rating
Wenn ich helfen konnte, dann bewertet mich bitte. -->Bewertung
Posts: 38
Threads: 9
Joined: Jul 2011
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.
Posts: 1'611
Threads: 14
Joined: Feb 2011
Reputation:
52
(This post was last modified: 21.08.2011, 13:31 by ON21.)
21.08.2011, 07:00
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
Schildkröte: "nichts ist langsamer als ich!"
Schnecke: "ich bin ganz sicher langsamer!"
Und dann kam der Internet Explorer...
Posts: 2'315
Threads: 32
Joined: Jan 2010
Reputation:
51
(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
Wenn ich helfen konnte, dann bewertet mich bitte. -->Bewertung
Posts: 1'036
Threads: 13
Joined: Nov 2009
Reputation:
39
@ON21 it is no class!
LG
steffen
Posts: 38
Threads: 9
Joined: Jul 2011
@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
Posts: 2'315
Threads: 32
Joined: Jan 2010
Reputation:
51
thank you very much
Wenn ich helfen konnte, dann bewertet mich bitte. -->Bewertung
Posts: 2'315
Threads: 32
Joined: Jan 2010
Reputation:
51
thank you very much
Wenn ich helfen konnte, dann bewertet mich bitte. -->Bewertung
Posts: 1'611
Threads: 14
Joined: Feb 2011
Reputation:
52
@Streffen, google übersetzer. Es sollte gute und Saubere Arbeit heißen!
Schildkröte: "nichts ist langsamer als ich!"
Schnecke: "ich bin ganz sicher langsamer!"
Und dann kam der Internet Explorer...
Posts: 1'036
Threads: 13
Joined: Nov 2009
Reputation:
39
@ON21: That would be: good and neat job/work
LG
steffen
Posts: 1'611
Threads: 14
Joined: Feb 2011
Reputation:
52
@Steffen, ist geändert.
b2t
Schildkröte: "nichts ist langsamer als ich!"
Schnecke: "ich bin ganz sicher langsamer!"
Und dann kam der Internet Explorer...
Posts: 2'315
Threads: 32
Joined: Jan 2010
Reputation:
51
(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 i will test it then this evening
Wenn ich helfen konnte, dann bewertet mich bitte. -->Bewertung
Posts: 3'164
Threads: 47
Joined: Dec 2008
Reputation:
205
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
MfG Manuel
Posts: 269
Threads: 11
Joined: Jun 2009
Reputation:
4
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...
Posts: 38
Threads: 9
Joined: Jul 2011
(This post was last modified: 21.08.2011, 14:49 by sinner.)
21.08.2011, 14:47
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.
Posts: 3'164
Threads: 47
Joined: Dec 2008
Reputation:
205
(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 Nice work!
MfG Manuel
Posts: 38
Threads: 9
Joined: Jul 2011
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.
Posts: 2'492
Threads: 43
Joined: Mar 2010
Reputation:
87
(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!
Posts: 255
Threads: 58
Joined: May 2008
Reputation:
13
(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.
|