Timberwolf's UK.... trains?

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

The first couple of island platform objects are now coded:

Image

They also have "inner" variants which are draggable, so you can do things like this:

Image

Or this:

Image

And a whole bunch of other combinations to match the existing "inner" and "outer" platform options.

More such tiles to come, but I feel like the set is starting to get some options to bridge that suburban gap between barebones rural stations and glass-roofed station halls.
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: Timberwolf's UK.... trains?

Post by mak »

A problem, game started 1952 and whether this is relevant to your GRF or a clash with another GRF
Nadtown Transport, 1952-12-19.png
(1.56 MiB) Not downloaded yet
Nadtown Transport, 1952-04-11.sav
(418.14 KiB) Downloaded 132 times
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

mak wrote: 19 Nov 2020 14:51 A problem, game started 1952 and whether this is relevant to your GRF or a clash with another GRFNadtown Transport, 1952-12-19.pngNadtown Transport, 1952-04-11.sav
Which version of OpenTTD are you using? I tried loading it in 1.10.3 but got a "Savegame is made with newer version" error.
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: Timberwolf's UK.... trains?

Post by mak »

Thank you for the quick response,I am using JGR 39
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

This is weird - I've loaded the game in JGR 0.39.0, and I can't reproduce it. No drunken trains for me, they are all pointing in the correct direction.

One thing I did notice is the save file is older than the game in the screenshot, and doesn't have any trains built yet. Could you upload a save which has trains running and showing the problem?
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: Timberwolf's UK.... trains?

Post by mak »

My fault uploaded wrong save :oops:
Nadtown Transport, 1952-12-03.sav
(424 KiB) Downloaded 103 times
Trains do the shift when they move to another track and can correct when changing to another. ie junctions.
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

I'm stumped :/

JGR 0.39.0, same save game, and it's looking like this for me:

Image

Possibly a platform-specific issue? I'm using the Windows 64-bit build, are you using something else?

Also, do you have any custom blitter set? (I tried a couple, but still no joy reproducing)
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: Timberwolf's UK.... trains?

Post by mak »

Every thing is 'standard' Windows 10. 64 I am not computer literate and had to look up blitter.
The trains do run correctly but change to be unaligned when altering direction to another line at a junction or turn round at station.
I have started a new game, will carry on experimenting but changed the industries from 'Improved town idustries' to Firs and it still does it
I have included the save game just for yours and others interest
Thank you for looking,I am grateful, sorry to have caused you any hassle.
Wuninghall Transport, 1952-02-13.sav
(414.18 KiB) Downloaded 90 times
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: Timberwolf's UK.... trains?

Post by mak »

With reference to above, I took your trains out ,started new game with 'standard trains' and it did not happen.
Wish it had .Ah well
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

It wouldn't happen with the normal trains. I think I know what's happening and I think it's possibly a bug in jgr (or maybe even a specific blitter, hence the question) but I'm not quite certain enough to want to pass it off as a "not my problem".

If it's a jgr bug rather than a set bug, you'd also see it on 16-sprite sets like CETS (http://bundles.openttdcoop.org/cets/push/LATEST/) or possibly even sets which have tilting trains in curves - in the latter case, you'd see trains get stuck in tilted mode even after a curve.

The reason is that underneath those long vehicles lurks the kind of horror of which Lovecraft would be proud. Each locomotive or wagon is actually 3 vehicles, in an articulated consist. I use a technique Eddi created years ago, where you use the variable for relative curvature between two vehicles in a consist (intended, as far as I'm aware, for tilting units to show tilt graphics in curves) to swap between sprites. This means that:
  • When going in a straight line (no curvature difference between vehicles), each of the 3 sections of a train displays its own front/middle/rear sprite, so as far as OpenTTD is aware it's rendering 3 vehicles with length <= 8 and so you avoid any graphical glitches with tunnels, foundations and bridges.
  • When going round a corner (one section of the articulated unit has a different direction to the others) the front and rear sections swap to an invisible sprite, and the middle section swaps to a single long sprite representing an intermediate angle between the 8 standard directions.
  • When going up/down a hill (sections have different Z co-ordinates) the front and rear sections again swap to invisible, and the middle to a single long sprite representing uphill and downhill graphics.
(For vehicles that are standard OpenTTD length or shorter, the front and rear sprites are always invisible and they only have a middle sprite, as this won't cause any of the glitches oversize sprites do)

It looks like in your game, the middle unit sprite for going round a corner is somehow getting cached and carried into the straight section. Weirdly this doesn't happen for the front/rear sections, which correctly pick up that the consist is now in a straight line and don't stick with the transparent sprite. This makes me think there is some kind of odd sprite caching going on, although maybe the callback for the middle unit is different enough to make the value be cached for only that result. Without (yet) having been able to reproduce it, it's difficult to see if this is something to do with my code or whether your instance of jgr has some kind of sprite optimisation not in regular OpenTTD or, indeed, in the Win64 0.39.0 I just downloaded. (Which makes me wonder if it's even down to the level of being configuration specific)

Possibly if you're able to upload your openttd.cfg, that might help me reproduce it?
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: Timberwolf's UK.... trains?

Post by mak »

Thank you, from what I have expermented with and running your trains in ottd 1.10.3, your explanation which I have got gthe gist off ( not your fault my bad) I also began to think it was a conflict in JGR 39.I will post in JGR and ask him to look at this thread
Attachments
openttd.cfg
(18.18 KiB) Downloaded 87 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Timberwolf's UK.... trains?

Post by JGR »

mak wrote: 20 Nov 2020 13:32 Thank you, from what I have expermented with and running your trains in ottd 1.10.3, your explanation which I have got gthe gist off ( not your fault my bad) I also began to think it was a conflict in JGR 39.I will post in JGR and ask him to look at this thread
You've turned on "Disable vehicle image update". You should turn it off.
This is really a workaround for poorly performing GRFs which update all vehicles on every tick.
As there are now also other workarounds to handle these GRFs, you probably do not need to use this.
Ex TTDPatch Coder
Patch Pack, Github
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: Timberwolf's UK.... trains?

Post by mak »

May I thank you both for your work and in helping me and perhaps someone else.
I do not remember tuning it on . :( dose not mean I didn't :oops:
Edit: now working correctly :D
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

JGR wrote: 20 Nov 2020 15:20 You've turned on "Disable vehicle image update". You should turn it off.
This is really a workaround for poorly performing GRFs which update all vehicles on every tick.
As there are now also other workarounds to handle these GRFs, you probably do not need to use this.
Thank you, that's saved me a lot of head-scratching trying to figure out what's going on.
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

Back on track, working on billboards:

Image

Each "era" of platform (wooden, concrete, modern) will eventually have its own small period appropriate set of advertisements, which will be chosen randomly to give a bit of variety - once I've finished the code to do so.

Edit: well, these turn out to be quite a lot of fun to do. Usually I don't "spoil" everything in the set and leave a few things to be discovered release day, but I'm far too happy with these:

Image
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

A little trick I discovered: glass is simulated by having a special sprite, where all non-transparent pixels are used as a mask to selectively darken pixels beneath. But as this behaviour is determined by setting some special bits in the sprite number and not the sprite itself, there's nothing to stop you making the "glass" sprite useful for some other purpose.

As a result, without needing any extra sprites my modern-era shelter can come in both "glass" and "solar panel" variants:

Image

I found this by accident while testing to make sure the glass panels line up correctly, and rather liked the effect.
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

One last weekend bump - v1.1.1 is now live on BaNaNaS with many more station tiles available, including everything I've mentioned above.

I also made a minor update to Tracks to fix level crossings not appearing correctly.
Amak
Engineer
Engineer
Posts: 36
Joined: 13 Feb 2017 14:48

Re: Timberwolf's UK.... trains?

Post by Amak »

Timberwolf wrote: 22 Nov 2020 21:15 One last weekend bump - v1.1.1 is now live on BaNaNaS with many more station tiles available, including everything I've mentioned above.

I also made a minor update to Tracks to fix level crossings not appearing correctly.
So awesome, I use your trains with ironhorse 2, so far it is a great experience; thank you.
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: Timberwolf's UK.... trains?

Post by Timberwolf »

Another little update - I noticed during a game some of the bare platforms weren't showing crowd sprites, so 1.1.2 is up on BaNaNaS to fix that omission.
PEPSprinterPacer
Engineer
Engineer
Posts: 111
Joined: 20 Jul 2020 13:43
Location: Nether you mind
Contact:

Re: Timberwolf's UK.... trains?

Post by PEPSprinterPacer »

Just asking.... is there a date on the next update for the trains themselves? As they seem to be getting lonely.
Only ever been on 2 185's and 144 023!
viewtopic.php?t=87546 a screenshot thread of mobile pictures!
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 33 guests