Author Topic: Easternmob.com ( map in a mob game)???  (Read 769 times)

Offline hitman8787

  • Level 1
  • *
  • Posts: 2
  • Reputation: +0/-0
    • View Profile
Easternmob.com ( map in a mob game)???
« on: November 26, 2008, 03:53:51 PM »
Hello all. I am new here. I have a mob browser based game. I am in beta, and i have many options on it. I would like to add a map in it. What do you thing. Have some sugestions? All help is apreciated.

Offline zenanthor

  • Game Owner
  • Level 5
  • *
  • Posts: 16
  • Reputation: +0/-0
  • I don't even see the code. All I see is blonde...
    • View Profile
    • Elite Mafia Browser Based Game
Re: Easternmob.com ( map in a mob game)???
« Reply #1 on: November 27, 2008, 06:09:37 AM »
Here is something to get you started....

On my game there is 6 countries, and 3 cities in each country.

x = country
y = city
z = area

mySQL
Code: [Select]
CREATE TABLE `game_map` (
  `id` int(11) NOT NULL auto_increment,
  `x` int(11) NOT NULL,
  `y` int(11) NOT NULL,
  `z` int(11) NOT NULL,
  `owner` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1801 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1801 ;
Make some code to fill the table....
Something like:
Code: [Select]
//This will make 6 countries, 3 cities and 100 areas on the map.
$x = 6;
$t = 0;
while($x < 7){
$y = 1;

while($y < 4){
$z = 1;

while($z < 101){
mysql_query("INSERT INTO game_map VALUES (null, '$x','$y','$z',null)");
echo "Made $x.$y.$z <br />";
$z++;
$t++;
echo "$t <br />";
}

$y++;
}

$x++;
}

Then slice a map up into 100 pieces or the amount of areas wanted (name them like image_01.gif image_02.gif image_03.gif), then generate a map from table. Can aslo be useful to place each map in its own directory.
« Last Edit: November 27, 2008, 06:13:11 AM by zenanthor »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal