Page 1 of 1

?-Terrain Popup

Posted: Sun Jun 11, 2006 5:10 am
by BigJ62
When I right click on the map the terrain popup indicates a different terrain than what I clicked on.
1. Is this a bug?
2. Which am I to believe the popup or the map?


Fantastic game by the way.
Thanks...

Image

RE: ?-Terrain Popup

Posted: Sun Jun 11, 2006 9:48 am
by RayWolfe
The map features are on a grid. I seem to remember that it's set at 100 metres. So if you click within the feature grid it will pop-up the feature even though the map picture does not show at the clicked point.
That reads as clear as mud to me but I know what I mean! I hope you do do. [;)]
Ray

RE: ?-Terrain Popup

Posted: Sun Jun 11, 2006 12:56 pm
by simovitch
Actually BigJ It's not a bug at all, it's more the result of a terrain feature enhancement. Dave O'Conner explained this during the development of the game:
Oh and one other thing to remember about what is drawn and the underlying data. These can be at variance due to the terrain grid, which is set at 100m. Previously, in determining the terrain and hence the effects at a certain location, the code would simply check to see if any pixel within the grid was set for a given layer and if so then it was deemed to apply. So if only 1 pixel out of say 100 was woods, then woods effects would apply assuminmg nothing with a worse effect was also present.

We changed this by adding in the CalcPercentagePrecence() function. This now determines the proportion that a particular terrain type is present and modifies the effects by a pro-rata amount, except where certain types are present like urban. It returns the dominant terrain type and this is displayed in the terrain popup but it modifies the move and hit percentages. The end result is a more realistic representation. In most cases it also is closer to what you see. However, if you click in a location it may actually be the corner of a location and it may end up picking up terrain effects for area up to 100m away from where you clicked. So please keep that in mind.