This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Grid To Hex Conversion


On Tuesday 30 November 2004 18:34, you wrote:
> Hey Coop!
>
> Eric and I have been wondering if you knew what you
> were getting into when you offered to host XConq,
> we've had 2500+ hits in the last two weeks on the
> sf.net site, alone.

I'm thoroughly enjoying Xconq's continued success. I'm really happy to see the 
project going so well. 

Eric's cranking out new revisions like there's no tomorrow, you've brought in 
an artist and are actively pursuing good game design, and Matt's come out in 
force with the terrain imaging!

For my part, it turns out that Xconq uses an "oblique cartesian coordinate 
system" for displaying tiles. The Xconq manual does an excellent job of 
documenting this:

  "However, if you take a rectangular array of data and just wrap an area 
(terrain ...)) form around it, then everything will appear to be tilting to 
the left...

  The coordinate system is Cartesian oblique, with the y axis tilted to form a 
60-degree angle with the x axis, so it can be difficult to relate typed-in 
characters to the final appearance."

This means exactly what it says: I you try to overlay a rectangular land use 
grid over Xconq it's going to lean to the left. A screen image of what this 
looks like upon request. The solution is to "...have your program map the 
cell at x, y in the rectangular array to x - y / 2, y before writing." 

I continue to work on this. Here's some links to give you a better idea.

Here's a link to the input file. Each number represents a hex on the Xconq 
map. "42," for example, represents a hex of forest type I believe:

  http://wiki.xconqgis.org/map_files/landcover_ascii.txt
  
Here's the script that converts from the input file to the Xconq file:

  http://wiki.xconqgis.org/map_files/ascii_to_xconq.sh

Here's the output:

  http://wiki.xconqgis.org/map_files/earth-gis.g
  
On the plus side, I have found a comprehensive GIS Landcover, DEM, and road 
dataset for the entire globe!

Here it is:
http://www.mapability.com/index1.html?http&&&www.mapability.com/info/vmap0_index.html

And here for more information:

  http://earth-info.nga.mil/publications/vmap0.html

By the way, the 3D work based on the global VMAP0 data was already written for 
us a' la FlightGear:

  http://www.terragear.org/docs/vmap0/

Note that global VMAP1 data (1:250,000) scale is declasiffied but is not yet 
completely available for download:

http://www.mapability.com/index1.html?http&&&www.mapability.com/info/vmap1_index.html


-Coop

 
> Anyway, I had a new idea for a 
> poll:

[snip]

Okay! I'll post tomorrow!


-Coop



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]