More diesel_smoke patch

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

Post Reply
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

More diesel_smoke patch

Post by SirkoZ »

I know it's tiny and quite cosmetic, but it's cute and
TTDPatch has it too. :-)

Locomotives' smoke is more thick and they emit it up to
higher speed - looks really nice.

The patch was made with the source r2653, I didn't
install the latest one yet - it's only 2 changes/additions
to one line. ;-)

S/Z
diesel_smoke_sz_1-0_r2653.patch
(580 Bytes) Downloaded 944 times
----------------------------------------------------------------------------------------

Due to popular demand - also on the first page 3.2b (w/ settings) for trunk r20362+ and plain 3.1 for 1-0-2. :-)
diesel_smoke_sz_3-2b_r20362_trunk.patch
(7.83 KiB) Downloaded 293 times
,
diesel_smoke_sz_3-1_1-0-2_trunk.patch
(3.66 KiB) Downloaded 287 times
.
Last edited by SirkoZ on 05 Aug 2010 10:25, edited 13 times in total.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Hmm, would that not cause a diesel engine that doesn't reach 80mph to always emit "smoke"? Though, of course, being an older model, it might...

Perhaps it could be related to the engine's maximum speed.
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

peter1138 wrote:Perhaps it could be related to the engine's maximum speed.
I guess it would be better to relate it to how much power the engine delivers. Even at max speed, you get diesel smoke if you pull say 1000 tons. Maybe the amount should be related to how many HP the engine currently delivers.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

I agree, just some time ago I saw a train with diesel engine (in my town) and many (>20) carriages, it was some 500 metres from the station it started and it was accelerating (going some 50km/h when I saw it) and it was emitting quite some diesel_smoke. :)

I'll try to make it, that the diesel_smoke depends more on hp and tonnage of train the engine pulls.

BTW, peter1138, I set the limit of smoke at 79km/h, so the MJS (tiny tropic locomotive) doesn't smoke at full speed (80km/h). :wink:
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Post by peter1138 »

*nod*

I didn't expect it to be in km/h :-)
User avatar
Villem
Tycoon
Tycoon
Posts: 3310
Joined: 28 Aug 2003 09:38

Post by Villem »

The amount of diesel smoke also depends on the trains configuration.
There are considerable diffrences on diesel smoke emittance between countries, and train models..
Maybe you could work with HackyKid for a feature to allow grf's influence how much diesel smoke a train can emit at max?
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

I could, Akalamanaia, but I honestly don't think the emissions depend too much on diesel trains' type, well - maybe with the older engines, that use fuel less efficiently (more amorphic carbon in exaust). :lol:

In any case - here is the improved patch, that takes into account train's speed, weight and power to determine how dense smoke is emitted.

The second locomotive may not emit smoke so often as the first, but I don't know really how to fix it... :-(
Attachments
diesel_smoke_sz_1-1_r2653.patch
(661 Bytes) Downloaded 662 times
Singaporekid
Tycoon
Tycoon
Posts: 1966
Joined: 21 May 2004 07:39
Location: Singapore

Post by Singaporekid »

Woohoo! Always wanted a patch like this!
So what about more steam for the steam locomotives? :P
<+Raichase> ugh, I just ate some of my beard D:
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

SirkoZ wrote:I could, Akalamanaia, but I honestly don't think the emissions depend too much on diesel trains' type
Believe what you want, but it's a known fact that differerent types of diesel engines (often different manufactors) emits different amount of excaust smoke and different colour of the smoke, but I think this is an overkill for OTTD to include.
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

SirkoZ wrote:The second locomotive may not emit smoke so often as the first, but I don't know really how to fix it... :-(
like...

Code: Select all

for i=2 to NumberOfTrains do
 Train(i) smoke = Train1 smoke;
?
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Singaporekid wrote:Woohoo! Always wanted a patch like this!
So what about more steam for the steam locomotives? :P
How much more?
Singaporekid
Tycoon
Tycoon
Posts: 1966
Joined: 21 May 2004 07:39
Location: Singapore

Post by Singaporekid »

SirkoZ wrote:
Singaporekid wrote:Woohoo! Always wanted a patch like this!
So what about more steam for the steam locomotives? :P
How much more?
3 times more?
Maybe you could make a screenie and we'll see from there
<+Raichase> ugh, I just ate some of my beard D:
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Bjarni wrote:
SirkoZ wrote:I could, Akalamanaia, but I honestly don't think the emissions depend too much on diesel trains' type
Believe what you want, but it's a known fact that differerent types of diesel engines (often different manufactors) emits different amount of excaust smoke and different colour of the smoke, but I think this is an overkill for OTTD to include.
Indeed. You can easily draw some more smoke sprites with colours ranging from blue and even white (cold engine) to black (worn engine) with brown in the middle, but that comes with better .grf support...
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

MeusH wrote:
SirkoZ wrote:The second locomotive may not emit smoke so often as the first, but I don't know really how to fix it... :-(
like...

Code: Select all

for i=2 to NumberOfTrains do
 Train(i) smoke = Train1 smoke;
?
Thanks - I'll look into it....
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Singaporekid wrote:
SirkoZ wrote:
Singaporekid wrote:Woohoo! Always wanted a patch like this!
So what about more steam for the steam locomotives? :P
How much more?
3 times more?
Maybe you could make a screenie and we'll see from there
OK....will do.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Here's another thought... dunno how realistic it is: sparks could also depend on the vehicles age, i.e. an older vehicle's pantograph could be worn, and cause sparks to be produced more frequently.
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

SirkoZ wrote:
Bjarni wrote:
SirkoZ wrote:I could, Akalamanaia, but I honestly don't think the emissions depend too much on diesel trains' type
Believe what you want, but it's a known fact that differerent types of diesel engines (often different manufactors) emits different amount of excaust smoke and different colour of the smoke, but I think this is an overkill for OTTD to include.
Indeed. You can easily draw some more smoke sprites with colours ranging from blue and even white (cold engine) to black (worn engine) with brown in the middle, but that comes with better .grf support...
the white smoke is actually steam made then the hot excaust gas enters the cold excaust pipe.
Black smoke means it burns really badly, often indicating that it burns lubeoil.
It's not just better grf support, which is needed to wary the colour of smoke, we need more than 8 bit colours to make it look nice

As for steam, it would look nice if we got two different sizes of clouds, the current one and a much smaller one. Each time a steam puff is made, it should check speed and then the last big steam puff was made. When braking and standing still, only small clouds are used, then accelerating, a big one is made whenever a piston reaches the end, which means it gradually makes more big ones while accelerating until full speed where only big ones are made

However I think time can be better spent elsewhere :wink:
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

peter1138 wrote:Here's another thought... dunno how realistic it is: sparks could also depend on the vehicles age, i.e. an older vehicle's pantograph could be worn, and cause sparks to be produced more frequently.
I'm not really sure about this. Pantografs get worn and replaced. They are often younger than the engines themselves, however more sparks are made during the winter since the catenary often get ice on them. Whenever a pantograph hits a tiny piece of ice, it gets nocked off, but the pantograph "jumps" downward for a moment, making an airgap between the pantograph and the catenary. Due to the high voltage and current, a spark/ligthning will show up until they are reconnected
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

Yup, and let me tell you that night trips in moutain trains in winter are beautiful. You get some strong green-blue sparks that reflect on the snow, so the whole surroundings of the train, flash from black to green-blue to black.

Really enjoyable... (but sadly, it's quite hard to take of picture of the phenomenon).
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Semrush [Bot] and 12 guests