Diagonal Bridges and Tunnels
Posted: 31 Jan 2024 17:19
Any chance of Bridges and Tunnels that run across the diagonals of the squares, please?
The place to talk about Transport Tycoon
https://www.tt-forums.net/
Is it possible? Yes of course it is, that's the entire idea of programming, anything is possible. within reason.Svartypops wrote: ↑31 Jan 2024 17:19 Any chance of Bridges and Tunnels that run across the diagonals of the squares, please?
Why won't they put it in the "real deal", if someone's done it for them?Redirect Left wrote: ↑31 Jan 2024 20:43Is it possible? Yes of course it is, that's the entire idea of programming, anything is possible. within reason.Svartypops wrote: ↑31 Jan 2024 17:19 Any chance of Bridges and Tunnels that run across the diagonals of the squares, please?
Will the devs ever put it in the main game? I would be banned if i put my actual opinion here on all of that.
Your best bet is either figuring out how to do it in a very basic manner yourself and just doing it locally, or trying to convince a patch pack creator to add it to theirs, as jfs said above, its a lot harder than it seems in text.
But without the chance of it being pushed to main, i doubt there is much motivation for anyone to really look at doing it 'properly', as it'd just be a bit of pipe dream, and I've looked into doing it, its a whole heap of work for not much reward given it won't go in the real deal at the end.
It's probably in a patch, so the code may not be compatible with OpenTTD code if it depends on other features in the patch (This is especially important if it's part of a patchpack, most notably JGRPP). Every now and again, you see code backported into vanilla from JGRPP, but it's not all that common. It's also a bit of a niche case, so it doesn't take precedence over current projects like NotRealTime, Area-Based Ship Pathfinding, and Automatic Unbunching, or fixing/finding bugs and inconsistencies.Svartypops wrote: ↑02 Feb 2024 12:00Why won't they put it in the "real deal", if someone's done it for them?Redirect Left wrote: ↑31 Jan 2024 20:43Is it possible? Yes of course it is, that's the entire idea of programming, anything is possible. within reason.Svartypops wrote: ↑31 Jan 2024 17:19 Any chance of Bridges and Tunnels that run across the diagonals of the squares, please?
Will the devs ever put it in the main game? I would be banned if i put my actual opinion here on all of that.
Your best bet is either figuring out how to do it in a very basic manner yourself and just doing it locally, or trying to convince a patch pack creator to add it to theirs, as jfs said above, its a lot harder than it seems in text.
But without the chance of it being pushed to main, i doubt there is much motivation for anyone to really look at doing it 'properly', as it'd just be a bit of pipe dream, and I've looked into doing it, its a whole heap of work for not much reward given it won't go in the real deal at the end.
OpenTTD is open source, it's code is on GitHub where not only can it easily be forked, but it is also open to all code contributions which then go through a code review process to ensure that the code quality meets or exceeds that of the project and that it works consistently without causing conflicts with other parts of the code.kkidslogin wrote: ↑02 Feb 2024 21:26 It's probably in a patch, so the code may not be compatible with OpenTTD code if it depends on other features in the patch (This is especially important if it's part of a patchpack, most notably JGRPP). Every now and again, you see code backported into vanilla from JGRPP, but it's not all that common. It's also a bit of a niche case, so it doesn't take precedence over current projects like NotRealTime, Area-Based Ship Pathfinding, and Automatic Unbunching, or fixing/finding bugs and inconsistencies.
I know, I have been watching the GitHub for a long time. However, there are clear people who are the current devs; I don't know their forum usernames because I just created an account here, but they are: JGRennison (Of the infamous patchpack), 2TallTyler, PeterN, Kuhnovic, TrueBrain, LDPL, Rubidium42, frosch123, glx22, and SamuXarick. It's a rare PR that isn't by these people. And, as aforementioned, they have their own projects for 14.0 in development, or other projects entirely. If somebody wants diagonal bridges, they'll have to implement it themselves, so the maintainers can merge it---and there are very few other people know know the codebase well enough to implement it, given how large of a change diagonal bridges are in lower-level code; it would be a very slow process for most people.kamnet wrote: ↑03 Feb 2024 00:42OpenTTD is open source, it's code is on GitHub where not only can it easily be forked, but it is also open to all code contributions which then go through a code review process to ensure that the code quality meets or exceeds that of the project and that it works consistently without causing conflicts with other parts of the code.kkidslogin wrote: ↑02 Feb 2024 21:26 It's probably in a patch, so the code may not be compatible with OpenTTD code if it depends on other features in the patch (This is especially important if it's part of a patchpack, most notably JGRPP). Every now and again, you see code backported into vanilla from JGRPP, but it's not all that common. It's also a bit of a niche case, so it doesn't take precedence over current projects like NotRealTime, Area-Based Ship Pathfinding, and Automatic Unbunching, or fixing/finding bugs and inconsistencies.
Much of the improvements in OpenTTD over the last few years is because the move to GitHub made it even more open and accessible to others. If ANYBODY out there has the inkling to try to cover the code to implement diagonal bridges and tunnels, then all they have to do is fork the code into their own repository and start hacking it, once they've got it working on their end submit a PR to the dev team through GitHub and then go through the process of officially merging it. It's tedious, but if it work and it works well, the devs are going to accept it, especially if they don't have to put in the extra work and brain power that they can't spare.
Extra hands make light work.
BTW, on a similar tangent, Aegir (aka Reldred) has been working through this process in development of diagonal roads for the last few years. Graphics are drawn and some of the code is working, some is not. So it may take forever but it's proof that things are not impossible.
https://github.com/JGRennison/OpenTTD-patches/pull/603
Thank you very much for the technical insight - that also solves the mystery I have wondered about for a long time why road vehicles cannot turn around on bridges.jfs wrote: ↑03 Feb 2024 21:17 When a vehicle is traveling across a bridge, or through a tunnel, the game puts the vehicle into a special "wormhole mode", where it just keeps traveling at the same height and same direction, until it hits the bridge/tunnel exit, and then it gets changed back to normal travel mode.