Page 1 of 2

No snow on rail tiles on partial snow level

Posted: 02 Dec 2010 21:49
by Kogut
Is it possible to draw partial snowed tiles instead of snowless tiles in situation like this?

Re: No snow on rail tiles on partial snow level

Posted: 02 Dec 2010 21:59
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.

Re: No snow on rail tiles on partial snow level

Posted: 02 Dec 2010 22:16
by SmatZ

Re: No snow on rail tiles on partial snow level

Posted: 02 Dec 2010 22:36
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.

Re: No snow on rail tiles on partial snow level

Posted: 03 Dec 2010 00:58
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...

Re: No snow on rail tiles on partial snow level

Posted: 03 Dec 2010 06:58
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.

Re: No snow on rail tiles on partial snow level

Posted: 03 Dec 2010 07:19
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 :-)

Re: No snow on rail tiles on partial snow level

Posted: 03 Dec 2010 08:40
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.

Re: No snow on rail tiles on partial snow level

Posted: 03 Dec 2010 08:42
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.

Re: No snow on rail tiles on partial snow level

Posted: 03 Dec 2010 11:16
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?

Re: No snow on rail tiles on partial snow level

Posted: 03 Dec 2010 21:24
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 ;-)

Re: No snow on rail tiles on partial snow level

Posted: 04 Dec 2010 10:49
by Zephyris
Cool, are the SER sprites in the repo so I can copy the offsets?

Re: No snow on rail tiles on partial snow level

Posted: 04 Dec 2010 11:08
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

Re: No snow on rail tiles on partial snow level

Posted: 04 Dec 2010 11:49
by Kogut
Is it possible to make OpenGFX+ Rails working also with graphics?

Re: No snow on rail tiles on partial snow level

Posted: 04 Dec 2010 11:52
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.

Re: No snow on rail tiles on partial snow level

Posted: 04 Dec 2010 11:54
by Kogut
Is it possible to make OpenGFX+ Rails working also with original graphics?
I hope there is nothing missing

Re: No snow on rail tiles on partial snow level

Posted: 04 Dec 2010 11:55
by planetmaker
Kogut wrote:Is it possible to make OpenGFX+ Rails working also with original graphics?
I hope there is nothing missing
No.

Re: No snow on rail tiles on partial snow level

Posted: 04 Dec 2010 12:35
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.

Re: No snow on rail tiles on partial snow level

Posted: 07 Dec 2010 22:05
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!

Re: No snow on rail tiles on partial snow level

Posted: 07 Dec 2010 23:28
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 :-)