Page 7 of 11

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 21 May 2012 16:46
by Snail
Yes, I would also love to have something like that!

Unluckily, the way OTTD works now makes it border on impossible; at best, it would need an extremely convoluted code. The problem here is that we would need to swap all the wagons with their corresponding one from the other end (the first with the last; the second with the second-to-last; and so on), while, at the current state of things, wagons in a train have no information about the other wagons. They can only access the engine. So, the first wagon doesn't know anything about the last wagon.

This is also the source of problems for push-pull trains, and the reason why push-pull can only work in a limited number of trains (namely, when the train is perfectly symmetric).

Ideally, it would be great if push-pull could be embedded in OTTD in some way... :p

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 21 May 2012 19:08
by michael blunck
Snail wrote: [...] while, at the current state of things, wagons in a train have no information about the other wagons. They can only access the engine. So, the first wagon doesn't know anything about the last wagon.
Well, OTTD since r22997 implements var61 ("query variable of n-th vehicle in chain"), which means a coach may indeed access a number of variables of another coach in a consist.

But still ...

regards
Michael

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 21 May 2012 22:03
by Supercheese
The way NARS and UKRS do push-pull trains is basically a giant hack, IIRC, where the sprites of the engine and trailing wagon are swapped at turn around.

http://users.tt-forums.net/pikka/wiki/i ... ontrol_Car

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 21 May 2012 22:50
by Eddi
it's of course everybody's own decision whether he wants to invest time in this kind of hack. but my personal opinion is that as soon as you have various vehicle lengths, it's practically impossible to do.

PS: NARS/UKRS of course were implemented before var61 was available, so they had no option to handle the middle wagons.

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 22 May 2012 06:58
by michael blunck
Supercheese wrote: The way NARS and UKRS do push-pull trains is basically a giant hack, IIRC, where the sprites of the engine and trailing wagon are swapped at turn around.
You already pointed it out recently in one of the old (digged) "push-pull threads"
http://www.tt-forums.net/viewtopic.php? ... ad#p993550

But anyway, this is known for ages, and indeed it´s me who was using this "hack" in a newGRF first (BTW, exactly 6 years ago (May 22, 2006)! :cool: :
http://www.tt-forums.net/viewtopic.php? ... ad#p446439
Eddi wrote: it's of course everybody's own decision whether he wants to invest time in this kind of hack. but my personal opinion is that as soon as you have various vehicle lengths, it's practically impossible to do.
Yeah, this was also pointed out even 6 years ago:
http://www.tt-forums.net/viewtopic.php? ... ad#p523935
http://www.tt-forums.net/viewtopic.php? ... ad#p524081
And http://www.tt-forums.net/viewtopic.php? ... ad#p524093 (w/r to var61 functionality).

Conclusion: no real progress since 6 years (except var61, which o/c doesn´t remove "the hack"). :cool:

regards
Michael

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 22 May 2012 07:59
by Supercheese
Indeed, a hack it may be; still, it certainly does work. :D

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 22 May 2012 09:23
by arikover
It certainly looks like a lot of trouble with the code. Thank you all for the explanations!

What about a less ambitious feature then? Flipping the engine alone when reversing at stations (like the tank engines do in UKRS2)?

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 22 May 2012 12:48
by Snail
arikover wrote:It certainly looks like a lot of trouble with the code. Thank you all for the explanations!

What about a less ambitious feature then? Flipping the engine alone when reversing at stations (like the tank engines do in UKRS2)?
I think this could be doable. I'll do some tests in the next few days!

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 22 May 2012 13:58
by FooBar
Flipping the engine alone should be fairly trivial. For articulated engines (steamers with tender) it's a bit more work, but for single engines it's not much more than adding an extra set of sprites and making a decision on which version to show based on a single variable.

Real push-pull trains really should be supported from the game, without extra work for the newgrf developer (other than maybe setting a flag to allow/disallow it for certain vehicles).

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 22 May 2012 15:02
by Eddi
engines with tender are typically not going backwards. pushing the tender has some stability issues (amongst others), usually resulting in low speeds (ca. 40km/h for most engines). the german railway produced some engines that could go 80km/h both ways (BR 50/BR 52 - "War engine") in the late stages of steam engine development.

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 22 May 2012 15:58
by FooBar
You may have a point there :P
That makes it even easier to implement a feature like this, as most articulated engines can be skipped.

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 22 May 2012 19:44
by Snail
Indeed, I've already got that system in place for asymmetrical DMUs, in my development version (the railcar doesn't flip at the end of line, but it simply drives "in reverse" in the opposite direction). It won't be a hard task to extend this behavior to engines, too.

And yes, I'm also planning to implement push-pull as a simple sprite exchange between the loco and the driving trailer. We should really have this feature implemented in OTTD. Perhaps we should start laying down some schemes to help the OTTD developers to make this happen?

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 03 Sep 2012 04:24
by Snail
Hello everyone,

I'm finally back with an update to this set!

These months have been quite busy with real life (new job, which meant moving - again...) but I managed to find some time to add a few extra features to the NG set. So, what's new?

1. New trains! The new entries include:
* 2 small diesels (the HGm 2/3 rackrail shunter of the Montenvers railways, close to Chamonix, and the widespread Schöma CFL150 of 1973);
* 2 diesel railcars (the De Dion JM railbus of 1923 and the Renault NK of 1924);
* 3 EMUs (the electric railcars built for SGLM in 1913, those built for the Annemasse-Sixt line, close to the Swiss border, and the rackrail EMU built in 1953 for the Montenvers railway); and
* a new electric locomotive, also from the Annemasse-Sixt line.

2. I added the push-pull feature to a few trains;
* The two rackrail engines (021T steamer and HGm 2/3 diesel) now support the newly introduced driving trailer and, provided the consist is only made of bogie-mounted passenger coaches (other than the engine and the driving trailer), will travel with the engine pushing the consist upon reaching the end of the line. This also applies to one of the largest diesels, which will support the driving trailer if built from 2005 on, and will be able to do push-pull even if coaches of different liveries are present in the consist;
* Those engines which don't support a driving trailer will still exhibit push-pull like behavior. In certain cases, determined by OTTD's limitations, a consist reaching the end of the line will do its return trip with the engine attached to the other side of the consist, driving in the reverse (meaning that, if previously driving with the cab in the back, it will now drive with the cab in the front) while the rest of the consist will not flip like it normally does in TTD, but it will drive backwards, with the engine attached to the other end, just as it was suggested by Arikover. OTTD limitations only allow this to happen (1) in certain consists only made of 2-axle passengers coaches or mail vans, or (2) in certain consists only made of bogie-mounted passenger coaches.
* Most railcars or MUs are now bidirectional, meaning that they will now simply switch the lights and drive "in reverse" when they reach the end of line, as opposed to OTTD's default behavior. The set also includes a new "railcar trailer", which can be attached to diesel railcars and, when attached to a Billard A80D railbus, can work as a driving trailer too.

The current playtesters have already been sent the new *.GRF through private message. The ReadMe file has been updated in the first post (please refer to it to download).

Of course, new applicants are always welcome. :) Don't hesitate to reply here to report bugs, incoherences, or suggestions. The next release will probably be the final one, so any comments are more than appreciated. As a matter of fact, there are "only" 15 vehicles (all railcars) more to go!

Cheers,
Jacopo

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 03 Sep 2012 23:36
by V453000 :)
I really like how you draw the sprites. :!: :!: :!:

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 05 Sep 2012 16:09
by arikover
Bravo maestro! This is really great work!

And you did manage to implement the reverse-engine-but-not-the-consist thingy! Really amazing!
I began a new game right away, and enjoyed the graphics of the new rolling stock you included.

I have a bug to report though :twisted:

The refit price of the bogie passenger coach is really high when attached to following engines :
Steamers :
  • -031T SGLM,
    -031T (CFCorses livery),
    -040T37,
    -040T (Industrial livery),
    -020 020T (CFCorses POCorrèze Twys Ille&Vilaine liveries),
    -030 030T (Vivarais livery only),
    -120T (POCorrèze livery),
    -141T,
    -150T,
    -230T (Provence livery only)
Railcars :
  • -Thomson-Buire railcar
Diesel :
  • -BB600 (CFCorses livery),
    -BB400 (CFCorses POCorrèze liveries)
Electric :
  • -Thury,
    -Sécheron
In fact, when attached to one of these engines, the cost to refit a bogie coach (change class, most of the time) is about £20k.

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 06 Sep 2012 01:20
by Snail
arikover wrote:Bravo maestro! This is really great work!
Merci mon vieux :) I appreciate your kind words.
arikover wrote:I have a bug to report though :twisted:
Whoops :oops: I didn't really notice that one. It was due to the new push-pull feature tampering with the refitting cost scheme in my code (a few lines were overwritten). Fixed now. Thank you very much for your prompt and precise report! :D

Although this would hamper gameplay quite a bit (you won't be able to refit to higher classes at a reasonable price in the affected cases), I will hold on before publishing a fix, since Oberhümer pointed out a few inconsistencies with my graphics and I agree with him (the Schöma diesel shunter seems bigger than the SLM rackrail diesel in my set, while it's the other way around in reality). So I will fix that as well.

And of course I'll wait for other bug reports :)

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 05 Oct 2012 07:39
by DanMacK
I like the set so far! but any possibility to get it playable in the other climates? ;)

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 05 Oct 2012 12:09
by Snail
The idea would be to make a tropic version with Algerian trains, and possibly an Arctic version with only the trains used on the Alps. But no promise about when they'd get released (especially the tropic version, which would basically be just as different as a brand new set) :P

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 05 Oct 2012 12:49
by planetmaker
Wouldn't it make sense to allow the trains in all climates. And just add the modifications and amendments you mention when they become available, possibly making the selection of French / Algerian / ... whatever theme via parameter instead of hard-coded to climate?

Re: French Trains Set - Narrow Gauge: Playtesting phase

Posted: 05 Oct 2012 14:37
by Snail
I don't know how convenient it would be to keep the three versions in one GRF file, to be chosen through a parameter.
The tropic one would be a totally different set, with just some freight wagons as overlap. The Alpine one would be a subset of the existing one, with a more limited choice of liveries for the available vehicles.
I still haven't explored to what extent adding a parameter would complicate the code. Honestly my priority now is to get at least the temperate version done (and my TTD time is sonewhat limited...)