About push-pull trains
Moderator: OpenTTD Developers
- White Rabbit
- Tycoon
- Posts: 1734
- Joined: 22 Jun 2005 19:15
About push-pull trains
I thought push-pull trains were already possible with OTTD? I can't find the thread anymore, but I read once that you could have a tank engine (such as one from the UKRS) drive backwards if you CTRL+buy it, but it doesn't work. All of my tank engines face forwards and none of them will push the train back once they've pulled them into a station. They just reverse, like usual.
- Born Acorn
- Tycoon
- Posts: 7595
- Joined: 10 Dec 2002 20:36
- Skype: bornacorn
- Location: Wrexham, Wales
- Contact:
- White Rabbit
- Tycoon
- Posts: 1734
- Joined: 22 Jun 2005 19:15
Oh, I must've misread it then, thanks.Born Acorn wrote:CTRL+Buy probably does something else, but CTRL+Click on a tank engine when it's already built to flip it's direction.
But I've seen it in OTTD screenshots.But pushing the train backwards is TTDPatch only, I'm afraid.
Here: http://www.tt-forums.net//files/donding ... 10_171.png
Unless Killer 11 is lying, that coal train in the middle is pushing, not pulling.
EDIT: It's a bit buggy too. I am using r7194. The latest nightly isn't available to me because I'm running Windows.
EDIT 2: Bug report is here: http://bugs.openttd.org/task/417
- Attachments
-
- tank engine bug.PNG (20.32 KiB) Viewed 7047 times
AFAIK are only pull and push-pull trains allowed.
Drag a second engine to the back of the train, if you want it that way.
See the screenshot from current trunk.
Train 6 push-pull = valid
Train 7 pull = valid
Train - push = invalid
Drag a second engine to the back of the train, if you want it that way.
See the screenshot from current trunk.
Train 6 push-pull = valid
Train 7 pull = valid
Train - push = invalid
- Attachments
-
- Lutscher Transport, 8. Nov 1958.png (53.6 KiB) Viewed 6978 times
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
- White Rabbit
- Tycoon
- Posts: 1734
- Joined: 22 Jun 2005 19:15
about pushing trains:
I investigated this a while ago. The problem is that data like orders, train number, profits and so on is stored in the vehicle struct of the front vehicle. Replacing the front engine with another one will only work if we copy the data. Also a train is a linked list of vehicles and they only know the next unit in the train, so to get this to work, the linked list should change all the next pointers. To even think about anything like this, we need to figure out a better way to handle this and make that change without making it a big and potientially buggy hack.
Yes, I did manage to get a train to drive in reverse, but it was way too buggy to actually play with it. Also it could only turn a articulated engine around (made the tender drive in front). This broke so much else that I will not even start to list all of it (should be enough to say that nobody would use it for playing). Since it turned out to be bugs in the design itself, I kind of left the idea at that time as a rewrite and a huge amount of work is needed to fix this.
As for the clipping issue when turning wagons/engines:
Known issue. When I added this feature (control click to turn), I didn't think of short sprites and when it showed up, it turned out to be really tricky to solve. It's a display bug only though. Nothing internally is changed when flipping a vehicle.
I investigated this a while ago. The problem is that data like orders, train number, profits and so on is stored in the vehicle struct of the front vehicle. Replacing the front engine with another one will only work if we copy the data. Also a train is a linked list of vehicles and they only know the next unit in the train, so to get this to work, the linked list should change all the next pointers. To even think about anything like this, we need to figure out a better way to handle this and make that change without making it a big and potientially buggy hack.
Yes, I did manage to get a train to drive in reverse, but it was way too buggy to actually play with it. Also it could only turn a articulated engine around (made the tender drive in front). This broke so much else that I will not even start to list all of it (should be enough to say that nobody would use it for playing). Since it turned out to be bugs in the design itself, I kind of left the idea at that time as a rewrite and a huge amount of work is needed to fix this.
As for the clipping issue when turning wagons/engines:
Known issue. When I added this feature (control click to turn), I didn't think of short sprites and when it showed up, it turned out to be really tricky to solve. It's a display bug only though. Nothing internally is changed when flipping a vehicle.
- Attachments
-
- BR01 (from the DB XL set) driving in reverse. NOT possible in any released code due to the fact that it's buggy by design.
- BR01_reversed.png (6.11 KiB) Viewed 6895 times
- bobingabout
- Tycoon
- Posts: 1850
- Joined: 21 May 2005 15:10
- Location: Hull, England
its now a double report, i made this 1 MONTHS ago: http://bugs.openttd.org/task/165White Rabbit wrote:EDIT 2: Bug report is here: http://bugs.openttd.org/task/417
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
- bobingabout
- Tycoon
- Posts: 1850
- Joined: 21 May 2005 15:10
- Location: Hull, England
"this 1" as in this bug, followed by "MONTHS", it was posted in may, so thats over 6 months ago.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
- White Rabbit
- Tycoon
- Posts: 1734
- Joined: 22 Jun 2005 19:15
Or, to remove any possible ambiguity: "I posted this MONTHS ago."Brianetta wrote:See, this is why we prefer grammatically correct english.bobingabout wrote:"this 1" as in this bug, followed by "MONTHS", it was posted in may, so thats over 6 months ago.
"It's now a double report. I made this one, MONTHS ago:"
Maybe, no, and yes.Scia wrote:Isn't it possible to code a locomotive that is not visible, uses 0 pixels, has 0 hp, and has no max speed,
1) TTDPatch requires that all vehicles except the last be a minimum of 3/8 long, which is 12 pixels in the horizontal view. OpenTTD is free to lower this limit, but if it has, there is no documentation to this effect.
2) A locomotive with 0 hp is more commonly called a "wagon". All locomotives have a minimum of 1 hp.
3) No max speed is difficult, but a max speed of 65536 kph is quite possible, and just as effective.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
what about rotating the graphics of the train, when a train should turn at the end of the line/station, the engine sprite is placed at the last wagon, the first wagon sprite is placed at the last-1 wagon etc, all turned back
the two problems i thought are: engine smoke and sprite length
but the idea might work, the engine is still at the first position... only the chassis is switched
the two problems i thought are: engine smoke and sprite length
but the idea might work, the engine is still at the first position... only the chassis is switched
That is basically how the trick is done in the UKRS. The locomotive is still at the front, and the brakevan is still at the back, it's just the brakevan is changed to look like a locomotive, and the locomotive to look like a brakevan.Wolf01 wrote:what about rotating the graphics of the train, when a train should turn at the end of the line/station, the engine sprite is placed at the last wagon, the first wagon sprite is placed at the last-1 wagon etc, all turned back
the two problems i thought are: engine smoke and sprite length
but the idea might work, the engine is still at the first position... only the chassis is switched
AFAIK, all that is missing to make this work in OTTD is the bit that flips when the train reverses (train variable FF bit 0).
- bobingabout
- Tycoon
- Posts: 1850
- Joined: 21 May 2005 15:10
- Location: Hull, England
AFAIK, the trick in TTDP is done by swaping the graphics of the engine and the last wagon around, hence why it requires a break van at the end.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
- Born Acorn
- Tycoon
- Posts: 7595
- Joined: 10 Dec 2002 20:36
- Skype: bornacorn
- Location: Wrexham, Wales
- Contact:
swapping graphics is no good as it demand a magic vehicle in the end. A real solution would be to somehow tell that a different vehicle is in front. I think I know how to do that, but it would need investigation and a lot of work and I'm not going to do that right now. Maybe it will end up being buggy by design, hence the reason why it needs investigation. At this stage, I will not promis anything except that odds are that it will not be done this year, if at all. Also I can't help thinking if the time spend on such a task is worth it because so much else can be coded with that amount of time.
Pikka's brakevan springs to mind.Bjarni wrote:swapping graphics is no good as it demand a magic vehicle in the end.
Official TT-Dave Fan Club
Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr
Why be a song when you can be a symphony? r is a...
Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr
Why be a song when you can be a symphony? r is a...
all non-cargo trains i've seen have a special end wagon or are dualheaded
for me is not a problem to have all trains dualheaded (the main engine and the brakevan) i'm used to put an engine in the tail because it looks good when turn back
maybe with the ability to have both the standard behaviour and the push-pull behaviour if you don't want the brakevan
for me is not a problem to have all trains dualheaded (the main engine and the brakevan) i'm used to put an engine in the tail because it looks good when turn back
maybe with the ability to have both the standard behaviour and the push-pull behaviour if you don't want the brakevan
Who is online
Users browsing this forum: No registered users and 19 guests