The International Simutrans Forum

Development => Extension Requests => Topic started by: Lord Vetinari on April 18, 2010, 05:16:41 PM

Title: Buildings under bridges and viaducts
Post by: Lord Vetinari on April 18, 2010, 05:16:41 PM
I'm not asking to be able to drag bridges over existing buildings, quite the contrary.
I build a viaduct over empty land, a couple of years pass, a nearby city grows or a new industry chain starts, and I end up with skyscrapers or chimneys popping through my elevated ways. Is it possible to limit the size of the buildings that can grow under a bridge or a viaduct?
I know it's not a crucial issue, just wanted to point it out.
Title: Re: Buildings under bridges and viaducts
Post by: gauthier on April 18, 2010, 06:01:22 PM
I entirely agree ;)
Title: Re: Buildings under bridges and viaducts
Post by: Dwachs on April 18, 2010, 07:05:37 PM
Same goes for tree growing through sinkansen tracks (etc)

It is possible to implement such a feature. We are looking for volunteers :)
Title: Re: Buildings under bridges and viaducts
Post by: jamespetts on April 18, 2010, 07:34:57 PM
This would indeed seem like a sensible idea - for elevated ways, too.
Title: Re: Buildings under bridges and viaducts
Post by: neroden on April 29, 2010, 02:53:04 AM
Does a building have a height recorded anywhere in the .pak?

Since I do want buildings underneath viaducts to be possible -- short buildings -- I think having access to a building height is absolutely essential in order for this to happen.  If the height isn't recorded, we need to start recording it before doing anything else.  (Likewise, trees would need recorded heights.)
Title: Re: Buildings under bridges and viaducts
Post by: The Hood on April 29, 2010, 07:32:59 AM
Not currently.  Maybe one should be introduced, with an assumption that its value is height = 1 otherwise?
Title: Re: Buildings under bridges and viaducts
Post by: VS on April 29, 2010, 08:17:29 AM
An even better way to do this would be based on amount of vertical images, since then no new parameter is needed... maybe?
Title: Re: Buildings under bridges and viaducts
Post by: gauthier on April 29, 2010, 08:24:34 AM
It's possible for one tile building but for the others ?
Title: Re: Buildings under bridges and viaducts
Post by: vilvoh on April 29, 2010, 08:26:40 AM
I think you could guess the buidling's height by the content of the dat file, that must be stored in some internal structure inside Simutrans code. I mean, in the dat file, you don't specify the height, but you can guess it by the images set indexes, as VS has suggested.
Title: Re: Buildings under bridges and viaducts
Post by: The Hood on April 29, 2010, 09:35:04 AM
That did occur to me, but some graphics that are 1x1 size would still look too large under a bridge, hence my suggestion for a new parameter.  But maybe it could default to the number of vertical images.
Title: Re: Buildings under bridges and viaducts
Post by: Fabio on April 29, 2010, 10:41:46 AM
The heigth of a bridge could be guessed as it is for its pillars.

That of buildings, from the number of piled images
Title: Re: Buildings under bridges and viaducts
Post by: Amelek on April 29, 2010, 12:44:59 PM
still, 1x1x1 city building is higher then common bridge so it wont really work.

same thing happens underground - you can, for example, dig tunnels under coal mine.
Title: Re: Buildings under bridges and viaducts
Post by: neroden on April 30, 2010, 12:38:47 AM
Quote from: Amelek on April 29, 2010, 12:44:59 PM
still, 1x1x1 city building is higher then common bridge so it wont really work.
Hmm.  The default could require a one level "spacing" between the building (or tree) and the bridge -- a 1-high graphic would be registered as only fitting under bridges at least *2* high.  There should still be some way to actually specify vertical thickness in the .dat files, as this is a very sloppy approximation.

Quote
same thing happens underground - you can, for example, dig tunnels under coal mine.
Now that seems rather more complicated to deal with -- one thing at a time I think....