Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  How to make a Strategic Map?  (Read 484 times)
0 Members and 2 Guests are viewing this topic.
Offline relachs

JGO n00b
*

Posts: 6



« on: 2006-02-05 23:50:05 »

Hi there, i am german so excuse my bad english  Roll Eyes

I want to make a strategic map for a strategic game  Roll Eyes Tongue  like this or more cheap: http://www.wargamer.com/reviews/shogun/STRATEGIC_MAP.jpg

so, if i click on it, it should call a method with the Nation-Object of the nation i just clicked if you understand  Embarrassed

and there should be an option to highlight the area of the nation you clicked. like you click on a nation and the background changes to red, but only for that nation <.<

ok, i think you got it, i hope Tongue
Offline swpalmer

JGO Kernel
*****

Posts: 3438
Medals: 4


Where's the Kaboom?


« Reply #1 on: 2006-02-06 21:55:49 »

There are lots of posiblities.  one that comes to mind is to have a 2d array of bytes the same dimensions as the map image.  The byte at each array position will be set to the id # for that "nation" or "territory".  you can also use the byte array to implement some kind of flood fill to colour selected nations.  There was a good flood-fill algorithm posted here recently - try searching in the Shared Code area.

Offline relachs

JGO n00b
*

Posts: 6



« Reply #2 on: 2006-02-07 05:43:40 »

thanks for your reply. i will search around for some other others before i decide how i am going to solve this...
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.073 seconds with 19 queries.