Page 1 of 1

autorail.grf

Posted: 17 Nov 2007 16:56
by LordAzamath
Hey all...

Part I. Introduction.
I was wondering how to make a preview to autorail (when you drag with it, it shows the rail, which comes with 50%transparency, ->maglev, conventional&electric, monorail) for 32bpp
IMAGE:
Note! This is only a mockup
Note! This is only a mockup
omamoodi.png (77.63 KiB) Viewed 3232 times
, I searched through the grfs and found the autorail.grf. There I got a little confuzed..:(
Decoded from autorail.grf
Decoded from autorail.grf
autorailpcx.png (5.41 KiB) Viewed 3226 times
What are the double sprites for? 0&1; 2&3; 3&4; 5&6; 13&14&15; etc.
on the graphical side it looks like one of them is wider, than the other.

Part II. Questions.
Do they stand for different rail types?
If so, why aren't there atleast three exemplars of each?
Is the maglev&conventional the same?
If so, why are there some with three exemplars of each?
Are they just copies for developer-testing graphics?
If so, why aren't they removed from releases?

PS. It seems that there ain't even two exemplars of EACH. (53)

Part III. Suggestions.
If they are for all rail types the same, then maybe to remove the duplicates (actually the aren't duplicates, some are a bit wider, than the others, but that doesn't count)and make all the rail types to have separate sprites. Like this:
modified sprite 0 at autorail.grf
modified sprite 0 at autorail.grf
ahaaaa.png (656 Bytes) Viewed 3228 times
Part IV. Summary.
Then I would be able to make transparent previews to the autorails :)
I know that some of this stuff should more go to suggestions, but because Part II, I posted it here. I decided to divide the post into parts for better readibility :)

Thanks,
Lord

Re: autorail.grf

Posted: 17 Nov 2007 17:23
by glx
They may look the same but they aren't. Each one is designed for a different slope under it.

Re: autorail.grf

Posted: 17 Nov 2007 17:32
by LordAzamath
glx wrote:They may look the same but they aren't. Each one is designed for a different slope under it.
How come? The terrain is still almost the same. Especially, when it "floats" over some things.

Anyway..so it's not possible to make those transparency things w/o patching and adding sprites to autorail.grf?
If it would only be up to graphics, I maybe even could draw them (Maybe is not because I don't want, but because I'm not so good) first in 8bpp (just those white sprites in my last mockuo above), Then the transparent-rail for 32bpp and finally the real transparent rail for any official replacement in 32bpp for rails.

EDIT: BTW thanks for a quick reply.
EDIT2: What are the multi-direction sprites for? (Like 31, 32, even 21 etc.) Isn't it supposed to have one sprite per tile?
Lord

Re: autorail.grf

Posted: 18 Nov 2007 23:03
by GeekToo
I don't know why there are double sprites, but it should be pretty easy to replace the sprites in newgrfs with 32bpp ones: create 0.png 1.png etc. and pngcodec them.
Create a tar, where the sprites are in the directory sprites/autorail
Put the tar in the data directory. So just like replacing sprites in trg1r, it should be possible to replace sprites in newgrf this way.

Re: autorail.grf

Posted: 19 Nov 2007 05:55
by LordAzamath
First..It's not a NewGRF. Second, I wanted to make it so that with monorail activated, the "white lines" would be monorail with 50% transparency. With conventional - conventional. But I can't make it if everything uses the same sprites :( That's why I asked.

I know what I'll do. I will draw these all sprites, for monorail and maglev aswell and ask the devs THEN is it possible to implement them too :D
Although they might not be in 0.6, because the beta1 is already out. They might appear in 0.6.1 then..I don't know. I'll just draw the sprites and then ask what do they think of them.

EDIT: ok, it's kinda much to draw, and I don't get some things there....not all the sprites are done lik two sideways-on down. Kinda confuzing. I'll just make a generic replacement in 32bpp..

Re: autorail.grf

Posted: 20 Nov 2007 00:09
by Psicho
In my opinion what you want to do could be done without any graphical design (that would be kind of a pain for all the 3 tracks) , but a patch that will just draw the default track images with some transparency and some color blending (like red-transparent when the track cannot be drawn and greenish when it can be drawn).

If not, instead redrawing them all I think could be easier to remove the grass from the current track tiles and use that in the autorail.grf, will be less a pain i.t.a. ...

Re: autorail.grf

Posted: 20 Nov 2007 04:16
by LordAzamath
Psicho wrote:In my opinion what you want to do could be done without any graphical design (that would be kind of a pain for all the 3 tracks) , but a patch that will just draw the default track images with some transparency and some color blending (like red-transparent when the track cannot be drawn and greenish when it can be drawn).

If not, instead redrawing them all I think could be easier to remove the grass from the current track tiles and use that in the autorail.grf, will be less a pain i.t.a. ...
1. Can't do it. I'm no coder.
2. Can't do it. You would have railroad preview to maglev track, i.e

Re: autorail.grf

Posted: 20 Nov 2007 12:15
by Roujin
The same preview graphics are used for all kinds of tracks. So you can't have different 50% transparent tracks for the different track types just by 32bpp graphics replacement.
You could just have ONE 50% transparent graphic (like, normal rail) for all of them.

Or else you would need someone to write you a patch tu supply different sprites for the different track types...

If you're still interested which of these is used in which slope (and why you need that much (seemingly) duplicates), do it like me and number them (copy these blue little numbers, make 'em white end move them into the tiles) and re-codec it, and play with it ingame. I got some insight from that.