Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [map][ajax] MMORPG, Dynamiczna mapa
Wredny
post
Post #1





Grupa: Zarejestrowani
Postów: 36
Pomógł: 0
Dołączył: 24.08.2007
Skąd: Białystok

Ostrzeżenie: (0%)
-----


Witam napisałem skrypt gry.... z mapą .... w html/php .
mape tworzy sie w edytorze na stronie ( panel admina )...
zapisuje sie ją do plliku txt np 1html.txt i to jest mapa nr1
o zawartości :
  1. <div style="LEFT: 165px; VISIBILITY: visible; POSITION: absolute; TOP: 429px; Z-index: 2;"><img src=images/obj/bush.gif alt="Bush"></div>
  2. <div style="LEFT: 165px; VISIBILITY: visible; POSITION: absolute; TOP: 129px; Z-index: 2;"><img src=images/obj/cliff_face02.png alt="cliff"></div>
  3. <div style="LEFT: 165px; VISIBILITY: visible; POSITION: absolute; TOP: 279px; Z-index: 2;"><img src=images/obj/bush.gif alt="Bush"></div>
  4. <div style="LEFT: 465px; VISIBILITY: visible; POSITION: absolute; TOP: 179px; Z-index: 2;"><img src=images/obj/weed.gif alt="hemp"></div>
  5. <div style="LEFT: 365px; VISIBILITY: visible; POSITION: absolute; TOP: 279px; Z-index: 101;"><img src=images/obj/tree02.gif alt="Tree"></div>
  6. <div style="LEFT: 515px; VISIBILITY: visible; POSITION: absolute; TOP: 229px; Z-index: 2;"><img src=images/obj/weed.gif alt="reefer"></div>
  7. <div style="LEFT: 415px; VISIBILITY: visible; POSITION: absolute; TOP: 179px; Z-index: 2;"><img src=images/obj/weed.gif alt="j"></div>
  8. <div style="LEFT: 515px; VISIBILITY: visible; POSITION: absolute; TOP: 179px; Z-index: 2;"><img src=images/obj/weed.gif alt="bud"></div>
  9. <div style="LEFT: 515px; VISIBILITY: visible; POSITION: absolute; TOP: 279px; Z-index: 2;"><img src=images/obj/weed.gif alt="420"></div>
  10. <div style="LEFT: 415px; VISIBILITY: visible; POSITION: absolute; TOP: 229px; Z-index: 2;"><img src=images/buildings/npc_house01.gif alt="Ilithor's Waystation"></div>
  11. <div style="LEFT: 365px; VISIBILITY: visible; POSITION: absolute; TOP: 129px; Z-index: 2;"><img src=images/buildings/cave01.gif alt="Cave"></div>


po mapie chodzi czlowiek .. za pomocą guzików ....
  1. <map name="1">
  2. <area href="{move_up}" shape="rect" coords="31, 1, 124, 36">
  3. <area href="{move_down}" shape="rect" coords="35, 71, 115, 108">
  4. <area href="{move_right}" shape="rect" coords="93, 36, 145, 71">
  5. <area href="{move_left}" shape="rect" coords="13, 37, 61, 71">
  6. <area href="{move_refresh}" shape="circle" coords="77, 53, 19">
  7. <area shape="default" nohref>
  8. </map>



ale co nową mape wszystko od nową sie ładuje .... obrazki... drzewa.... i to zle wygloda mozna to w ajax albo( w coś innego ) przeerobić??
nie znam sie na ajaxie.....

ps. myslałem zeby to zrobić wszystko w 1 obrazku te drzewa , budynki ale wtedy postać wbiega na drzewo itd....

nie prosze o gotowy skrypt tylko o rade moze drobny skrypt = "wskazówke"


---------------
edit.
nikt nie wie jak zrobić dynamiczną mape ? np w pliku .map?

Ten post edytował Wredny 28.09.2007, 16:22:59


--------------------
eeeeee....
Go to the top of the page
+Quote Post
Inzabi
post
Post #2





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 2.10.2007
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


Ustawiasz obrazki bezpośrednio w HTML, to najwolniejsza metoda. Załaduj wszystkie obrazki do tablicy JavaScript,
albo po prostu zdefiniuj je w CSS, który wczytywany jest tylko raz na starcie i trzymany w cache, powinno to troche przyspieszyć.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 07:46