Page 21 of 59

Re: More height levels

Posted: 10 Jun 2009 10:07
by oklmernok
I removed the attached river grf file. It was my mistake.
I haven't found a grf like the riverw.grf from Michael Blunck. It uses big and bright rocks in the slope what I like.. but it is offtopic.

Re: More height levels

Posted: 10 Jun 2009 10:38
by Ammler
According to this page, the grf could be found here: http://www.tt-forums.net/viewtopic.php?p=681507#p681507

Re: More height levels

Posted: 10 Jun 2009 15:48
by Bob Smith
ChillCore wrote:Smoothness: cereally rough.
This has been bugging me for a while now... what the hell is "cereally"??? I'm assuming that you don't mean the landscape is to resemble a bowl of Kellogg's finest?

Re: More height levels

Posted: 10 Jun 2009 16:27
by ChillCore
Lol. :)
It's a joke.
It comes from Southpark. One of them little dudes sais it all the time, I think.
I picked it up on another site some time ago.

Re: More height levels

Posted: 10 Jun 2009 16:35
by XeryusTC
It is not one of the boys who says it, it is Al Gore who features in the episode ManBearPig (and later in Imaginationland part III) where he tries to spread ManBearPig awareness.

Re: More height levels

Posted: 10 Jun 2009 16:42
by richk67
Some of these screenies are really showing the potential I was dreaming of when I first wrote TerraGenesis Perlin. Fantastic work. Big respect!

Re: More height levels

Posted: 11 Jun 2009 19:03
by ic111
Hello ChillCore,

just a small update from me: I worked on making terraforming on map borders possible. I think, I solved the the terraforming related stuff, however now one runs into the STR_ERROR_OFF_EDGE_OF_MAP error in dummy_land.cpp.

I don't think I will solve that problem today (i.e. this week). However, one question: Why do we need an error at this place at all? Wouldn't doing simply nothing at this place work perfectly? Or do I miss some special case we have to take care of here?

As the only thing I touched is terraform_cmd.cpp, I just attach this file. Simply replace your copy with this one.(I'm currently at 16565).

Re: More height levels

Posted: 11 Jun 2009 20:18
by ChillCore
XerusTC wrote: It is not one of the boys who says it, it is Al Gore who features in the episode ManBearPig (and later in Imaginationland part III) where he tries to spread ManBearPig awareness.
Ah I see, I never followed the series. I am more of a trekkie. I Only know that Kenny bites the dust a lot.
Thank you for explaining.
richk67 wrote: Some of these screenies are really showing the potential I was dreaming of when I first wrote TerraGenesis Perlin. Fantastic work. Big respect!
Thank you !!! Coming from the author that means a lot to me ...
ic111 wrote: I think, I solved the the terraforming related stuff, however now one runs into the STR_ERROR_OFF_EDGE_OF_MAP error in dummy_land.cpp.
I don't think I will solve that problem today (i.e. this week). However, one question: Why do we need an error at this place at all? Wouldn't doing simply nothing at this place work perfectly? Or do I miss some special case we have to take care of here?
Whenever you feel like fixing it is fine.
Simply removing the asserts will trigger the inconsistent terraforming error.
I did not continue trying at that point because I still do not grasp all of the code yet.

In trunk, when freeform edges is on, all slopes outside the map are still drawn but stacked.
You can see this if you look very closely.
Also those tiles are still terraformed and costs for doing so are still calculated.

Maybe we can fix it in the same way as I did with them unselectable bordertiles before ?
See:
/* changed these values to -64 ... note pointer is still bound to tile (1,1) */
in the patch.

I am going to have a little looksie on what you did where.
I had gotten to the same point when i tried before, but not in the same way.
Maybe we can remove those asserts in dummy_land.cpp safely now.

EDIT:

I should have tested first and commented after.
Using the fixed terraform_cmd.cpp file ic111 has posted,
I have commented out the two asserts I marked in Dummy_land.cpp and terraforming works again.
I have left the asserts in for now because first we want to see if it is safe to remove them.(AI, towns, industries -> terraforming)
I will be posting new binaries and the adjusted patch later today.

Re: More height levels

Posted: 15 Jun 2009 08:20
by CommanderZ
I have a feature request: Please add an option to change height of heightmap being imported. 64 is a little too much for small maps while large maps could use much higher height differences.

Re: More height levels

Posted: 15 Jun 2009 13:59
by ChillCore
That would be a nice addition CommanderZ.
But it would require for people to include the optimum heightlevel generation in the posted heightmap names,
to solve the waterlevel "flaw". (Solution in my eyes.)


Please find attached version 15.

Changed:

- Terraforming borders is now allowed if freeform edges is enabled.
¿ temp solution or fixed ? Please see dummy_tile.cpp.

- Smoothness Noise parameters set to reduced values.
Terrain height generation left as in v 14 (512 * 512, Alpine is 32 high)

To test:

Terraforming at borders fix:
--------------------------------
- Behavior of towns and industries at borders.
- Behaviour of airplanes near borders.
- Behaviour of ai near borders.

Terrain types:
----------------
- Please test and compare the terrain types in v14, and v15 (maybe v12).
(Scenario editor is the fastests way.)

Some feedback here would help a lot to decide on the final values.
Usefull feedback would be:
eg. - I like the flat setting better in v? because ...
- In version? terrain type x did not generate a map as i expected it to be.

There is not really a time frame for this, if you wish to help here.
Choosing the values and disabling the unplayable options is one of the last steps in completing the patch.
(I would be playing the latest version too, if I were you, but i cannot include a 21 values dropdown can I?
So Thank you very very much if you do, If you don't, I'll love you just as much as i do now. ;))

Other things to test:
----------------------
- Everything else as usual.

¿ Todo: ?
- Retune rough a little before code freeze on parameters to get the squaryness out. Or do we like it like this ?

Re: More height levels

Posted: 17 Jun 2009 13:54
by oklmernok
I was "playing" with the new version 15, together with many AI (from the server), and an error occur.
---------------------------
MS visual C++ runtime library
Assertion failed!
program: ...openttd.exe
file: c:/chiottd/moreheights_clean/src/aircraft_cmd.cpp
line: 595
expression: st !=NULL
---------------------------
My computer hasn~t got any "c:/chiottd" directory. I don't know it is the MoreHeightLevels patch error or a trunk error or an AI error. please cheque it, if you have free time
NOrbert

Re: More height levels

Posted: 17 Jun 2009 15:05
by ChillCore
You do not happen to have an earlier savegame?
When I load your savegame I do not even have the time to press pause.
I looked at that assert and it relates to finding a depot for maintenance.
My computer hasn~t got any "c:/chiottd" directory. I don't know it is the MoreHeightLevels patch error or a trunk error or an AI error. please cheque it, if you have free time
Mine does. :)
Thats the folder from where the binaries were compiled.



I had an assert with placing airports near the bottom corner.
When an aircraft was just in his holding flight pattern and tried to leave the map at the southeast border.

A second occasion was with ai enabled and freeform edges on.
This one I did not see happen yet but I've had it a few times.
Sometimes at the beginning of a game, sometimes it runs for quite some time.

ps:
If you want to play with ai set freeform edges to water for now.
Your game will last a bit longer then.
Ai does not know it should not put airports near borders (yet).

Re: More height levels

Posted: 17 Jun 2009 15:34
by oklmernok
The edges were freeform, and I have many AI.. so it could be the problem that the AI uses an airport near the border.

Re: More height levels

Posted: 23 Jun 2009 18:56
by ic111
And the next bug is gone. I fixed the issue that when one clicked on the smallmap, the heightlevel wasn't taken into account.

Now centering using the minimap should work anywhere on the map.

@ChillCore: If you want to post an updated version, feel free. I will put it onto the first page of the thread in that case as fast as I can (which however in some cases can mean two or three days later).

Re: More height levels

Posted: 23 Jun 2009 20:46
by ChillCore
Please, find attached the new win32 binaries.
Patch, logfile and grf included in zip.
I have compiled the patch ic111 has posted without making changes.

@ic111:
I tested and I saw it was good.;)
Pretty soon there will be no more bugs to fix, nice going.
Thank you for updating the logfile.


Edit: binaries removed. Newer are available further in the thread.

Re: More height levels

Posted: 24 Jun 2009 16:58
by ic111
Hello,

some notes:
1. What problem is meant with this bug (currently the first one in the logfile)?

- No zooming in on highlevel tile 1,1
The viewport zooms in on level zero tiles, not on height position of tile.
No zooming in on high mountains along the top borders if freefrom edges is on.
When you're zoomed in fully, you can't see the very corners of your map if
there is a large mountain there. You have to zoom out if you want to see the corner.
(better discription)(ever v12)

Do you think it is still there? I have no problem with the zooming itself, I think it recognizes the height correctly. However, I have found another bug:

2. If you have a high mountain at (1,1), you run into serious glitches. Seems that the mountain leaves some hardcoded area in this case, growing into some area that won't get repainted. If anyone has an idea about this, feel free to inspect this, otherwise I will do so.

3. ChillCore: I think we can remove those two assertions in dummy_land.cpp (Clear/Terraform) safely and replace them with a "return zero cost", i.e.

CommandCost cost(EXPENSES_CONSTRUCTION);
return cost;

I mean, if you terraform or clear land outside the map, this shouldn't cost you anything. BTW, you only catched the case that freeform edges where not allowed. If they are allowed, your implementation returned an undefined value, which caused an assertion in command.cpp to be thrown. I just inspected why this happens, and after some minutes of searching, I landed in dummy_land.cpp :|

Re: More height levels

Posted: 24 Jun 2009 18:19
by ChillCore
Hi ic111,

1. See attachment please.
When fully zoomed in the top corner is unreachable.

3. Code changed in my source.
Compiling in progress...

I can agree on the no costs outside maps.

Did i tell you I call myself scriptkiddie ... ;)
Sorry for creating bugs.

Re: More height levels

Posted: 24 Jun 2009 18:39
by ic111
ChillCore wrote:Hi ic111,

1. See attachment please.
When fully zoomed in the top corner is unreachable.
Ah, does the 126 mean height 126? Ok, I didn't test such a high mountain :oops:
ChillCore wrote: Did i tell you I call myself scriptkiddie ... ;)
Sorry for creating bugs.
No problem, I think the bigger problem is that this didn't cause a compiler error.

Re: More height levels

Posted: 24 Jun 2009 19:17
by ic111
Hello,

one last question for today:

We have two problems regarding point (1,1):
(1) Mountains (they don't need to be high BTW) aren't repainted properly, you get a lot of glitches.
(2) OpenTTD stops scrolling before you reach the top of a high mountain at (1,1)

I suspect both problems have almost the same reason: The painting area of OpenTTD (or in other words the coordinate system it uses for this) doesn't start far enough in the north. Then, there probably is some check that stops you if you try to scroll too far - it exists for the other directions as well, BTW. I suspect (but am not sure yet) that this check is based on the coordinate system I mentioned before in some way.

So question: Does anyone of you know anything about this? Does especially have anyone knowledge about how OpenTTD performs scrolling, and about how it stops you when you scroll too far? There must be some sort of test somwhere - but where, I didn't find it yet. Did you?

Re: More height levels

Posted: 26 Jun 2009 21:03
by thgergo
Also, dont forget attach the new limit for height, its possible to "warp" the height level at the noment. When one raises a flat terrain at 255 height to 256, it "raises" to the 0th height level, resulting a 0th height tiles on the top of the 255 height land. Then raising again to the 1th level, this generates wierd effects, such as slopes like Locomotion.
Besides that, this getting more and more realible patch:) :bow:
Also aicraft doesnt fly into the ground when it have to climb a 0-255 height with steep slopes between two airports.