Page 2 of 69

Re: New map features

Posted: 12 Feb 2012 22:05
by Eddi
i have my doubts that using special foundation sprites is a good idea in combination with rail- and roadtypes (of different width). what might be more future proof would be affecting the drawing order, i.e. drawing the bridge base of the next tile over the foundation sprite. or providing special bridge ramps for each bridge and trackbit-combination.

Re: New map features

Posted: 14 Feb 2012 16:08
by maquinista
Eddi wrote:i have my doubts that using special foundation sprites is a good idea in combination with rail- and roadtypes (of different width). what might be more future proof would be affecting the drawing order, i.e. drawing the bridge base of the next tile over the foundation sprite. or providing special bridge ramps for each bridge and trackbit-combination.
The original bridges have the same width (road size), because They share lots of sprites.

The problem would be with new GRF bridges, but.... bridges need a lot of changes: more bridges, custom sprite layout bridges, one way bridges for roads....

Re: New map features

Posted: 14 Feb 2012 16:56
by Eddi
yes, exactly. introducing some half-baked "hacks" now will complicate the future changes.

Re: New map features

Posted: 14 Feb 2012 22:02
by cirdan
I have decided against using maquinista's new foundation sprites, at least for now. Although they would nicely fix the glitch with custom bridgeheads heading north, adding them to the patch would involve messing with grf code, and the patch is already too complex to get into new subsystems. Since it is only a minor thing that does not affect gameplay, I have updated the patch to simply ignore the foundation border that heads into the bridge; not the best of fixes, but it should do for now.

Re: New map features

Posted: 26 Feb 2012 14:13
by cirdan
Rebased against current trunk. Also rearranged some of the patches to give the branch a more logical ordering (this rearrangement is ongoing work).

Re: New map features

Posted: 29 Feb 2012 12:52
by tangre
Nice patch, is there some room left in the map array for the "Grass"-patch ? (http://www.tt-forums.net/viewtopic.php?f=33&t=32285)

Re: New map features

Posted: 01 Mar 2012 20:10
by cirdan
I have not looked into that patch in detail but, according to the post you linked to, it requires 8 free bits in the map array. This means that normal rail tiles would have enough spare bits, but bridgeheads would not.

Re: New map features

Posted: 02 Mar 2012 03:33
by Kraks
May be bridgeheads do not need grass?

Re: New map features

Posted: 02 Mar 2012 11:38
by Eddi
i don't see anything fundamentally different to the current situation...

but the whole concept should probably get some general overhaul, e.g. to make it more newgrf-friendly...

Re: New map features

Posted: 04 Mar 2012 15:52
by Chicago Rail Authority
Haven't had an opportunity to try this patch yet (have been away from the game for awhile), but wanted to commend you for taking up the challenge of custom bridgeheads.

Re: New map features

Posted: 07 Mar 2012 14:56
by ZxBiohazardZx
you my friend just made my day, someone pointed this thread out to me and that one works quite well for me, i really hope the offficial devs will have a look at this stuff and try to add this in some way anywhere in the future, Custom BridgeHeads (CBH) is on the wishlist of A LOT of people and it is the only reason i still use TTDP in some of my citygames

Re: New map features

Posted: 07 Mar 2012 18:50
by cirdan
Thanks for your support, Chicago Rail Authority and ZxBiohazardZx.

At the moment I am still polishing the patch sequence, because there are a few things that can be improved, but I consider most of the branch to be already quite stable. If you look at the patch descriptions I gave a month ago (which are somewhat outdated, but not too much), only the last block (custom rail bridgeheads) is still unsettled, because I have not sorted out how to implement signals on bridges yet (yes, that too is on my to-do list). The rest of the branch is more or less finished and ready for review.

Re: New map features

Posted: 08 Mar 2012 12:07
by ZxBiohazardZx
also since you are already on the map features, in TTDP i think it is possible to place houses in cities by control+clicking the stone-tiles you can place. this allows for some real "cityscaping" features in TTDP during scenario creation that i like A LOT

any chance you can have a look at that and try to port it over in here as well?

Re: New map features

Posted: 08 Mar 2012 14:31
by Eddi
afair there is already a patch for that... might be somewhat outdated though.

anyway, that has totally nothing to do with this patch.

Re: New map features

Posted: 08 Mar 2012 16:34
by ZxBiohazardZx
"new map features"

it is related to that in some way, but yeah ill try to see what happend to the old one

Re: New map features

Posted: 08 Mar 2012 23:47
by Eddi
exactly... "new map features" has nothing in common with "new gui features"... except "new" and "feature"

Re: New map features

Posted: 10 Mar 2012 11:47
by HackaLittleBit
cirdan wrote:I consider most of the branch to be already quite stable
Hello Cirdan nice try.
But just reverse train a zillion times while on the bridge head and your chance to crash the game is 1 in 16.
See topic http://www.tt-forums.net/viewtopic.php?f=33&t=50283 and
http://bugs.openttd.org/task/3304

Regards HackaLittleBit

Re: New map features

Posted: 10 Mar 2012 14:02
by cirdan
Now that you mention it... I'm getting crashes every single time.

But, in a sense, it is fine, because it is in the signal code, which I needed to overhaul anyway for signals on bridges. Do not hold your breath, though; I still have to design how signals will be handled, and thinking takes longer than coding.

And I was already aware of your work; there is no sensible way to implement custom bridgeheads without doing away with the terrible hack that is setting the wormhole status midway through the bridgehead/tunnelhead tile. However, when I reached the point where I had to change that, I was already 150 patches away from trunk and decided that trying to adapt your code was going to be more work than doing it myself.

Re: New map features

Posted: 10 Mar 2012 17:47
by HackaLittleBit
The real doubt that I had about my patch was that I was sending vehicles into the path finder with TRACK_WORMHOLE
flag set.
I had not enough knowledge to see the consequences of doing so.
Trackbits should be set the moment vehicle enters or leaves tile and not somewhere else.

EDIT: 'enters or leaves' should be enters and only if vehicle is allowed to enter tile.

Re: New map features

Posted: 19 Mar 2012 21:57
by cirdan
I think I have fixed the crash when turning trains around in a bridge head ("fixed" as in "I can no longer reproduce it"). In doing so I also made some changes to the signal code that will make it easier to add signals on bridges, if I ever try to do so.