The International Simutrans Forum

 

Author Topic: Steeper/Mountainous maps  (Read 16232 times)

0 Members and 1 Guest are viewing this topic.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Steeper/Mountainous maps
« on: July 16, 2009, 06:58:36 PM »
Hi all.

Was just thinking, thought I'd throw this idea to the floor for general comment.

The simutrans terrain is good, when it comes to emulating wide open countryside, rolling hills, and now rivers (  :D ),  complete with, forest, desert, and fields, but what it doesn't do a great job of is mountains and more serious terrain. One of the most challenging things to contemplate is to construct an infrastructure through severe terrain, to build a rail line clinging to a mountain slope, to spiral tracks over each other and span deep ravines, connect with ferrys along lakes and fjords, and all the stuff that makes pretty postcard images.






I am interested to see, for instance, that the experimental simutrans is working on a way to make trains handle gradients more realistically.

What I was also wondering, however, is if there is potential for a terrain alteration. So what about this: (?)

As well as the current terrain slope (1:1, 45 degrees), a new terrain slope tile is created: a 2:1 tile (up 2 levels in the space of 1 tile). This would require a few extra corner terrain tiles as well (and I'm not certain how you join a 1:1 slope to a 2:1 slope beside it...)

It would seem that such an idea would allow a geography which could very quickly gain altitude, and build "impassible" terrain, deep valleys etc, which would have to be engineered or diverted around (unless someone comes up with a rack railway system...).

Any thoughts? Any better ways of achieving the above?

Offline LeifInge

  • *
  • Posts: 128
  • Arenamaster
Re: Steeper/Mountainous maps
« Reply #1 on: July 16, 2009, 08:23:59 PM »
Coming from Norway I think this is a great idea :)

Offline KrazyJay

  • *
  • Posts: 172
  • Infrastructure & Transportation Junk
Re: Steeper/Mountainous maps
« Reply #2 on: July 16, 2009, 09:07:59 PM »
I just love to see those train pics RRRROOOAARRRR!!

On topic: I vaguely remember this has been discussed before, I remember it came down to the effort that had to be taken for creating new tiles, bridges, tracks and so on, but if you want to keep those steeper tiles too rough to be used for tracks and stuff, I guess that sheds a new light on this proposal; it just sticks to new tiles only then, making it more realistic to achieve concerning the time it needs to create the extra files...

Offline Severous

  • *
  • Posts: 377
Re: Steeper/Mountainous maps
« Reply #3 on: July 16, 2009, 11:23:05 PM »
I was thinking about a scenario with difficult terrain.  With standard pak 128 we can make a fairly rough terrain.  Admittedly not as steep as those great pictures above..but rough enough to make route building a bit more challenging.



Pity we cant hug the terrain very well. The track on the left cant be connected without earth works.

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: Steeper/Mountainous maps
« Reply #4 on: July 17, 2009, 06:20:06 AM »
It's now the 3rd time in the last ~2 weeks, that I'm get in contact with the ideas of this double slopes :)

Prissi told me, that in past versions (90.x) simutrans could handle slopes with two different gradients. So most of the code is already there, but the part of the code, which generates the images of the slopes out of the lightmaps and the textures has to been rewritten for double slopes. But that should be not more than a little bit copy+paste - and thinking :)

Another problem is, that the generation of the map won't create such steeps slopes very often, therefore 'regular' maps won't have a profit from double slopes. But user-made or heightmap-maps could benefit from it.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Re: Steeper/Mountainous maps
« Reply #5 on: July 17, 2009, 09:14:55 AM »
Also many other issue with way and bridges and so on where not fixed and some new parts do not work. Also instead of 32 tiles per climate this would require like 972 tiles per climate which means with 7 climates a total of 6800 tiles. And it would require new images for the grey maps and transitions. Judging from the work I did last time I would be still quite an effort for very little visual effect. If I have time, I will compile an old version for those who want to try.

Nevertheless, this would still not give realy montains. Remeber one tile is essentially one 1km square! Thus any real high mountion would still cover an immense area.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Re: Steeper/Mountainous maps
« Reply #6 on: July 17, 2009, 08:26:00 PM »
It's now the 3rd time in the last ~2 weeks, that I'm get in contact with the ideas of this double slopes :)
Great minds and all that... :D

Prissi told me, that in past versions (90.x) simutrans could handle slopes with two different gradients.
Wow! Was it playable? And perhaps more interestingly, does anyone know why the feature was removed? Or rather, mothballed, if I'm understanding correctly.

So most of the code is already there, but the part of the code, which generates the images of the slopes out of the lightmaps and the textures has to been rewritten for double slopes. But that should be not more than a little bit copy+paste - and thinking :)

Another problem is, that the generation of the map won't create such steeps slopes very often, therefore 'regular' maps won't have a profit from double slopes. But user-made or heightmap-maps could benefit from it.
Interesting. Presumably the map-generation could itself be "improved" if it were later deemed desirable, as a seperare thing. I just really think that more varied terrain would add to gameplay.

Remeber one tile is essentially one 1km square! Thus any real high mountion would still cover an immense area.
Well now, that could be debated - I know *technically* that's the simutrans definition, but i also know I'm not the only one who puts effort into making my villages and towns look like villages and towns 1-house = 1 house, not abstract representations of something else.

Besides - on a 2048x2028 map, I think one could engineer a sufficiently convincing mountain or three if given the chance...  ;D

Offline Matthi205

  • *
  • Posts: 107
  • Elvish Marshal of the human Wesnothian Army
Re: Steeper/Mountainous maps
« Reply #7 on: July 21, 2009, 01:34:29 PM »
Living in Bulgaria I like that idea!How about curved bridges?

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Re: Steeper/Mountainous maps
« Reply #8 on: July 21, 2009, 08:12:21 PM »
Can we move this thread to "extension requests" ? Given that there's interest, I mean...

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3661
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Steeper/Mountainous maps
« Reply #9 on: July 21, 2009, 08:50:04 PM »
Given Prissi's reply, I don't think it would serve a purpose to move there.

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Steeper/Mountainous maps
« Reply #10 on: August 18, 2009, 02:39:23 PM »
I just found these images from the last time I had a play with 2-height tile graphics. I gave up on this project due to lack of code support in Simutrans, and I haven't really thought about it in my own game project since it's quite complex and, IMO, not the right way to "do" mountains (it would look pretty cool however, and would certainly make the terrain more interesting).

Of course, as others have said, the main problem with this approach isn't the graphics. Changing all the code for tunnel/bridge building, way building, routing, etc. etc. to take account of two different slope steepnesses may not really give the appropriate benefit...

It'd be much better IMO to use the half-height slopes alone, and then make mountains by some other means. Or, better yet, switch to using 3D graphics and have a "proper" heightmap.

Anyway, enjoy the images :)




Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Steeper/Mountainous maps
« Reply #11 on: August 18, 2009, 09:54:17 PM »
IMHO, tunnels should be built only on full slope, as well as bridges. tracks should go only through half slopes (as well as rivers/canals), roads on both. ;)

Offline TrainMith

  • *
  • Posts: 60
Re: Steeper/Mountainous maps
« Reply #12 on: August 19, 2009, 07:05:37 AM »
I'd also like to see "natural" features like a rock ledge where the height difference between two adjacent squares is two or more units.  Actually, I don't think my idea is too difficult:  When raising/lowering terrain in the game, there already is a block and mortar wall graphic. 

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Steeper/Mountainous maps
« Reply #13 on: August 19, 2009, 07:38:57 AM »
I would agree with both the above ideas.  Rail and navigable river should only go up half tiles (otherwise too steep), road, tram, and un-navigable river up whole height tiles, and also allow cliffs, natural vertical slopes, to be generated in map creation.  Would also be good to allow tunnels straight into vertical cliff as well as into whole slopes.  As a non-programmer though, I can dream without worrying too much about practicalities of these ideas...! ;)

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Steeper/Mountainous maps
« Reply #14 on: August 19, 2009, 02:32:05 PM »
a first and simpler approach for map generation could relate slope steepness to height level. from seaside to level 3, the map will have 1/2 slopes, from level 3 to level 6 the map will have full slopes, from level 6 up could have 1+1/2 slopes. obviously these levels need to be adjusted as it happens with climates. the clearance to pass under a bridge or in a tunnel could be set in vehicle specifics (requiring certain vehicles to have a specific clearance, full slope being the default).
indivisual slopes could be adjusted with slope tools.

Offline Amelek

  • *
  • Posts: 70
Re: Steeper/Mountainous maps
« Reply #15 on: August 19, 2009, 03:50:55 PM »
while your double/multiple height in one title seem interesting, I think we could have cool terrain by other simple mod:

Take a look at new map: you will notice that it's extremely smooth. Now, if you take a look at images at top of this topic, you will notice, that they are, in fact, made from high rocky walls. I think, it would be, for now, much easier to alter map making script to create "artificial slopes" in mountains. And I think, this would be sufficient to make it look cool. Maybe altering default max-height of stone wall would be required though.

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Steeper/Mountainous maps
« Reply #16 on: August 19, 2009, 04:42:51 PM »
I did some more thinking, the way I'd do this is to define two different terrain "levels", one for rock, one for "ground". The ground and rock systems would be essentially seperate, with the rock having about 4x the total rise/fall per square as the ground. A two-height system could be implemented here too, though the edge cases would likely start to get complicated. The idea though is that you generate the rock and ground layers independantly using two perlin noise functions (one with a greater persistence value, resulting in much steeper variations in terrain). The ground layer would then be overlayed on the rock one, and where the rock pokes through you get mountains. The rock layer wouldn't be navigable (e.g. you can't build tracks on it) but you can tunnel through it (at higher cost).

The issue with using vertical cliffs (and even tiles "steeper" than the standard Simutrans ones) is that you start to obstruct objects behind the terrain. You could always just have a function to make the mountains transparent in this case though I suppose.

You could extend this further, maybe adding another layer on top of this for even shallower ground. I think two layers, each with two heights would be optimal though. Or even just two layers with single height variation (to reduce the complexity of the tileset). I'd probably want to generate the tileset using 3D methods if the former was attempted (it took me long enough to do that set above!)

You could of course extend this method, using the perlin noise to generate pockets of minerals for industry, or tree cover, or the ground water level (which would lead you to lakes, and then use volumetric flow modelling (highly simplified) to make rivers etc.). But that's outside the scope of this discussion. All features that'll make it into my game engine sooner or later though :)

Honestly though, for this kind of thing a hybrid 3D/2D engine is going to become desirable. The ground tiles in Simutrans are already effectively rendered, you could stick to the rigid isometric grid approach and implement a simple 3D engine to render the terrain and it'd likely look pretty good, much better than restricting to a set of tiles which must be drawn by hand (or you could compromise and meet halfway, have the tiles generated procedurally, for example, I'll likely do it this way).

Offline isidoro

  • Devotee
  • *
  • Posts: 1129
Re: Steeper/Mountainous maps
« Reply #17 on: August 20, 2009, 01:12:31 AM »
A similar approach is the one I'm following for my game.  The map is a mesh of four heights: snow, water, land, and rock, each one on top of the following one.  There will be no restrictions for the difference of height of two adjacent points.  The resulting map is rendered 3D with triangles and it looks tile-based (see the attached images).

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Steeper/Mountainous maps
« Reply #18 on: August 20, 2009, 09:15:06 AM »
Hey Isidoro, I'd like to hear more about your game, do you have a website or anything for it?

Offline isidoro

  • Devotee
  • *
  • Posts: 1129
Re: Steeper/Mountainous maps
« Reply #19 on: August 20, 2009, 11:33:25 PM »
It's in a very preliminary state.  If everything goes well, it will be a city-building transportation game.  My plan is to build a first simple version and documentation before releasing it.  Now, I have:
  • A name
  • Some specifications
  • Something already programmed: the above terrain specification, rivers, forests, residences, 3d rendering with possibility of moving, rotating, and zooming
Attached is an image of terrain rendering as of r16.

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Steeper/Mountainous maps
« Reply #20 on: August 20, 2009, 11:36:51 PM »
Looks very interesting :) Do please keep us updated on your progress, maybe start a thread somewhere on the forum to post updates?


On an unrelated note, I found another old image, demonstrates tiles for higher (1.5x and 2x Simutrans standard) tiles. Along with part of a crazy tileset idea I had which didn't pan out :D


Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Steeper/Mountainous maps
« Reply #21 on: August 21, 2009, 08:16:41 AM »
such a kind of terrain (0 :) - 0.5 - 1 - 1.5 - 2 - ∞ [veritcal]) would be *great* in the game, as shown in the image in the right (the 1tile width stripe)!!!

Offline sojo

  • Devotees (Inactive)
  • *
  • Posts: 851
  • Maintainer pak96.comic
    • German home of Simutrans
Re: Steeper/Mountainous maps
« Reply #22 on: August 21, 2009, 08:42:06 AM »
Isidoro I like it. It would be fine if Simutrans could have so nice mountains.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3661
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Steeper/Mountainous maps
« Reply #23 on: August 21, 2009, 05:52:47 PM »
SimCity3 had such terrain - tile-based and four steepness possible per tile... it would be awesome to have that. :D But of course so much work.

Offline isidoro

  • Devotee
  • *
  • Posts: 1129
Re: Steeper/Mountainous maps
« Reply #24 on: August 21, 2009, 11:00:30 PM »
@Timothy: Thanks.  It will be a matter of years, I guess.  If forum administrators don't mind, you, my friends of Simutrans, will be the first to know when I release something or main progress is made.  Now, I'm fighting with resources and factories.  The simulation is intended to be deeper than ST for residences (they are all like little industries that need to be supplied with food and water or population will die).

@Sojo & Isaac:  one never knows...  Impossible is nothing. :)

Offline colonyan

  • Devotee
  • *
  • Posts: 526
  • Full and Warm
Re: Steeper/Mountainous maps
« Reply #25 on: August 22, 2009, 02:10:37 PM »
@isidoro: Your project seems very,,, very interesting. I wish I've be your help. I wish you a success.
                Other than that, will you open your proper thread, site, blog in near future?

Offline isidoro

  • Devotee
  • *
  • Posts: 1129
Re: Steeper/Mountainous maps
« Reply #26 on: August 23, 2009, 12:57:18 AM »
Thanks. My plan in the (guess far) future is to open the program once the main specifications and goals are settled, upload it to sourceforge or the like, and publish the specifications/manuals on a web site.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Re: Steeper/Mountainous maps
« Reply #27 on: August 24, 2009, 03:21:27 PM »
Unfourtunately Timothy did not had enough tiles. For hieght of 2 you need 86 different tiles. Or you would have only unmanageable rocky tiles.

Offline Maragil

  • *
  • Posts: 249
Re: Steeper/Mountainous maps
« Reply #28 on: August 24, 2009, 03:55:05 PM »
Thanks. My plan in the (guess far) future is to open the program once the main specifications and goals are settled, upload it to sourceforge or the like, and publish the specifications/manuals on a web site.

Wordpress or wetpaint for the manuals :)

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Steeper/Mountainous maps
« Reply #29 on: August 24, 2009, 08:13:37 PM »
Unfourtunately Timothy did not had enough tiles. For hieght of 2 you need 86 different tiles. Or you would have only unmanageable rocky tiles.

still possible to paint tho other :)

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: Steeper/Mountainous maps
« Reply #30 on: August 24, 2009, 08:51:05 PM »
Unfourtunately Timothy did not had enough tiles. For hieght of 2 you need 86 different tiles. Or you would have only unmanageable rocky tiles.
I think, in his first post with images, he had enough: 3^4 = 81

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Steeper/Mountainous maps
« Reply #31 on: August 25, 2009, 07:48:00 AM »
Unfourtunately Timothy did not had enough tiles. For hieght of 2 you need 86 different tiles. Or you would have only unmanageable rocky tiles.

5 more? I made tiles for all possible combinations of the corner heights 0, 1 and 2 (which I assumed to be enough). I'd be interested to know which additional tiles are required?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Re: Steeper/Mountainous maps
« Reply #32 on: August 26, 2009, 03:44:26 PM »
You need all tiles with eges either 0,1,2 for four corners. This is 3*3*3*3 tile = 81 tiles. When I am back I will search for the terrain I sed ofr testing double heights.

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Steeper/Mountainous maps
« Reply #33 on: August 26, 2009, 08:02:48 PM »
That's exactly what I thought/did :) The 8 red tiles are duplicates shifted up a bit, e.g. a tile with corners 0,1,0,0 is the same as a tile with corners 1,2,1,1, just shifted up by 8 pixels. In total there are 81 though. That's referring to the earlier images, not the later one which is just a single-height set with 4 different height values.