News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

r5830 new landscape (binary and source versions)

Started by kierongreen, July 19, 2012, 06:57:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kierongreen

This is a testing release - it will load saved games from previous standard releases of simutrans, however any saved games generated will most likely not be compatible with future releases of simutrans, or even future versions of this patch. I have tried to make sure there are no severe bugs (only issues I know of relate to powerlines) in the patch, but wider testing usually reveals many bugs!

This patch adds support for double heights, different heights of water and per tile climates to svn trunk version 5830. These features are currently accessed via an extended landscaping tools menu and do not cost anything (this may change, or be restricted to public service player):



Starting from the left we have standard simutrans up/down and slope tools, with variants for double heights. Next there is the water down/up tools - these alter the water height in a lake (or will create a lake in a suitable basin). Finally there are climate tools for each climate (8 available, from water through to arctic) - these can also convert from land to shallow water and vice versa.

A version of pak128.Britain is included with double height graphics for many (but not all) ways and way objects. Notably of the available railways only wooden sleep steel rail track has double height graphics, and there are no double height graphics for maglev. Attempting to use a way which does not have support for double heights will result in graphical errors and not being able to build on steep slopes. Bridge building can be a bit tricky at times, and the graphics for bridge supports do not always look correct (but improvements to bridges in general are on my todo list, and are outside the scope of this patch!). Tunnels must start on steep slopes (this is pak dependent - for a full explanation see my previous double height patch).

This patch builds on my previous Water Height and Double Height patches. See those threads for more discussion on features, note that the following bugs discussed in those threads have been fixed:
Some terrain altering is not permitted when it should be when near ways - FIXED
Not considered 1 tile high climates yet when drawing terrain, so these will result in graphical glitches - NOT APPLICABLE (due to new climate system)
Pavement issues - FIXED (missing file in release)
Graphical errors when using slope tools near water - FIXED (dykes no longer enforced, new climate system allows level transitions)

Known issues:
Powerline Bridges do not build correctly. Altering height in Powerline Tunnels can cause the program to crash.

Edit: Downloads for 5830 removed - replaced with ones for r5886 below

Existing install means simutrans 111.3 and pak128.Britain 1.11.

Bug reports, either with the patch itself, my files for pak128.Britain, or even just concerning files missing from the release zips (which happened last time) are very welcome.

Fabio

Impressive! :thumbsup:

A most awaited patch growing better and better.

Spartanis


rsdworker

looks great its useful for our worlds - we could make desserts and snow places as separate regions

Roads

If you still need testing on this...don't know if I can be of any help but am willing to try.

From reading the thread it looks like I can just copy my existing simutrans.exe to a new directory and then download the "Windows executable" you linked above?  Will I not need to do something to my user directory?

If explaining all this is too much trouble I certainly understand.

kierongreen

Create a directory and copy all standard simutrans and pak128.Britain files into it. Then copy the executable and pak128.Britain files linked to above over this.

Roads

Thanks Kierongreen.  I've followed your instructions but not exactly to the letter.  When I try to run sim.exe I get an error "can't find SDL.dll"

I ran c:/dir sdl.dll /s and did find that file in a media directory I have.  I copied the file over to the new experimental directory and the game did try to load but Windows shut it down with no explanation.  The message was simply "Windows has encountered a problem and needs to close."

The version of the game I have is 111.0...I'm guessing I need to download 111.3?   

Spartanis

Quote from: Roads on July 25, 2012, 05:07:33 AM
Thanks Kierongreen.  I've followed your instructions but not exactly to the letter.  When I try to run sim.exe I get an error "can't find SDL.dll"

I ran c:/dir sdl.dll /s and did find that file in a media directory I have.  I copied the file over to the new experimental directory and the game did try to load but Windows shut it down with no explanation.  The message was simply "Windows has encountered a problem and needs to close."

The version of the game I have is 111.0...I'm guessing I need to download 111.3?   

Yes. The pakset has changed to suit the latest simutrans nightly. If that fails, you can download the latest sdl.dll from the net.

kierongreen

Ah missing sdl.dll from windows executable version zip file - uploaded a new version please check.

and yes, will need to be copied over 111.3 files.

Roads

kierongreen, I'm still doing something wrong or missing something.  In my Experimental directory, I can run simutrans.exe.  I am not given a choice of what to run, it simply runs  pak128.Britian version 111.3

Of course it does not have your changes.

I did get the new sdl.dll file and copied it to both my Experimental directory and to Windows/System32 directory.

When I try to run sim.exe I get the "Windows has encountered a problem and needs to close" message.  I'm thinking this might still be a problem with sdl.dll
I had looked for that download on the net and every site I visited wanted to "install" it.  Does it need something besides merely placing it in a directory?

kierongreen

By experimental I hope you aren't referring to simutrans-experimental because that will cause no end of problems. Without a lot of work new landscapes will not work with experimental.

My patch is based on simutrans-standard. For a Windows based install, create a new directory (no files in whatsoever). Unzip the following zip into it:
http://sourceforge.net/projects/simutrans/files/simutrans/111-3/simuwin-sdl-111-3.zip/download

This will create a directory inside this called simutrans, with sim.exe, sdl.dll, and a few other files and subdirectories etc in it.

Now unzip the following zip:
http://sourceforge.net/projects/simutrans/files/pak128.britain/pak128.Britain%20for%20111-0/pak128.Britain.1.11-111-2.zip/download

Rename the folder from Pak128.Britain.111 to Pak128.Britain and copy this into the simutrans directory above.

Then unzip my zips into this directory also, these will overwrite sim.exe, sdl.dll and various files in the Pak128.Britain directory:
http://simutrans-germany.com/files/upload/new-landscape-5830-binary-win.zip
http://simutrans-germany.com/files/upload/new-landscape-5830-binary-pak128.Britain.zip


This should work. I do not have access to a windows system, so I cannot test this though.

greenling

kierongreen
i have test it!
It look good out.
I have windows!
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Roads

#12
No Kierongreen, I was not talking about Simutrans Experimental.  That was a poor choice of directory name.  Thank you very much for breaking this down and I'll follow the steps in your last post.  Looks like it is just something I'm doing wrong as greenling says it is working for him.




IT IS RUNNING!  YAY!


Many thanks Kierongreen!


Will post any problems I encounter if that is okay.

Roads

Please pardon the double entry.  I thought kierongreen would need to see this ASAP.


I had begun a new game and was acting as public player building roads.  That included roads for stations.  In Tweaksberry, I needed to use the landscape tool to lower the land for the station in two squares which I did.  See screenshot below:





Later after working other areas I happened to look back at Tweaksberry and this is how it had changed:





Please note I only lowered the two squares next to the road by city hall.

kierongreen

#14
Thanks for the report - will investigate!

--

Found what I think is the issue. Did you by any chance save and then load this map before the problem occurred? When trying to repeat your bug I found errors my save/load routines for ground tiles (I had to change these from standard simutrans as it doesn't actually restore grid heights correctly, which caused problems for water raising and lowering).

Also just checking that you did set the climate of the area to desert and that this wasn't another bug? But looking at your screenshot transitions between water and this seem to be missing, which shouldn't happen :s

Going to try and fix a bug or two more (climate transitions not being restored when buildings with foundations are demolished, and the powerline bugs) then I'll put up a new version to test.

Roads

Yes I did save and reload several times.  I always do when building roads as my first attempt at a road is usually not what I stick with.

Before one of the reloads, I did not save it but I did try the desert and other terrain types to see what they looked like...also the water, raising and lowering.

If there is something specific I should not do, just tell me twice!  Apparently I can't understand the first time I'm told...

Spartanis

Off topic: I kinda like the name "Tweaksberry "! :P

kierongreen

QuoteIf there is something specific I should not do, just tell me twice!  Apparently I can't understand the first time I'm told...
Try anything! The purpose of testing is to find out bugs which I hadn't encountered :)

Actually this has uncovered more bugs related to the saving and loading of grids in the process, so very helpful :)

Roads

Good to know and just post when you have something to test.  I'll be happy to do it.

An_dz

I found one issue:
You can't change the water level when the water tiles are less than a tile distant.
And the water level don't increase to the same level of the shore, it always stops when the water level is 1 height below.

kierongreen

QuoteAnd the water level don't increase to the same level of the shore, it always stops when the water level is 1 height below.
Yes, this is due to the algorithm for detecting where the lake boundaries are. When you raise the water level the code tries to turn all land tiles at the same level into water, stopping if the height increases. As such if you try raising the water level to that of the surrounding ground, then this ground will be flooded. I could instead only flood land if it is below water level (rather than below or equal to) but there is no real advantage to this over current code.

QuoteYou can't change the water level when the water tiles are less than a tile distant.
Again, I think this is down to detection of edges. The algorithm looks for any gaps where water could flow through, and if it could it raises there also. So although two bodies of water might not look connected if there is even a tiny gap of land connecting them at the same level the algorithm will detect this. Again, I could change this, but this could cause additional problems if I'm not careful...


In both these cases you may have more success achieving these effects with the water climate tool as well as the lake height one.

An_dz

Thanks for the answers kierongreen.

Are you planning a change in the heightmaps to generate the terrain and water bellow sea level?
Maybe Dwachs can extend his scripted scenarios to work with it.

kierongreen

I wasn't planning to change heightmaps to support different heights of water myself. Random maps and height maps do generate lakes above sea level if the terrain allows it (though prissi commented that there were too many so I reduced the height of water in these lakes). Actually these might get removed as they do slow down map generation. Dwachs scripted scenarios might allow different water heights, or a more general extension to heightmaps to support additional information might be better.

Andyh

I'm encountering a number of issues with the landscape tools.

1. The extended landscaping menu only shows some of the new functions (no water or climate tools)
2. The slope tools don't seem to create the correct graphics
3. The slope tools leave a lot of graphical artifacts behind

The attachment illustrates these issues.

An_dz

Are you sure you used Simutrans 111.3 and pak.Britain 1.11?
Cause here I don't see this problems.

kierongreen

This is what happens if you haven't copied all of the files I replaced in pak128.Britain over the originals.

Andyh

I'm pretty sure that I copied over all of the new files (Vista prompted me, and I selected 'copy and replace', for every file).  Actually I re-did it after initially encountering this problem, but still had the same issue.  Approximately how many new files were there?

kierongreen

It might also happen if you are still using old binary - are you running sim.exe not simutrans.exe?

There's 40 files in total, sim.exe, makeobj.exe, 36 paks and 2 config files.

Andyh

Ah...sim.exe not simutrans.exe...looks a lot better now!

Thanks a lot for your help!

kierongreen

Patch updated to r5886, new binaries included for Linux and Windows. No change in functionality but the following bugs have been fixed:
rotation of climates
save/load of height grid
crash on using change slope tool for powerlines
bridge building now more robust and working for powerlines

As a result of these fixes previous saved games made with this patch most likely will not load correctly, and likewise future compatibility is not guaranteed. All known issues are now resolved, although I'm not going to be shocked if people find more bugs, and reports are most welcome! :)

The only change to the files in pak128.Britain since 5830 is to the menuconf.tab file as menu entries have been renumbered following changes in simutrans trunk.

The following downloads are available - to test this you will need to either apply the patch and then make pak128.Britain from the source files provided, or download an executable (Linux or Windows) and pak128.Britain binary files:
Source files - the patch, along with all dats, pngs and simutrans config files necessary to make the updated files for pak128.Britain
Binary files for pak128.Britain - copy over an existing install to use one of the executables below
Windows executable - simutrans and makeobj, copy over an existing install of simutrans
Linux executable - simutrans and makeobj, copy over an existing install of simutrans

As before you are best making a clean install of simutrans 111.3.1 and pakBritain 1.11, then copy the executable files for windows or linux, and binary files for pak128.Britain over this.

TurfIt

Definitely an epic patch.  8)

A few issues:

DOUBLE_GROUNDS not defined, can't compile:
simwerkz.cc: In static member function 'static const char* wkz_setslope_t::wkz_set_slope_work(karte_t*, spieler_t*, koord3d, int)':
simwerkz.cc:1102:67: error: 'const class weg_besch_t' has no member named 'has_double_slopes'
simwerkz.cc:1103:64: error: 'const class weg_besch_t' has no member named 'has_double_slopes'
simwerkz.cc:1104:64: error: 'const class weg_besch_t' has no member named 'has_double_slopes'
simwerkz.cc:1142:67: error: 'const class weg_besch_t' has no member named 'has_double_slopes'
simwerkz.cc:1143:64: error: 'const class weg_besch_t' has no member named 'has_double_slopes'
simwerkz.cc:1144:64: error: 'const class weg_besch_t' has no member named 'has_double_slopes'
make: *** [build/default/simwerkz.o] Error 1

DOUBLE_GROUNDS defined, resultant .exe can't load unmodified paks. No backwards compatibility.

simscr11: 2 single height slopes, constructed x2 artificial slope + flat artificial slope, built tunnel, then restored to natural slope on the flat artificial. Shouldn't be allowed?
simscr12: beach not displayed on some shoreline tiles. Water is just the standard ocean.
simscr13: beach not displayed on any shoreline. Water is a raised lake.
simscr14,15: ding_view_t goes psychedelic on zooms other than 1:1.

kierongreen

Beach behaviour is intentional - when generating a map indents in coastline will have wide beaches, headlands will have no beach. Edits to land height after will assume standard simutrans type beaches. Lakes will have no beaches as tides aren't a factor. Will try fixing compile error, with DOUBLE_GROUNDS defined old paks will load if landscape files are updated. Colours and tunnel are bug and will fix tonight after work hopefully.

prissi


kierongreen

Just a quick note: I've traced and fixed the bug with altering slopes above tunnels (actually this affected the normal height lowering tool as well as the slope tool and restore slope tool). The psychedelic worldview display I'm stuck on at moment, it's to do with the pointer somehow not being set correctly for the image in display_base_img_alpha (the alphamap one seems ok though). I'll keep working on this.

prissi

Maybe different zoom levels? Or rather different routines for display? (They are displayed from world_view directly.)