Jump to content

coordinates


grlayouts

Recommended Posts

Hi,

 

i want to have a map of the us in which in my game people can control and it turns there colour using co ordinates, i know how to get the coordinates from below but i dont know how to set the borders for each country or save the info into a table ie

 

where                  controlledby

 

texas                        player1

 

washington              none

 

and if it's controlled by the player then changed the colour of the square to there colour ie red?

 

i hope this makes sense and someone can point me in the right direction

<?
$foo_x=$_POST['foo_x'];
$foo_y=$_POST['foo_y'];
echo "X=$foo_x, Y=$foo_y ";
?>

<form action='' method=post>
<input type="image" alt=' Finding coordinates of an image' src="map.jpg" name="foo" style=cursor:crosshair;/>
</form>

Link to comment
Share on other sites

it sounds like you need a quick overview of how to write a Risk-type game?? that's a lot to cover in short-answer format.

 

I guess you'd first need to split all available areas into individual x/y coordinates. if your game field covers the entire Earth, you'll have to set up a grid system of coordinates for every point on the planet, depending on the resolution (grid size) that you want to work with. Really, this is a huge topic. Do you have any specific questions??

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.