grlayouts Posted October 17, 2010 Share Posted October 17, 2010 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> Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 17, 2010 Share Posted October 17, 2010 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?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.