Jump to content

Displaying certain X and Y coordinates on map based on players coords - for game


slyte33

Recommended Posts

I own an online MMORPG and i'm currently making a map where players can explore and do other types of things.

 

The problem I am having is that I want to show certain coords based on the coords they are on.

For example,

Player is at 0x 0y, display a 10by10 box of 10 squares going from 0x 0y to 10x and 10y

Player is at 10x 10y, display a 10by10 box of 10 squares going from 10x and 10y

 

I have failed miserably at this for about an hour now, tweaking around isn't helping much. So i've came here to ask for your help :)

 

If needed, here is my code to make the 10 by 10 area:

 

$query = $db->execute("select * from travel");
echo "<table border=0><tr><td width=25%><table border=0>";
for($i = 1;$map = $query->fetchrow(); $i++)
{
echo "<td>";
echo "<img src=$map[image]>";

if ($i % 10 == 0)
{
echo "<tr>";
}
}

I'm just at the beginning of this, so not much has been done yet.

All help is much appreciated, thanks :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.