Page 1 of 1

MAX sprite lengh

Posted: 04 Jun 2004 09:06
by Colonel32
I have a small problem. I was told that the maximum sprite lengh is 32 pixels, and than I was told that sprites 32-pixel-long-sprites are placed exactly next to each other, with no space, but then I found:
mnorman wrote:Raven: when actually used in the game (rather than the depot window), full length vehicles are 2 pixels further apart, meaning that for a continuous train (like almost all passenger trains, when you account for corridor connections), you need sprites that are 32 pixels long.
so now I am pretty messed up, and if somebody could tell me how it really works, I would appriciate it. Thanks,
Colonel32

Posted: 04 Jun 2004 10:11
by eis_os
Sprite length?
TTD has a Sprite Height limit that is 255 pixel, the length is in a word, so it wouldn't be that much problem to load a 512x255 pixel sprite...

Posted: 04 Jun 2004 10:15
by Purno
he means the size of a train-cargo-carriage, and what the distance between the sprites is in TTD, I think.

Posted: 04 Jun 2004 11:10
by mnorman
Purno, yes that it what I mean.
when using vehicles anywhere except the Depot, the maximum spacing is 32 pixels, but in the depot, as Raven pointed out, the maximum spacing is only 30 pixels

Posted: 04 Jun 2004 16:42
by Korenn
and you can make sprites bigger than this, but they'll overlap if you put them behind each other (it's possible at the first and last sprite though)

Posted: 04 Jun 2004 17:03
by Colonel32
I have a 32-long frightcar, no bumpers. I take it outta depot. Will there be a hole between them, or will they be touching each other?

Posted: 04 Jun 2004 20:47
by Raven
there's an additional sprite added to each wagon out of depot, so what looks bad on depot will look fine outsiide. I hope i'm not wrong but this is how it worjks:

30 sprites to leave a gap between two wagons, and 32 to get 'em continous(like in modern trains)

Posted: 05 Jun 2004 11:41
by mnorman
Raven: you're right. 30 pixels will leave a 2 pixel gap between. If you wany a modern passenger carriage though, the connection will take the extra pixels (many that I have both drawn and seen have 31 pixels for the carriage body, and the 32nd for the connection. All that needs making sure of for alignment then is that all of the connections are on the same end).
Shorter vehicles are multiples of 4 pixels (1/8ths of the full length).
Longer vhicles have been eattmpted (locomotives sticking forwards, preventing double-heading, and long goods vehicles with invisible spacer wagons between them), but if the length increase is more than about 4 pixels the graphical glitches in tunnels and around bridges get annoying (the BR232 in the DBSet, and the Centennial in the tropicset are around the limit)