More height levels (in trunk since r27010)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

oklmernok
Engineer
Engineer
Posts: 34
Joined: 07 Jun 2009 13:59

Re: More height levels

Post 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.
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: More height levels

Post by Ammler »

According to this page, the grf could be found here: http://www.tt-forums.net/viewtopic.php?p=681507#p681507
User avatar
Bob Smith
Engineer
Engineer
Posts: 111
Joined: 17 May 2005 23:25

Re: More height levels

Post 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?
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2870
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post 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.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: More height levels

Post 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.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Re: More height levels

Post 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!
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: More height levels

Post 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).
Attachments
terraform_cmd.cpp
Adjusted version of terraform_cmd.cpp, with support for terraforming at the map border.
(37.27 KiB) Downloaded 95 times
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2870
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post 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.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: More height levels

Post 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.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2870
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post 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 ?
Attachments
more_heights_log_v15_02_r16578.txt
(48.6 KiB) Downloaded 103 times
moreheights_v15_02_r16578.patch
(165.17 KiB) Downloaded 103 times
Moreheights_v15_r16578.7z
(2.86 MiB) Downloaded 108 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
oklmernok
Engineer
Engineer
Posts: 34
Joined: 07 Jun 2009 13:59

Re: More height levels

Post 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
Attachments
autosave8.sav
error: 1960. febr. 02.
(579.47 KiB) Downloaded 83 times
coredmp.7z
DMP file
(12.41 KiB) Downloaded 95 times
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2870
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post 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).
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
oklmernok
Engineer
Engineer
Posts: 34
Joined: 07 Jun 2009 13:59

Re: More height levels

Post 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.
Attachments
autosave7.sav
(576.47 KiB) Downloaded 92 times
autosave6.sav
(578.54 KiB) Downloaded 89 times
ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: More height levels

Post 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).
Attachments
moreheights_v16_01_r16634.patch
Version 16 of the more heightlevels patch.
(167.31 KiB) Downloaded 93 times
more_heights_log_v16_01_r16634.txt
Logfile for the more heightlevels patch, version 16.
(48.63 KiB) Downloaded 102 times
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2870
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post 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.
Last edited by ChillCore on 20 Mar 2010 22:53, edited 1 time in total.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: More height levels

Post 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 :|
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2870
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: More height levels

Post 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.
Attachments
Mainviewport_zoom_bug.png
Mainviewport_zoom_bug.png (71.98 KiB) Viewed 2530 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: More height levels

Post 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.
ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: More height levels

Post 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?
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: More height levels

Post 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.
Image
Image
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 6 guests