Author Topic: World Map: location colors  (Read 758 times)

Offline Jesterhead

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
  • In Flames we trust!
    • View Profile
World Map: location colors
« on: December 09, 2010, 04:39:03 AM »
Hello everyone,

Obviously for my game i need a world map, yet it's a diffrent type as travian etc...
My world map cannot expand, the only thing that can change are the background area's of the area's.

example:


So depending on which alliance owns a certain area, the background color changes.
As the area's are not simple squares or rectangles but rather 'random' I have no clue!

Do you guys have any idea how to do this?

Thanks by forward,
Jesterhead

Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: World Map: location colors
« Reply #1 on: December 09, 2010, 04:57:22 AM »
GD, "fill area" (you have to remember in a table or something a starting point in the middle of a region where the fill should start).

Offline Jesterhead

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
  • In Flames we trust!
    • View Profile
Re: World Map: location colors
« Reply #2 on: December 09, 2010, 05:08:29 AM »
It will then fill the entire image? or when will it stop filling?

ST-Mike

  • Guest
Re: World Map: location colors
« Reply #3 on: December 09, 2010, 05:10:53 AM »
Admins have ignored my deletion request - if you're not going to delete my account then don't have the option there please.
« Last Edit: March 15, 2011, 07:43:32 PM by None »

Offline Jesterhead

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
  • In Flames we trust!
    • View Profile
Re: World Map: location colors
« Reply #4 on: December 09, 2010, 05:12:29 AM »
Google Charts API may be an easy way out here.
Intresting, altough I will be creating my own world and not the earth we live on :)

ST-Mike

  • Guest
Re: World Map: location colors
« Reply #5 on: December 09, 2010, 05:18:05 AM »
Admins have ignored my deletion request - if you're not going to delete my account then don't have the option there please.
« Last Edit: March 15, 2011, 07:43:27 PM by None »

Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: World Map: location colors
« Reply #6 on: December 09, 2010, 08:49:29 AM »
It will then fill the entire image? or when will it stop filling?

Do you remember Basic on ZX-Spectrum? There was a fill/flood function, you put x,y,colour and it started spreading the paint till it find another colour which was treated as a border. The same function exists in GD.
Or the way Konami did their map fill in Genghis Khan.

:D

Offline Jesterhead

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
  • In Flames we trust!
    • View Profile
Re: World Map: location colors
« Reply #7 on: December 10, 2010, 02:53:16 PM »
No I don't, I'm new to the whole "browser game making-scene" :)

Anyways, thanks a lot! Worked exactly as I wanted.


L-R: Original, filled with GD libairy

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal