New map features

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

Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: New map features

Post 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.
maquinista
Tycoon
Tycoon
Posts: 1828
Joined: 10 Jul 2006 00:43
Location: Spain

Re: New map features

Post 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....
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: New map features

Post by Eddi »

yes, exactly. introducing some half-baked "hacks" now will complicate the future changes.
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post 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.
Attachments
nma-r23944.diff.gz
Simple diff
(275.3 KiB) Downloaded 194 times
nma-r23944.patch.gz
Branch (334 patches)
(571.02 KiB) Downloaded 189 times
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post 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).
Attachments
nma-r23992.diff.gz
Simple diff
(275.79 KiB) Downloaded 188 times
nma-r23992.patch.gz
Branch (335 patches)
(575.4 KiB) Downloaded 189 times
tangre
Engineer
Engineer
Posts: 4
Joined: 29 Feb 2012 12:45
Location: The Netherlands

Re: New map features

Post 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)
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post 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.
User avatar
Kraks
Engineer
Engineer
Posts: 73
Joined: 23 Jun 2010 20:53
Location: Moscow, Russia

Re: New map features

Post by Kraks »

May be bridgeheads do not need grass?
Image
Image
Image
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: New map features

Post 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...
Chicago Rail Authority
Traffic Manager
Traffic Manager
Posts: 134
Joined: 09 Nov 2006 23:38

Re: New map features

Post 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.
Many thanks to those who make OTTD and TTDP possible.
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: New map features

Post 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
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post 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.
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: New map features

Post 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?
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: New map features

Post 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.
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: New map features

Post 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
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: New map features

Post by Eddi »

exactly... "new map features" has nothing in common with "new gui features"... except "new" and "feature"
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post 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
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post 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.
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post 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.
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post 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.
Attachments
nma-r24042.diff.gz
Simple diff
(282.72 KiB) Downloaded 180 times
nma-r24042.patch.gz
Branch (356 patches)
(589.19 KiB) Downloaded 180 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Semrush [Bot] and 18 guests