Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu May 23, 2013 7:56 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Mon Oct 31, 2011 8:50 pm 
Offline
Engineer
Engineer

Joined: Thu Jun 23, 2011 8:33 pm
Posts: 4
Hello,

To be honest I'm not sure if this is already discussed (I did a quick search and pecked through a post on shunting, which is a bit more advanced), but would it be possible to have a setting that causes trains to physically move backwards when reversing, instead of magically flipping in the opposite direction?

The reason that I ask this is that after playing this game on and off for the last 15 years, I find myself trying new things with track layouts. Realistically, with major through stations trains would use short loops to turn themselves around. Of course, when I try this, I often get messages to say that the train is lost, even though two seconds later it's heading in the right direction.

This will probably come back to the shunting post I mentioned earlier though, in that the path-finding algorithm would need to be redesigned to understand what a backwards-moving train can do.

Still, throwing it out there. :)


Top
 Profile  
 
PostPosted: Mon Oct 31, 2011 9:09 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6117
Location: The Netherlands
This is already possible via NewGRF, although only very few trainsets provide that feature.
Of course, NewGRF authors only implement this for trains that have a cab control on the other end.

_________________
FooBar's Tram Tracks | TransRapid Track Set | Metro Track Set | OpenGFX base graphics set | FIRS Industry Replacement Set
Dutch Tram Set | Dutch Trainset 2 | Dutch Road Furniture


Top
 Profile  
 
PostPosted: Mon Oct 31, 2011 10:34 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 4576
FooBar wrote:
This is already possible via NewGRF, although only very few trainsets provide that feature.
honestly, this is a huge hack, and tedious as well... this should really be a game feature, and the newgrf just provides a push-pull callback that says "yes, this train can go backwards".

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
 Profile  
 
PostPosted: Mon Oct 31, 2011 10:58 pm 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 4395
Eddi wrote:
honestly, this is a huge hack, and tedious as well... this should really be a game feature, and the newgrf just provides a push-pull callback that says "yes, this train can go backwards".

Ah! Sounds like you´re working on a patch ... :P

regards
Michael

_________________
Image


Top
 Profile  
 
PostPosted: Tue Nov 01, 2011 9:23 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Wed Mar 30, 2005 9:43 am
Posts: 1465
I started one once...

_________________
He's like, some kind of OpenTTD developer.


Top
 Profile  
 
PostPosted: Tue Nov 01, 2011 9:52 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 4576
michael blunck wrote:
Ah! Sounds like you´re working on a patch ... :P

not any more than when i said the same thing a year ago... :p

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
 Profile  
 
PostPosted: Sat Nov 05, 2011 12:06 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6117
Location: The Netherlands
I've been thinking some more about this, and concluded that the current NewGRF feature to accomplish this is insufficient.

Imagine an MU of type A and one of type B combined as one train. Reversing something like this in NewGRF code is very annoying, as A needs to be aware of B and both need to be able to change to one anothers liveries. This is a lot of work and gets even worse if A and B are not of the same length.

While I'm unable to write a patch myself (I don't have the time to learn how to do that and then actually make it) unfortunately, I do like to post some suggestions of my own that could help others to become interested in this and help with a useful implementation.

- Add a new NewGRF property+callback "is cab control". If both the first and the last vehicle in the train have this property set, the train is allowed to be reversed. This will avoid reversing goods trains without a cab control or engine on the other end and the current behaviour is used in such cases.
- The game code will handle the actual reversing, not NewGRF. Of course only if it has been establish that the train is actually allowed to be reversed.
- Existing NewGRFs will not be broken, as they don't have the new property set and existing behaviour is used.

_________________
FooBar's Tram Tracks | TransRapid Track Set | Metro Track Set | OpenGFX base graphics set | FIRS Industry Replacement Set
Dutch Tram Set | Dutch Trainset 2 | Dutch Road Furniture


Top
 Profile  
 
PostPosted: Sat Nov 05, 2011 4:21 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 4576
the reviseed newgrf spec is IMHO the smaller problem. the bigger problem is preparing the code to support it.

lots of places that currently handle only front engines must actually handle the end vehicle. lots of places that traverse the vehicle chain from front to back must traverse it from back to front. others must not be changed.

for the spec you might think about whether the callback needs to be called only for front and back, or also for middle vehicles.

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google Adsense [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000-2013 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2013.
Hosted by Zernebok Hosting.