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

Hafting
Engineer
Engineer
Posts: 102
Joined: 13 Feb 2014 11:22

Re: New map features

Post by Hafting »

Tunnel oddities:
A train came halfway out of a tunnel, and for some reason, it took a wrong turn. So I stopped it and reversed it. Half of the train was still inside the tunnel. (A safe operation when tunnels are not involved - following trains will be stopped behind some path signal, and the reversing train will never reverse through a one-way path signal.) Tunnels turned out to behave differently - the train crashed after reversing only a little into the tunnel. Ok, the tunnel signals are perhaps different from the one-way path signals I otherwise use. Intuitively, reversing into a dark one-way tunnel could be dangerous.

The worse part is that the tunnel never clears. I have fast-forwarded several game years - the train wreck is long gone, but traffic never resumes. All trains on that track is stuck. Demolishing and re-building the tunnel will get trains rolling again, but surely traffic is meant to restart automatically after the wrecks are gone?

The savegame is attached. Made with the latest tracerestrict-cirdan. A few signals have conditionals, but none near this tunnel problem.
Attachments
stucktrains.sav
Savegame with stuck trains, forever waiting to enter the tunnel were a crash once happened.
(1.93 MiB) Downloaded 34 times

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

romazoon wrote:imho it would bother because dragging is much slower than clicking, and so if you want to raise some land (more than one tile up) it s very handy to be able to do it with squares of 2 or 3 or even more (instead of just 1 tile as in a normal game).
Fair enough.
romazoon wrote:Of course the ability to drag is a nice addition, but i would prefer to keep the old behavior than being able to drag ( i don t know if you can keep both, the question would not be raised i supose if you could)
Now you have given me an idea: keep the current interface, but allow to drag when the selected size is 1. Would this be fine with you?
Hafting wrote:Tunnel oddities:
A train came halfway out of a tunnel, and for some reason, it took a wrong turn. So I stopped it and reversed it. Half of the train was still inside the tunnel. (A safe operation when tunnels are not involved - following trains will be stopped behind some path signal, and the reversing train will never reverse through a one-way path signal.) Tunnels turned out to behave differently - the train crashed after reversing only a little into the tunnel. Ok, the tunnel signals are perhaps different from the one-way path signals I otherwise use. Intuitively, reversing into a dark one-way tunnel could be dangerous.
I am aware of this. Reversing a train in a tunnel when there is another train behind it is a recipe for disaster. I could make it so that trains in one-way tunnels cannot reverse, but it would have its own drawbacks, because you may need this to solve a deadlock (start reversing at the last train into the tunnel).
Hafting wrote:The worse part is that the tunnel never clears. I have fast-forwarded several game years - the train wreck is long gone, but traffic never resumes. All trains on that track is stuck. Demolishing and re-building the tunnel will get trains rolling again, but surely traffic is meant to restart automatically after the wrecks are gone?
What do you mean, "traffic never resumes"? Is the signal into the tunnel still red after the crash is cleared?

User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: New map features

Post by romazoon »

cirdan wrote:Would this be fine with you?
that sound like a very good idea ;)

Hafting
Engineer
Engineer
Posts: 102
Joined: 13 Feb 2014 11:22

Re: New map features

Post by Hafting »

What do you mean, "traffic never resumes"? Is the signal into the tunnel still red after the crash is cleared?
I have attached a picture. The tunnel signal is green, but the path signal immediately behind never turns green. Looks like something went wrong with the signalling, when the crash happened in a tunnel.
Attachments
stucktrain.png
Train forever stuck after other trains crashed inside the tunnel shown.
(2.02 MiB) Not downloaded yet

Sallarsahr
Engineer
Engineer
Posts: 20
Joined: 13 Apr 2012 12:54

Re: New map features

Post by Sallarsahr »

The Signal in tunnels and over bridge were ignored by the path singnal (failure in the patch). So at the end of the tunnel something wrong, so the path signal cannot reserve the line for the train.
As a workaround : for and after the tunnel a blocksignal.

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

Re: New map features

Post by Eddi »

am i really the only person in this world that thinks that behaviour totally invalidates the usefulness of the entire patch?
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
te_lanus
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jul 2012 18:04
Location: The Elizabeth Arkham Asylum for the Criminally Insane

Re: New map features

Post by te_lanus »

Eddi wrote:am i really the only person in this world that thinks that behaviour totally invalidates the usefulness of the entire patch?
You are not the only one

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5644
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

I have to ask ... Why does one need to reserve a path on a line that only accomodates one train at a time. I thought that path based signalling was designed to be used only at junctions where a train needs to reserve a safe path through a junction that can accommodate more than one train at a time.

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

Re: New map features

Post by Eddi »

why do you assume there is only ever one path into or out of the tunnel? it is perfectly valid to have a junction right before or right after the tunnel
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5644
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Eddi wrote:why do you assume there is only ever one path into or out of the tunnel? it is perfectly valid to have a junction right before or right after the tunnel
There is no junction in the screenshot.

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Hafting wrote:I have attached a picture. The tunnel signal is green, but the path signal immediately behind never turns green. Looks like something went wrong with the signalling, when the crash happened in a tunnel.
Did I mention that I never test crashing trains? The tunnel entrance was left with a stale reservation because of the train that had reversed. I have pushed a fix to the repo; if you already have such a stale reservation in your game, you can fix it by telling the stuck train to ignore the red signal.

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5644
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

cirdan wrote:I have pushed a fix to the repo
:bow:
For those unguaranteed stale reservations we have an unguaranteed Win32 binary fix:
OpenTTD-REBASED-r27339-g87a86b4d-Win32.7z
Cirdan's New Map Features
(5.44 MiB) Downloaded 33 times
and from JGR :bow:
OpenTTD-432d77bb-tracerestrict-cirdan-Win32.7z
JGR's tracerestrict
(5.46 MiB) Downloaded 24 times
Enjoy! :D

TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Lightyears after Wallys windows version here are my versions for as usual Ubuntu.
Thanks cirdan and jgr :bow:
Attachments
openttd-custom-g87a86b4d-UNIX.tar.xz
Version: -g87a86b4d
Ubuntu 14.04 64bit
(4.61 MiB) Downloaded 25 times
openttd-custom-g432d77bb-tracerestrict-cirdan-UNIX.tar.xz
Version: g432d77bb-tracerestrict
Ubuntu 14.04 64bit
(4.64 MiB) Downloaded 22 times

notafrog
Engineer
Engineer
Posts: 14
Joined: 13 May 2014 17:43

Re: New map features

Post by notafrog »

Hello Cirdan. Congratulations on your work and commitment. I like the look of these features which address a few of my pet peeves in OpenTTD.
I've only just stumbled across this topic and see there are 44 whole pages, so I wonder if anyone can point me to a list of all the current features in case I have missed any. I'm not expecting a manual but a summary would be nice.

A feature on my wish list that I haven't seen mentioned here, but which I would guess is related to this work, is signals on railway junction tiles, at least on the straight branch, to avoid having to leave an extra tile before converging tracks. It would be a massive help when trying to tuck a large station into a busy city centre and/or when constructing complicated junctions.
junction signal.jpg
junction signal.jpg (20.04 KiB) Viewed 1503 times
As an unrelated shot in the dark, on the cargo handling front I'd love a way of specifying minimum percentage loads for vehicles at stations instead of the current full or empty choice. I know there are kludges like oscillating the train in the station until it achieves the desired percentage. And I know that there's even a patch, but it's a quick and dirty one involving hijacking conditional instructions.

Thank you to everyone who has contributed to this valuable project.

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

notafrog wrote:Hello Cirdan. Congratulations on your work and commitment. I like the look of these features which address a few of my pet peeves in OpenTTD.
Well, thank you.
notafrog wrote:I've only just stumbled across this topic and see there are 44 whole pages, so I wonder if anyone can point me to a list of all the current features in case I have missed any. I'm not expecting a manual but a summary would be nice.
The first post in this thread lists the most prominent ones (look under "update").
notafrog wrote:A feature on my wish list that I haven't seen mentioned here, but which I would guess is related to this work, is signals on railway junction tiles, at least on the straight branch, to avoid having to leave an extra tile before converging tracks. It would be a massive help when trying to tuck a large station into a busy city centre and/or when constructing complicated junctions.
It would be nice, but I wonder how easy it would be to implement. Too many things in the code depend on junctions not having signals.
notafrog wrote:As an unrelated shot in the dark, on the cargo handling front I'd love a way of specifying minimum percentage loads for vehicles at stations instead of the current full or empty choice. I know there are kludges like oscillating the train in the station until it achieves the desired percentage. And I know that there's even a patch, but it's a quick and dirty one involving hijacking conditional instructions.
Vehicle orders could really use some improvement, but so far I have been unable to find a clear, usable spec that is better than the current one and deals with all kinds of vehicle "components" (train wagons, articulated parts, aircraft cargo holds) in a sane way: You may want to say "load 60% of this cargo, and 40% of that one"; or to leave certain wagons empty; or to refit a wagon to a specific cargo, but the next one to any cargo available. Once you are up for this, there are so many things you can sensibly ask for, and I cannot see the "right" way to do it.

Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: New map features

Post by Supercheese »

You could achieve similar results by allowing station tiles to have signals, rather than junctions to have signals. No idea which would be more feasible, though.
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton

notafrog
Engineer
Engineer
Posts: 14
Joined: 13 May 2014 17:43

Re: New map features

Post by notafrog »

notafrog wrote:As an unrelated shot in the dark, on the cargo handling front I'd love a way of specifying minimum percentage loads for vehicles at stations instead of the current full or empty choice.
cirdan wrote:Vehicle orders could really use some improvement, but so far I have been unable to find a clear, usable spec that is better than the current one and deals with all kinds of vehicle "components" (train wagons, articulated parts, aircraft cargo holds) in a sane way: You may want to say "load 60% of this cargo, and 40% of that one"; or to leave certain wagons empty; or to refit a wagon to a specific cargo, but the next one to any cargo available. Once you are up for this, there are so many things you can sensibly ask for, and I cannot see the "right" way to do it.
Well I did say it was a long shot, so please don't think I'm hounding you.
My motive is quite simple really. Stop vehicles leaving without a decent payload, but don't keep them waiting forever to fill up. The load division isn't really important, just make sure there is enough total cargo to make the journey worthwhile.

If game scripts could control all the parameters that AI scripts control, I wouldn't even be raising the matter. As far as I can determine, programming a solution in Squirrel would be quite trivial, the idea being to intercept any conditional order that jumps to the very next order on the list. Such an order would serve no meaningful purpose if used in normal play, but it does give a way of specifying a percentage load, and it would actually look as though it made sense:
1. Go to Baltimore (far end)
2. Jump to 3 if load more than 30%
3. Go to Chattanooga
But I digress... :oops:
Supercheese wrote:You could achieve similar results by allowing station tiles to have signals, rather than junctions to have signals. No idea which would be more feasible, though.
Well, maybe, maybe not. I have junctions with no stations involved where that extra tile makes life difficult.

Besides, if for example the last tile in a station had a signal, how would that differ functionally from just not having a station on that tile? If the train has to stop at the signal, there might as well be no station where the signal is. Or am I missing something? ?(

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

Re: New map features

Post by Eddi »

cirdan wrote:
notafrog wrote:A feature on my wish list that I haven't seen mentioned here, but which I would guess is related to this work, is signals on railway junction tiles, at least on the straight branch, to avoid having to leave an extra tile before converging tracks. It would be a massive help when trying to tuck a large station into a busy city centre and/or when constructing complicated junctions.
It would be nice, but I wonder how easy it would be to implement. Too many things in the code depend on junctions not having signals.
i always imagined that signals should actually be between the tiles, instead of on them. (converting from the old method to the new method would be troubling, though)
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

I have updated my branch. Only a few user-visible changes this time, but one of them is a crash:
  • You can now terraform by dragging in the scenario editor, if the selected tool size is 1.
  • You can now place individual houses in the scenario editor. Many thanks to adf88 for most of the work!
  • Fixed a crash with the optimised (sprite-caching) blitters when the GUI zoom level was set lower than the minimum viewport zoom level, as the sprites required for the GUI were not encoded by the blitters.
notafrog wrote:Well I did say it was a long shot, so please don't think I'm hounding you.
Oh, not at all. I welcome suggestions—it is only that this is something that I had already considered myself, and I was sharing my thoughts on the matter.
notafrog wrote:
Supercheese wrote:You could achieve similar results by allowing station tiles to have signals, rather than junctions to have signals. No idea which would be more feasible, though.
Besides, if for example the last tile in a station had a signal, how would that differ functionally from just not having a station on that tile? If the train has to stop at the signal, there might as well be no station where the signal is. Or am I missing something? ?(
I think that the signal should behave as if placed at the end of the platform, unlike normal signals, which are placed at the middle of a tile and make trains stop at the previous tile.

TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Big thanks for the new version, Cridan.
Here is the unmodified NMF Ubunutu 14.04 64 bit version first.
And now for the JGR modified version.

Thank you both for your hard work :)
Attachments
openttd-custom-ga12d6691-UNIX.tar.xz
Version:ga12d6691
Ubuntu 14.04 64 bit
(4.63 MiB) Downloaded 30 times
openttd-custom-g9b376707-tracerestrict-cirdan-UNIX.tar.xz
Version: g9b376707-tracerestrict-cirdan
Ubuntu 14.04 64bit
(4.65 MiB) Downloaded 36 times
Last edited by TrueSatan on 05 Oct 2015 20:20, edited 1 time in total.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests