sqlnoob Posted May 3, 2008 Share Posted May 3, 2008 OK I'm not too sure where to ask this, but bear with me. WHAT I HAVE: I've made a small online multiplayer game (you can watch it at www.shugo.nl). In here I have this map of Japan, with 65 provinces. I use a red background for the .php file containing the map of Japan. For each of the 65 provinces there is a capital (shown as a large dot). In the map (which is .gif file), these dots of the .gif file containing the map are transparent, so that you see the red background color through the map. Whenever a player of the game owns a certain province, I use a php script, to show a blue square image in a -1 z-index (so that it becomes a background image, behind the map image). I use this php script also to position this blue background image below the capital, so that I get a blue dot. The result is that any player who owns a province gets to see that by a blue dot, where as the other provinces that player doesn't own are shown with red dots. To give you an idea of the situation: http://www.shugo.nl/daimyo.htm I use an sql table to store the owner of a province and such and another table to store the diplomatic stances. THE TROUBLE What I want to do is change is this entire situation. Instead of just some dots (the province capitals) changing color, I want to change the color of the entire province, but keep the the black borders of the provinces and of course the same color for the sea and ocean. I want to change it in such a way, that for example I get 3 different maps. 1. a map showing provinces in blue who are player controlled and red as non-player controlled 2. a map showing the various clans (there are 32 in the game, plus a number of minor clans and possible rebels) with a diffirent color for each clan (probably not going to implement this one, because 34 different colors is hard to notice) 3. a map showing the diplomatic settings of the clan. For instance red means war and blue means peace etcetera. HELP/SOLUTION Anyone know of good and (preferably easy way, though I doubt that) of doing this. Any suggestions, hints possible solutions are very welcome. Thanks in advance for any help. Quote Link to comment Share on other sites More sharing options...
sqlnoob Posted May 3, 2008 Author Share Posted May 3, 2008 Oh btw before I forget, my site uses phpadmin and I'm not too sure my host has a gd library installed (probably not). Quote Link to comment Share on other sites More sharing options...
bravo81 Posted May 3, 2008 Share Posted May 3, 2008 I tried doing this before, gave up. How about cutting the image up into provinces? and changing the image from teh transparent dot, to a dot with the province behind it in your selected colour. Like an image rollover. Hope that helps. Quote Link to comment Share on other sites More sharing options...
sqlnoob Posted May 7, 2008 Author Share Posted May 7, 2008 image rollover is doable but I have about 65 provinces, that's a lot of possible combinations i'd get there'sd got to be a better way than that? 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.