1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. To chat with the GameOgre community, you need to have at least 15 posts. Once you have the 15 posts, post at Become A New Ogre
    Dismiss Notice

ineed map code for my game

Discussion in 'Online Game Development' started by rtkwar, Mar 28, 2011.

Thread Status:
Not open for further replies.
  1. rtkwar

    rtkwar Member

    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Credit:
    - 54.14
    ifinish from my first game about world war2 but ineed add map in my game
    players can watch other cities on map and when some one send army players can see army icon on map

    second:in some times iwatch this message (Too many connection)
    any one can help me?
     
  2. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
  3. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    example

    OK I'm going to show an example of a php file of my old game:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
    <HEAD>
    <TITLE>shugo map</TITLE>
    <META NAME="keywords" CONTENT="Japan map">
    <link rel="stylesheet" type="text/css" href="styles/mapstyle.css"/>
    </HEAD>
    <BODY>
    <IMG SRC="pictures/japmap.gif" class="pos_abs" BORDER=0 WIDTH=750 HEIGHT=1000 USEMAP="#nippon">
    <MAP NAME="nippon">
    <AREA SHAPE="circle" HREF="province.php?province=2" COORDS="620,217,6" ALT="Dewa" TITLE="Dewa">
    <AREA SHAPE="circle" HREF="province.php?province=1" COORDS="528,326,6" ALT="Sado" TITLE="Sado">
    <AREA SHAPE="circle" HREF="province.php?province=3" COORDS="571,380,6" ALT="Echigo" TITLE="Echigo">
    <AREA SHAPE="circle" HREF="province.php?province=5" COORDS="679,329,6" ALT="Mutsu" TITLE="Mutsu">
    <AREA SHAPE="circle" HREF="province.php?province=4" COORDS="694,424,6" ALT="Hitachi" TITLE="Hitachi">
    <AREA SHAPE="circle" HREF="province.php?province=6" COORDS="647,411,6" ALT="Shimotsuke" TITLE="Shimotsuke">
    <AREA SHAPE="circle" HREF="province.php?province=7" COORDS="691,538,6" ALT="Awa" TITLE="Awa">
    <AREA SHAPE="circle" HREF="province.php?province=8" COORDS="631,564,6" ALT="Izu" TITLE="Izu">
    <AREA SHAPE="circle" HREF="province.php?province=9" COORDS="587,510,6" ALT="Kai" TITLE="Kai">
    <AREA SHAPE="circle" HREF="province.php?province=10" COORDS="696,505,6" ALT="Kazusa" TITLE="kazusa">
    <AREA SHAPE="circle" HREF="province.php?province=11" COORDS="597,439,6" ALT="Kozuke" TITLE="Kozuke">
    <AREA SHAPE="circle" HREF="province.php?province=12" COORDS="637,483,6" ALT="Musashi" TITLE="Musashi">
    <AREA SHAPE="circle" HREF="province.php?province=13" COORDS="635,520,6" ALT="Sagami" TITLE="Sagami">
    <AREA SHAPE="circle" HREF="province.php?province=14" COORDS="686,480,6" ALT="Shimousa" TITLE="Shimousa">
    <AREA SHAPE="circle" HREF="province.php?province=15" COORDS="535,501,6" ALT="Shinano" TITLE="Shinano">
    <AREA SHAPE="circle" HREF="province.php?province=16" COORDS="610,541,6" ALT="Suruga" TITLE="Suruga">
    <AREA SHAPE="circle" HREF="province.php?province=17" COORDS="556,582,6" ALT="Totomi" TITLE="Totomi">
    <AREA SHAPE="circle" HREF="province.php?province=18" COORDS="433,523,6" ALT="Echizen" TITLE="Echizen">
    <AREA SHAPE="circle" HREF="province.php?province=19" COORDS="477,459,6" ALT="Etchu" TITLE="Etchu">
    <AREA SHAPE="circle" HREF="province.php?province=20" COORDS="490,495,6" ALT="Hida" TITLE="Hida">
    <AREA SHAPE="circle" HREF="province.php?province=21" COORDS="445,489,6" ALT="Kaga" TITLE="Kaga">
    <AREA SHAPE="circle" HREF="province.php?province=22" COORDS="451,431,6" ALT="Noto" TITLE="Noto">
    <AREA SHAPE="circle" HREF="province.php?province=23" COORDS="447,627,6" ALT="Iga" TITLE="Iga">
    <AREA SHAPE="circle" HREF="province.php?province=24" COORDS="468,642,6" ALT="Ise" TITLE="Ise">
    <AREA SHAPE="circle" HREF="province.php?province=25" COORDS="516,588,6" ALT="Mikawa" TITLE="Mikawa">
    <AREA SHAPE="circle" HREF="province.php?province=26" COORDS="479,549,6" ALT="Mino" TITLE="Mino">
    <AREA SHAPE="circle" HREF="province.php?province=27" COORDS="442,598,6" ALT="Omi" TITLE="Omi">
    <AREA SHAPE="circle" HREF="province.php?province=28" COORDS="485,577,6" ALT="Owari" TITLE="Owari">
    <AREA SHAPE="circle" HREF="province.php?province=29" COORDS="496,643,6" ALT="Shima" TITLE="Shima">
    <AREA SHAPE="circle" HREF="province.php?province=30" COORDS="402,656,6" ALT="Izumi" TITLE="Izumi">
    <AREA SHAPE="circle" HREF="province.php?province=31" COORDS="412,643,6" ALT="Kawachi" TITLE="Kawachi">
    <AREA SHAPE="circle" HREF="province.php?province=32" COORDS="402,684,6" ALT="Kii" TITLE="Kii">
    <AREA SHAPE="circle" HREF="province.php?province=33" COORDS="393,623,6" ALT="Settsu" TITLE="Settsu">
    <AREA SHAPE="circle" HREF="province.php?province=34" COORDS="414,609,5" ALT="Yamashiro" TITLE="Yamashiro">
    <AREA SHAPE="circle" HREF="province.php?province=35" COORDS="435,658,6" ALT="Yamato" TITLE="Yamato">
    <AREA SHAPE="circle" HREF="province.php?province=36" COORDS="207,693,6" ALT="Aki" TITLE="Aki">
    <AREA SHAPE="circle" HREF="province.php?province=37" COORDS="242,675,6" ALT="Bingo" TITLE="Bingo">
    <AREA SHAPE="circle" HREF="province.php?province=38" COORDS="272,663,6" ALT="Bitchu" TITLE="Bitchu">
    <AREA SHAPE="circle" HREF="province.php?province=39" COORDS="305,661,6" ALT="Bizen" TITLE="Bizen">
    <AREA SHAPE="circle" HREF="province.php?province=40" COORDS="343,637,5" ALT="Harima" TITLE="Harima">
    <AREA SHAPE="circle" HREF="province.php?province=41" COORDS="257,610,6" ALT="Hoki" TITLE="Hoki">
    <AREA SHAPE="circle" HREF="province.php?province=42" COORDS="335,584,6" ALT="Inaba" TITLE="Inaba">
    <AREA SHAPE="circle" HREF="province.php?province=43" COORDS="191,654,6" ALT="Iwami" TITLE="Iwami">
    <AREA SHAPE="circle" HREF="province.php?province=44" COORDS="226,618,5" ALT="Izumo" TITLE="Izumo">
    <AREA SHAPE="circle" HREF="province.php?province=45" COORDS="292,627,6" ALT="Mimasaka" TITLE="Mimasaka">
    <AREA SHAPE="circle" HREF="province.php?province=46" COORDS="128,726,7" ALT="Nagato" TITLE="Nagato">
    <AREA SHAPE="circle" HREF="province.php?province=47" COORDS="169,727,6" ALT="Suwa" TITLE="Suwa">
    <AREA SHAPE="circle" HREF="province.php?province=48" COORDS="304,600,5" ALT="Tajima" TITLE="Tajima">
    <AREA SHAPE="circle" HREF="province.php?province=49" COORDS="377,596,5" ALT="Tamba" TITLE="Tamba">
    <AREA SHAPE="circle" HREF="province.php?province=50" COORDS="361,570,6" ALT="Tango" TITLE="Tango">
    <AREA SHAPE="circle" HREF="province.php?province=51" COORDS="404,572,6" ALT="Wakasa" TITLE="Wakasa">
    <AREA SHAPE="circle" HREF="province.php?province=52" COORDS="366,671,7" ALT="Awaji" TITLE="Awaji">
    <AREA SHAPE="circle" HREF="province.php?province=53" COORDS="339,714,6" ALT="Awa" TITLE="Awa">
    <AREA SHAPE="circle" HREF="province.php?province=54" COORDS="245,741,6" ALT="Iyo" TITLE="Iyo">
    <AREA SHAPE="circle" HREF="province.php?province=55" COORDS="312,693,7" ALT="Sanuki" TITLE="Sanuki">
    <AREA SHAPE="circle" HREF="province.php?province=56" COORDS="281,754,7" ALT="Tosa" TITLE="Tosa">
    <AREA SHAPE="circle" HREF="province.php?province=57" COORDS="152,812,7" ALT="Bungo" TITLE="Bungo">
    <AREA SHAPE="circle" HREF="province.php?province=58" COORDS="124,787,6" ALT="Buzen" TITLE="Buzen">
    <AREA SHAPE="circle" HREF="province.php?province=59" COORDS="95,814,6" ALT="Chikugo" TITLE="Chikugo">
    <AREA SHAPE="circle" HREF="province.php?province=60" COORDS="91,786,6" ALT="Chikuzen" TITLE="Chikuzen">
    <AREA SHAPE="circle" HREF="province.php?province=61" COORDS="115,851,6" ALT="Higo" TITLE="Higo">
    <AREA SHAPE="circle" HREF="province.php?province=62" COORDS="59,817,7" ALT="Hizen" TITLE="Hizen">
    <AREA SHAPE="circle" HREF="province.php?province=63" COORDS="162,888,7" ALT="Hyuga" TITLE="Hyuga">
    <AREA SHAPE="circle" HREF="province.php?province=64" COORDS="143,950,6" ALT="Osumi" TITLE="Osumi">
    <AREA SHAPE="circle" HREF="province.php?province=65" COORDS="108,937,5" ALT="Satsuma" TITLE="Satsuma">
    </MAP>
    <!--copyright 2008-2009 Wiebe de Boer-->
    <?php
    
    if (isset($_COOKIE["person"])){
    $player = $_COOKIE["person"];
    
    //CONNECTOR
    $con = mysql_connect("localhost","username","password");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    //GAME DATABASE
    mysql_select_db("shugonl", $con);
    
    /*DATA COLLECTION*/
    
    //DISPLAY OWN PROVINCES
    $tenresult = mysql_query ("SELECT DISTINCT(ProvinceID) AS presence FROM Castles WHERE Owner ='$player'");
    while($tenrow = mysql_fetch_array($tenresult))
    {
    echo "<IMG src='pictures/red.gif' width='9' height='9' border='0' class='x".$tenrow[presence]."'>";
    }
    
    //FETCH LIEGE
    $vassalresult = mysql_query ("SELECT * FROM Players WHERE Clan ='$player'");
    $vassalrow = mysql_fetch_assoc($vassalresult);
    $vassalcheck = $vassalrow['Liege'];
    
    if ($vassalcheck =="none"){
    //DISPLAY LIEGE AND VASSAL PROVINCES
    $friresult = mysql_query ("SELECT DISTINCT(A1.ProvinceID) AS friendly
    FROM Castles A1, Players A2
    WHERE A2.Liege ='$player' AND A2.Liege = A1.Owner AND A1.Owner <>'$player'");
    while($frirow = mysql_fetch_array($friresult))
      {
    echo "<IMG src='pictures/purple.gif' width='9' height='9' border='0' class='x".$tenrow[friendly]."'>";
      }
    }
    else {
    //DISPLAY LIEGE AND VASSAL PROVINCES
    $friresult = mysql_query ("SELECT DISTINCT(A1.ProvinceID) AS friendly
    FROM Castles A1, Players A2
    WHERE (A2.Liege ='$player' OR A2.Liege ='$vassalcheck') AND A2.Liege = A1.Owner AND A1.Owner <>'$player'");
    while($frirow = mysql_fetch_array($friresult))
      {
    echo "<IMG src='pictures/purple.gif' width='9' height='9' border='0' class='x".$tenrow[friendly]."'>";
      }
    }
    
    
    }
    ?>
    </BODY>
    </HTML>
    
    
    
    
     
  4. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    css example

    Now for the example of the css file that comes with it:

    Code:
    body {background-color: #000000;}
    IMG.pos_abs {position:absolute; left: 0px; top: 0px; z-index: 3;}
    IMG.x1 {position: absolute; left: 524px; top: 322px; z-index: 1;}
    IMG.x2 {position: absolute; left: 617px; top: 214px; z-index: 1;}
    IMG.x3 {position: absolute; left: 567px; top: 376px; z-index: 1;}
    IMG.x4 {position: absolute; left: 690px; top: 421px; z-index: 1;}
    IMG.x5 {position: absolute; left: 674px; top: 325px; z-index: 1;}
    IMG.x6 {position: absolute; left: 643px; top: 407px; z-index: 1;}
    IMG.x7 {position: absolute; left: 687px; top: 534px; z-index: 1;}
    IMG.x8 {position: absolute; left: 627px; top: 560px; z-index: 1;}
    IMG.x9 {position: absolute; left: 583px; top: 506px; z-index: 1;}
    IMG.x10 {position: absolute; left: 692px; top: 502px; z-index: 1;}
    IMG.x11 {position: absolute; left: 593px; top: 435px; z-index: 1;}
    IMG.x12 {position: absolute; left: 633px; top: 480px; z-index: 1;}
    IMG.x13 {position: absolute; left: 631px; top: 516px; z-index: 1;}
    IMG.x14 {position: absolute; left: 682px; top: 476px; z-index: 1;}
    IMG.x15 {position: absolute; left: 532px; top: 497px; z-index: 1;}
    IMG.x16 {position: absolute; left: 606px; top: 538px; z-index: 1;}
    IMG.x17 {position: absolute; left: 552px; top: 578px; z-index: 1;}
    IMG.x18 {position: absolute; left: 429px; top: 520px; z-index: 1;}
    IMG.x19 {position: absolute; left: 473px; top: 456px; z-index: 1;}
    IMG.x20 {position: absolute; left: 486px; top: 491px; z-index: 1;}
    IMG.x21 {position: absolute; left: 441px; top: 485px; z-index: 1;}
    IMG.x22 {position: absolute; left: 447px; top: 428px; z-index: 1;}
    IMG.x23 {position: absolute; left: 443px; top: 623px; z-index: 1;}
    IMG.x24 {position: absolute; left: 465px; top: 638px; z-index: 1;}
    IMG.x25 {position: absolute; left: 512px; top: 584px; z-index: 1;}
    IMG.x26 {position: absolute; left: 475px; top: 545px; z-index: 1;}
    IMG.x27 {position: absolute; left: 438px; top: 594px; z-index: 1;}
    IMG.x28 {position: absolute; left: 481px; top: 573px; z-index: 1;}
    IMG.x29 {position: absolute; left: 492px; top: 640px; z-index: 1;}
    IMG.x30 {position: absolute; left: 398px; top: 652px; z-index: 1;}
    IMG.x31 {position: absolute; left: 408px; top: 640px; z-index: 1;}
    IMG.x32 {position: absolute; left: 399px; top: 681px; z-index: 1;}
    IMG.x33 {position: absolute; left: 389px; top: 619px; z-index: 1;}
    IMG.x34 {position: absolute; left: 410px; top: 605px; z-index: 1;}
    IMG.x35 {position: absolute; left: 431px; top: 654px; z-index: 1;}
    IMG.x36 {position: absolute; left: 203px; top: 689px; z-index: 1;}
    IMG.x37 {position: absolute; left: 238px; top: 671px; z-index: 1;}
    IMG.x38 {position: absolute; left: 268px; top: 658px; z-index: 1;}
    IMG.x39 {position: absolute; left: 301px; top: 657px; z-index: 1;}
    IMG.x40 {position: absolute; left: 339px; top: 634px; z-index: 1;}
    IMG.x41 {position: absolute; left: 253px; top: 606px; z-index: 1;}
    IMG.x42 {position: absolute; left: 331px; top: 580px; z-index: 1;}
    IMG.x43 {position: absolute; left: 188px; top: 650px; z-index: 1;}
    IMG.x44 {position: absolute; left: 222px; top: 614px; z-index: 1;}
    IMG.x45 {position: absolute; left: 288px; top: 623px; z-index: 1;}
    IMG.x46 {position: absolute; left: 124px; top: 723px; z-index: 1;}
    IMG.x47 {position: absolute; left: 166px; top: 723px; z-index: 1;}
    IMG.x48 {position: absolute; left: 300px; top: 595px; z-index: 1;}
    IMG.x49 {position: absolute; left: 373px; top: 592px; z-index: 1;}
    IMG.x50 {position: absolute; left: 357px; top: 567px; z-index: 1;}
    IMG.x51 {position: absolute; left: 401px; top: 568px; z-index: 1;}
    IMG.x52 {position: absolute; left: 362px; top: 667px; z-index: 1;}
    IMG.x53 {position: absolute; left: 335px; top: 710px; z-index: 1;}
    IMG.x54 {position: absolute; left: 242px; top: 737px; z-index: 1;}
    IMG.x55 {position: absolute; left: 308px; top: 689px; z-index: 1;}
    IMG.x56 {position: absolute; left: 277px; top: 750px; z-index: 1;}
    IMG.x57 {position: absolute; left: 148px; top: 808px; z-index: 1;}
    IMG.x58 {position: absolute; left: 120px; top: 784px; z-index: 1;}
    IMG.x59 {position: absolute; left: 91px; top: 810px; z-index: 1;}
    IMG.x60 {position: absolute; left: 87px; top: 783px; z-index: 1;}
    IMG.x61 {position: absolute; left: 112px; top: 848px; z-index: 1;}
    IMG.x62 {position: absolute; left: 55px; top: 814px; z-index: 1;}
    IMG.x63 {position: absolute; left: 158px; top: 884px; z-index: 1;}
    IMG.x64 {position: absolute; left: 138px; top: 946px; z-index: 1;}
    IMG.x65 {position: absolute; left: 104px; top: 933px; z-index: 1;}
    
     
  5. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    do's and dont's

    Now about this example:

    first off, you need to change the username and password for the sql connection to your own, and of course also the database name.

    second..
    if you are going to alter part of the css code then do NOT, I repeat do NOT do this:

    1- start the ID's and class names with a number, because Firefox does not support this
    2- make the z-index negative, because Firefox does not support this
     
    Last edited by a moderator: Mar 29, 2011
  6. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    about example

    This example is from a map in my old game called SHUGO. The map is a gif file! The map shows the provinces of 16th century Japan. The map has a blue sea, black province borders and green provinces, with a red dot in each province. This red dot is transparent! So that anything underneath (i.e. lower z-index) can be shown beneath the dot.

    The dot will be black (the page background color) when the province is not held by the player. The dot will be purple if the province is held by your vassal, liege or ally. The dot will be red if the province is held by the player.


    Now suppose you want to have the armies on the map, you can do that, if you position them and place them at a higher z-index. Take care not to place army on top of dot, because not only will it block the view, but also block access to that province!
     
    Last edited by a moderator: Mar 30, 2011
  7. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    Hint:

    If you don't know how far to position an image, open the map (the gif file) in MS paint. Moving the cursor will show you the position in pixels.

    And remember positions for squares go in this order:
    LEFT, TOP, RIGHT, BOTTOM

    or x,y;x,y
     
  8. rtkwar

    rtkwar Member

    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Credit:
    - 54.14
    thank you very much my friend for help me can isee your game iwant see map example on internet or u can give me pictures and sql tables sorry for that but iam new
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    ihave problem with css my friend some times when iuse css with tables work good in internet explorer but in firefox not work why?
    /////////////////////////////////////////////////////////////////////////////////////////////////
    when some one send army iwatch army icon on map,how ican make army forward to taarget and back?
     
    Last edited by a moderator: Mar 30, 2011
  9. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    -Unfortunately my old game is no longer online. I have a new game at Roma. If you register for my new game, you can see a working example like it. Once you register:
    - login,
    - go through the portal (click on "continue")
    - in the atrium press "e" for exit
    - in the page showing Rome you can see a working example of a map, but please go further and click on "world"
    - at the empire view, go to military view
    - now you're at the map that is a good example


    That map shows most of Europe, North Africa and the Middle East during ancient Roman times. You can see a tiny eagle standard next to a dot. That standard represents a Roman legion (in other words an army).

    -You would have to show me the css, to give you an answer on that one, because you haven't been specific enough to tell me where the problem is in your css file.

    -What I do, is make a large sql table that stores coordinates. If I want to move an army, say from location 1 to location 2, then what I do is, update the sql table that stores the location of the army. For example:

    PHP:
    mysql_query("UPDATE armies SET location ='$newlocation' WHERE army ='$selectedarmy'");
     
    Last edited by a moderator: Mar 30, 2011
  10. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    write this at the end of the php script, just before the closing php tags

    PHP:
    mysql_close($con);
    Another possible explanation is that there were a lot of visitors at that page, so you may need to upgrade to a better host (some hosts limit it to 25 users at the same time). My guess is that you didn't close connection, as I doubt traffic is that high, because your game is so new.
     
  11. rtkwar

    rtkwar Member

    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Credit:
    - 54.14
    <div style=\"height: 850px; width: 1250px; background-color: #000000; border: 1px solid #808080;\" style='position:absolute; z-index:1; left:5; top:5;'>
    <center><font size=8 style='position:absolute; left:500; top:50;'><b>World-war2</b></font></center>

    <table border=0 cellspacing=0 cellpadding=0 bordercolor=white align=left width=5% height=100% valign=middle style=\"height:100px; width:150px; overflow: auto; background-color:#000000; border: 1px solid #333333;\" style='position:absolute; z-index:2; left:10; top:300;'>
    <tr><td bgcolor=#222222><font size=2><b>Menu</b></font></td><td bgcolor=#222222></td></tr>
    <tr><td bgcolor=#111111><a href=index.php><img src=pic/menu.png border=0></a></td><td bgcolor=#111111><font size=2><a href=index.php>Home</a></font></td></a></tr>
    <tr><td bgcolor=#111111><a href=guide.php><img src=pic/menu.png border=0></a></td><td bgcolor=#111111><font size=2><a href=guide.php>Guide</a></font></td></tr>
    <tr><td bgcolor=#111111><a href=register.php><img src=pic/menu.png border=0></a></td><td bgcolor=#111111><font size=2><a href=register.php>Register</a></font></td></tr>
    </table>

    <table border=0 cellspacing=0 cellpadding=0 bordercolor=white align=right width=5% height=100% valign=middle style=\"height:100px; width:150px; overflow: auto; background-color:#000000; border: 1px solid #333333;\" style='position:absolute; z-index:3; left:1090; top:300;'>
    <tr><td bgcolor=#222222></td><td bgcolor=#222222><font size=2><b>Login</b></font></td></tr>
    <tr><td bgcolor=#111111><font size=2>Username</font></td><td bgcolor=#111111><input type=\"text\" name=\"u\" size=\"8\"></td></tr>
    <tr><td bgcolor=#111111><font size=2>Password</font></td><td bgcolor=#111111><input type=\"password\" name=\"p\" size=\"8\"></td></tr>
    <tr><td bgcolor=#111111></td><td bgcolor=#111111><font size=2><input type=\"submit\" name=\"Login\" value=\"Login\"></font></td></tr>
    </table>

    <table border=0 cellspacing=0 cellpadding=0 bordercolor=white align=center width=5% height=100% valign=middle style=\"height:100px; width:300px; overflow: auto; background-color:#000000; border: 1px solid #333333;\" style='position:absolute; z-index:4; left:500; top:300;'>
    <tr><td bgcolor=#222222></font></td><td bgcolor=#222222><font size=2><b>Report</b></td></tr>
    <tr><td bgcolor=#111111></td><td bgcolor=#111111><font size=2><a href=hi.php>Login Succeed Click Here For Login</a></font></td></a></tr>
    </table>
    </div>
    ////////////////////////////////////////////////////////////////////////////////////////////
    thats css work good with explorer but bad with fire fox
    thats 3 menu one in left and one in right and one in center and all in middle page
    how ican controll in table position
    ///////////////////////////////////////////////////////////////////////////////////////////
    ivisit your game itis very good but itis need more graphic
    ////////////////////////////////////////////////////////////////////////////////////////
    iread in web about sleep() function for solve (too many connection) problem thats true?
     
    Last edited by a moderator: Mar 31, 2011
  12. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    -let me take a look at that

    -yes, I suppose it can always use more graphics

    -no, that will not help you, all that does, is delay execution of the php script
     
    Last edited by a moderator: Mar 31, 2011
  13. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    OK I tried that html with css in IE8 and FF4 without the pictures. It works fine without pictures in FF4, but doesn't work in IE8. The word "World-war2" is blocking the link "home", now if I knew how wide the pictures were, then I'm willing to bet that the pictures will make that word move more to the right. So it is the positioning of the pictures and the word "World-war2" that is wrong.

    Have you ever considered using relative positioning and more divs and less tables? Also why are you setting the width to 5% and height to 100%?

    That's not good, because if someone sets the size to extra large, the page html structure will break.

    Try this tutorial...
    CSS An Introduction - Part Six: The Basics of Positioning

    You may also want to read this:

    http://www.w3schools.com/css/css_margin.asp
    http://www.w3schools.com/css/css_padding.asp

    and read about floating images:

    http://www.w3schools.com/css/css_float.asp

    I know it is hard. I had troubles with this too when I just started. Trust me, I know feeling of frustration when I don't see an element position the way I want.

    Try the code in FF first, when you position an element, then try it in Internet Explorer. Positioning is the one thing where Firefox is actually better than Internet Explorer. Of course FF fails in all other respects, especially with numbered ID's and z-index, but I already warned you about that.
     
    Last edited by a moderator: Mar 31, 2011
  14. rtkwar

    rtkwar Member

    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Credit:
    - 54.14
    my friend thank you very much for help me
    iam sorry but ihave 2 more question
    1-about mysql_close() iuse this function before end php tag
    tell me iuse this function in config.php or in other pages only?
    (config.php is file include mysql connection information)
    2-u know how ican get pictures and graphic (units-building pictures) for use in my game
    ///////////////////////////////////////////////////////////////////////
    iam sorry my english is bad but ihope u understand me
    /////////////////////////////////////////////////////////////////////////
    thank you very much for your help and isend for u if ineed help if u allow to me
     
  15. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    1- you use it in all pages... and it doesn't necessarily have to be at the end of the page, just at that part of the script where you no longer need to use sql

    2-now that's a tough one, here is what I do:

    a) I make my own pictures with MS paint and Gimp (both are free tools, unlike Photoshop, which is very expensive)
    b) I find pictures with google images and look for a website that doesn't have copyright, in your case, you may want to try this one:
    Juniorgeneral Paper Soldiers - WW2
    c) find a good friend who can make the pictures for you


    Yes, your English is not very good, but I can understand you. One word of advise, please write "I" loose from other words. It makes your posts more intelligible. Like so: "I am" and not "iam", like you do. Other then that, I have little trouble reading your posts.
     
    Last edited by a moderator: Apr 1, 2011
  16. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    I just found a nice dynamic way to make grid maps in the browser with scalable vector graphics

    SVG in HTML

    Add the Graphics Power of SVG to PHP

    Unfortunately it does not work in Internet Explorer, but it does work excellent in Firefox.
    However I hear there are plugins that can make this work in Internet Explorer too.

    And you know what is really great about this, is that you don't need to learn flash! :) oh goody


    And you know what is really really great about this? You can use POLYGONS, which means you can shape it in any way you like. So lets say you want a province colored red or blue, then that province does not have to be a square, because you can use whatever shape you want. Oh and you can give the borders any color you want.
     
    Last edited by a moderator: Jun 17, 2011
  17. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    You can find a working example here:

    SHUGO

    Again... Please note!!! Only Works in Firefox or Internet Explorer WITH PLUGIN.
     
  18. rtkwar

    rtkwar Member

    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Credit:
    - 54.14
    thank you very much shugo ivisit this pages now
     
  19. rtkwar

    rtkwar Member

    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Credit:
    - 54.14
    u hv solar imperium sourcecode
     
  20. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,269.21
    I don't have solar imperium. Why?
     
Thread Status:
Not open for further replies.

Share This Page