PDA

View Full Version : map - river causing mysterious CTD



SirRethcir
01-14-2008, 16:20
Hi!

I'm making quite a large map (about 750x1000).
https://img207.imageshack.us/img207/7308/map01te3.gif

For some time now I'm working on the rivers.
First I did the Italian rivers, all was well.
Then I worked my way up through france, after that south germany.

Then after a test run, occurred CTDs when ones view is above certain areas.
I recursively masked certain rivers and eventually found 3 rivers causing these CTDs.
Then I had a closer look to one of these rivers.
I tracked the CTD down to one section of that river.

Now comes the mysterious part.
The CTD causing section is just a short part from the source of the river southwards. There is no branching or other unusual things.

So I'm puzzled.
At the moment I have no time to do further test, so my question:
Has anyone experiences with this problem?
(Is it some strange hardcoded limit?
Causes the large map this problem?)

Thanks!

SirRethcir
01-15-2008, 20:52
So, no one has this problem?

Ok, perhaps as a remark for the 'hardcoded limits' thread.
It seems to me that there is a certain limit of river tiles.
Or a certain limit of map objects!?
So, very huge map will sooner or later hit that limit.

Too bad.
:embarassed:

irishron2004
01-16-2008, 07:45
What I see in your post is the map_heights.tga. Please correct me if I am wrong. The only one I dealt with for rivers has been the map_featues.tga. Check the wiki for a whole section dealing with mapmaking and their limitations. Remember not only to delete the map.rwm but also map_heights.hgt.

SirRethcir
01-16-2008, 13:05
What I see in your post is the map_heights.tga.
Well, what you see is just a picture to show you the outline of the map, that I can use sentence like that: "First I did the Italian rivers, all was well.
Then I worked my way up through france..."
;)

Lets say it is just a warning for people working on very big maps and want to add many rivers.
Perhaps someone can do further test.
E.g. a simple big map with many river tiles -> CTD or no CTD, and so on.

irishron2004
01-16-2008, 15:32
I don't know if it has enough rivers for you but have you looked at Spurius' BigMap or any of the mods using it as a basis?

SirRethcir
01-16-2008, 21:24
I don't know if it has enough rivers for you but have you looked at Spurius' BigMap or any of the mods using it as a basis?
Link? Dimensions?

irishron2004
01-16-2008, 21:40
Link? Dimensions?
Here is link to Spuius' thread: http://www.twcenter.net/forums/showthread.php?t=69936. Also, Regions and Provinces mod uses it. Look around. You'll find more either strictly on BigMap or on RPM.

SirRethcir
01-17-2008, 10:40
Here is link to Spuius' thread: http://www.twcenter.net/forums/showthread.php?t=69936.
Thanks!

Ok, so, the dimensions of the map (1021x675) are equivalent to my map (ca.751x1001) but I have many many more rivers/river tiles.
Though I have done lesser than half the rivers up to now, they exceed the amount of river tiles in BigMap about, um, 10 times or so.

SirRethcir
01-17-2008, 19:35
I did some tests.
Ok, it is not a problem of to many river tiles on the map, but to many river tiles on a particular area of the map.
If an area is too clustered with rivers it cause a CTD. However, its very hard to give exact values. (see below)

During my tests I scrolled with the keyboard only.
Plain map:
- all 'Black' (RGB: 10,10,10)
- 751x1000 (375x500 tiles)

Test 1
arrangement of rivers:


o o o
| | |
....
o o o
| | |
:
:

- 4 tiles between rivers
- 74 rivers * 2 * 99 rows = 14652 river tiles on the map
-> no CTD

Test 2a
arrangement of rivers:


o o o
| | |
| | | ....
| | |
:
:

- 74 rivers * 492 length = 36408 river tiles on the map
-> CTD

Test 2b
- 74 rivers * 198 length = 14652 river tiles on the map
-> CTD

Test 3a
- arrangement of rivers as in 2
- rivers with fords
- 74 rivers * 62 length = 4588 river tiles on the map
-> no CTD

Test 3b
- as 3a
- 74 rivers * 63 length = 4662 river tiles on the map
-> CTD

Test 3c
- as 3a
- rivers without fords
- 74 rivers * 62 length = 4588 river tiles on the map
-> CTD

Test 4a
arrangement of rivers:


o o o
| | |
| | | ....
:
:
|____|____|
|

- based on 3a
- length 62 -> 4588 river tiles on the map
-> no CTD

Test 4b
- as 4a
- length 63 -> 4662 river tiles on the map
-> CTD

Test 4c
- as 4a
- confluence +3 tiles -> 4662 river tiles on the map
-> CTD

Test 5
- two rows of 3a
-> 9176 river tiles on the map
-> CTD

Test 6a
- 3a + 2x an own river (a way longer than 62 tiles, with serveral tributary rivers)
-> CTD occurs only in that part of the map where 3a-rivers and my own river are adjacent to each other

Test 6b
- cross check to 6a -> 6a without 3a
-> no CTD


Test 7a
arrangement of river:


o ____
| | |
| | | ....
:
:
|____| |____|

- 3a transformed to one big river
-> 74x4 tiles added -> 4884 river tiles on the map
-> CTD

Test 7b
- as 7a
- but transformed in such a way that no additional tiles are added
-> 4662 river tiles on the map
-> no CTD

Test 8
- as 2a
- only every 4th river kept
- 19 rivers + 492 length = 9348 river tiles on the map
-> no CTD

irishron2004
01-17-2008, 19:45
Very interesting. I'll have to keep that in mind. Do fjords break up a river so the game does not read it in one piece?

SirRethcir
01-17-2008, 19:52
Very interesting. I'll have to keep that in mind. Do fjords break up a river so the game does not read it in one piece?
It seems they have a certain effect on clustered rivers (Test 3), but look at Test 8.
One can have very very long rivers without a single ford.

alpaca
01-17-2008, 20:35
I wonder if this could be a pathfinding problem? Maybe the game has problems when trying to calculate a path from one side of a river to the other.

SirRethcir
01-17-2008, 21:15
I wonder if this could be a pathfinding problem? Maybe the game has problems when trying to calculate a path from one side of a river to the other.
I thought about that too, but Test 8 is somewhat contradictory. :dizzy2:

irishron2004
01-18-2008, 09:53
I thought about that too, but Test 8 is somewhat contradictory. :dizzy2:
Maybe not contradictory. What if the pathfinding problem is too many rivers too close together and the ai trying to find paths between them, not cross them?

SirRethcir
01-18-2008, 18:19
Maybe not contradictory. What if the pathfinding problem is too many rivers too close together and the ai trying to find paths between them, not cross them?
I really don't know. I have no idea, not a clue. :dizzy2:
But it doesn't look like a pathfinding problem. :embarassed:

Picture of my original problem:
https://img242.imageshack.us/img242/4919/riverswi8.jpg

The pink rivers causing the problem.
As you can see there are many dense areas with some 'complicated' rivers.
But no problem here.
Two of the pink rivers a rather straight forward and in empty areas. :wall:

alpaca
01-25-2008, 10:51
Do these rivers actually flow downhill? What happens if you make them a bit shorter?

SirRethcir
01-25-2008, 23:09
Do these rivers actually flow downhill?
In a general way. There might be some tiles which are higher than their predecessors.


What happens if you make them a bit shorter?
Well, a bit shorter has no effect. With a little luck one can have a bit of the river remaining on the map without CTD. :laugh4:

Makanyane
01-25-2008, 23:44
sorry I lost track of the examples somewhere, but have you tried just putting fords on the affected (pink) rivers? Also could you find way with layers of showing the rivers in conjunction with regions and impassible terrain?

I managed to crash a RTW map just by having Nile river without ford when it completely divided an Egyptian region that spanned between sea and edge of map, implying that there was a definite path finding problem that could be caused in the earlier game engine by un-forded rivers making two parts of same region inaccessible from each other.

SirRethcir
02-04-2008, 11:22
Here you can find the test mod folder:
http://files.filefront.com/rivertestrar/;9568453;/fileinfo.html

", but have you tried just putting fords on the affected (pink) rivers?"
Yes.

SirRethcir
02-12-2008, 12:46
Epilog:
I finished adding all rivers. Then I 'activated' the important/big ones.
Since there was no CTD I unmask the smaller rivers.
The result is a map with almost all rivers 'active'.
There are a few rivers in the area of Switzerland and North Italy which cause a CTD when interacting with other rivers.

PS: I have not yet added any fords. Perhaps they can 'unlock' another river.