Map Coordinate Question...
Posted: Sat Nov 04, 2006 4:32 pm
Does only here know, or can any from Firaxis tell me, the formula for the conversion from the City StartX and StartY to the map (.tga) pixel coordinates?
For these questions I'm considering the first 601x601 image in a map .tga file to be the "map". Likewise the map coordinates that I'm referencing here are the pixel coordinates on that map.
From what I can gather, a city at StartX=0, StartY=0 will be positioned around point 180, 180 on the map. It may not be exactly this but it's pretty close. However, if I consider that point to be the origin of the city layout coordinates the resulting positions for all the other cities are not correct.
If you look at the map image you'll notice that spots where cities are placed tend to be "smudged"... giving a uniform color and thus a flat terrain. Using these smudges as markers for cities I've been able to calculate that a cities location on the map can be (approximately) calculated via the following formula:
I don't think that this formula is correct; however I cannot tell if the formula is wrong or the starting location is wrong.
Any help on this would be greatly appreciated.
Thanks,
Wes
For these questions I'm considering the first 601x601 image in a map .tga file to be the "map". Likewise the map coordinates that I'm referencing here are the pixel coordinates on that map.
From what I can gather, a city at StartX=0, StartY=0 will be positioned around point 180, 180 on the map. It may not be exactly this but it's pretty close. However, if I consider that point to be the origin of the city layout coordinates the resulting positions for all the other cities are not correct.
If you look at the map image you'll notice that spots where cities are placed tend to be "smudged"... giving a uniform color and thus a flat terrain. Using these smudges as markers for cities I've been able to calculate that a cities location on the map can be (approximately) calculated via the following formula:
Code: Select all
Map.X = (180 + City.StartX) * .9
Map.Y = (180 + City.StartY) * .9
Any help on this would be greatly appreciated.
Thanks,
Wes