No snow on rail tiles on partial snow level

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

No snow on rail tiles on partial snow level

Post by Kogut »

Is it possible to draw partial snowed tiles instead of snowless tiles in situation like this?
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (4.51 KiB) Viewed 3527 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: No snow on rail tiles on partial snow level

Post by Rubidium »

Assuming you're talking about the default rails, then no. The rails are "physically" drawn on the unsnowed and fully snowed tiles. There are no separate bits with the appropriate ballast, so we can't draw them with partial snow.
SmatZ
OpenTTD Developer
OpenTTD Developer
Posts: 351
Joined: 03 Oct 2006 18:26
Location: Prague, Czech Republic
Contact:

Re: No snow on rail tiles on partial snow level

Post by SmatZ »

Image
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: No snow on rail tiles on partial snow level

Post by Kogut »

Picture is from swedish rails.
@Smatz - it looks great! Why it is not working with opengfx - I assume that it is just referencing sprites, so that way it should work.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: No snow on rail tiles on partial snow level

Post by Zephyris »

How many additional sprites would be needed to add this feature to the base sets? Just the 6 track and ballast sprites? It would break support for some track sets though...
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: No snow on rail tiles on partial snow level

Post by Kogut »

Zephyris wrote:How many additional sprites would be needed to add this feature to the base sets? Just the 6 track and ballast sprites? It would break support for some track sets though...
I thought that openttd displays tile layer than track layer - in that case cropping flat sprite would be enough.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: No snow on rail tiles on partial snow level

Post by planetmaker »

Zephyris wrote:How many additional sprites would be needed to add this feature to the base sets? Just the 6 track and ballast sprites? It would break support for some track sets though...
Base sets don't work the railtypes way, they supply full sprites for all ground tiles, that is tracks and ground in one sprite. And as such they don't have transition sprites between snowy and non-snowy parts.

Railtypes don't have that feature so far either, but it might be possible to add as there the ground sprites are taken as usual and then just the track drawn over them. See http://wiki.ttdpatch.net/tiki-index.php?page=Action3 for the needed sprites. In short:
- all 16 underlay tracks
- 10 overlay sprites. Without now checking back: six of them are present in a base set, the 4 sloped ones are missing afaik.
- all 10 level crossing sprites
- all 4 tunnel track sprites. The same as the underlay could be used, ignoring shadows
- all 10 bridge overlay sprites. The underlay sprites could maybe be re-used, it needs checking as they're just drawn over the default tracked bridges.

So basically: everything needs doing in order to make it look nice. It's one reason I wrote SwedishRails :-)
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: No snow on rail tiles on partial snow level

Post by Zephyris »

That doesn't sound like too much to have to do... I suppose it would be easier to add this feature by newgrf through.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: No snow on rail tiles on partial snow level

Post by planetmaker »

Zephyris wrote:That doesn't sound like too much to have to do... I suppose it would be easier to add this feature by newgrf through.
Yes. Implementing that also for the base set is as far as I see it much more work than making the BigGUI / sprite font size adjustment work properly :-) as it means to change the way rail tracks from base sets are handled from their current way to the newgrf way.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: No snow on rail tiles on partial snow level

Post by Zephyris »

Cool, that makes it a job for OpenGFX+ Rails then :)

*offtopic* So... the big GUI/big fonts bugs, is there interest in trying to solve them?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: No snow on rail tiles on partial snow level

Post by planetmaker »

Zephyris wrote:Cool, that makes it a job for OpenGFX+ Rails then :)

*offtopic* So... the big GUI/big fonts bugs, is there interest in trying to solve them?
Yep, an OpenGFX+ Rails would be pretty easy. Basically: give me the sprites and I recycle 95% of my code from SER and we're set ;-)

See the BigGUI thread for where the 2nd part of my answer wrt the fonts is not off-topic ;-)
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: No snow on rail tiles on partial snow level

Post by Zephyris »

Cool, are the SER sprites in the repo so I can copy the offsets?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: No snow on rail tiles on partial snow level

Post by planetmaker »

Zephyris wrote:Cool, are the SER sprites in the repo so I can copy the offsets?
Sure, that'd be quite awesome if you could keep the same sprite arangement.
All is there: http://dev.openttdcoop.org/projects/swe ... ow/src/gfx
* You may safely skip all image files ending with either TTD or OpenGFX - those are just sprites which help to emulate the old behaviour for pre-railtypes versions. That gets rid of most graphics files there ;-)
* Also no fence sprites are required when we just keep the default fences and don't want to offer the amount of variety as in SER. But it's easy to allow for that variety.
* Having the sprites for the depots is needed, esp. as it needs snowy versions. Having an old and a new style will be nice IMHO, but is not required. The same goes for the level crossings. Especially the latter are a pain to get correctly aligned.
* you can also skip all files with GUI in it - they GUI sprites need no change here.

So:
- depot_normal*.png (4 files) and depot_modern*.png (4 files) - could be boilt down to two: normal (as in OpenGFX) + snowy version thereof
- level_crossing_railtypes*.png (4 files)
- rail_overlays*.png (2 files) - they actually contain under- and overlay and are a bit misleadingly named.
- tunnel_track*.png (2 files)

Cheers,
pm
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: No snow on rail tiles on partial snow level

Post by Kogut »

Is it possible to make OpenGFX+ Rails working also with graphics?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: No snow on rail tiles on partial snow level

Post by planetmaker »

Kogut wrote:Is it possible to make OpenGFX+ Rails working also with graphics?
No OpenGFX+ Rails will disable all graphics and leave the user with a black screen.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: No snow on rail tiles on partial snow level

Post by Kogut »

Is it possible to make OpenGFX+ Rails working also with original graphics?
I hope there is nothing missing
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: No snow on rail tiles on partial snow level

Post by planetmaker »

Kogut wrote:Is it possible to make OpenGFX+ Rails working also with original graphics?
I hope there is nothing missing
No.
SmatZ
OpenTTD Developer
OpenTTD Developer
Posts: 351
Joined: 03 Oct 2006 18:26
Location: Prague, Czech Republic
Contact:

Re: No snow on rail tiles on partial snow level

Post by SmatZ »

planetmaker wrote:Base sets don't work the railtypes way, they supply full sprites for all ground tiles, that is tracks and ground in one sprite. And as such they don't have transition sprites between snowy and non-snowy parts.
That's how the patch works - it generates overlay sprites as a difference of "clear ground" and "clear ground with track" sprites. For snowy tracks, it is a difference of "snow" and "snow with track" tiles.
Image
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: No snow on rail tiles on partial snow level

Post by Zephyris »

planetmaker, would you mind if I based the OpenGFX+ level crossing graphics on the ones you have drawn for the swedish rails? Those gfx are very nice, I think they will fit the OpenGFX style well and the offsets are all sorted!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: No snow on rail tiles on partial snow level

Post by planetmaker »

Zephyris wrote:planetmaker, would you mind if I based the OpenGFX+ level crossing graphics on the ones you have drawn for the swedish rails? Those gfx are very nice, I think they will fit the OpenGFX style well and the offsets are all sorted!
I don't mind at all. And yes, getting right the level crossings (composing the sprites from the single pieces as well as their alignment) was the single most tedious task for that set... I'll not be unhappy to just re-use that :-)

But it's Irwe who did the drawing for SwedishRails set :-)
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 4 guests