MAX sprite lengh

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
Colonel32
President
President
Posts: 951
Joined: 25 Apr 2004 18:41
Location: Prague, Czech rep.
Contact:

MAX sprite lengh

Post 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
Image
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post 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...
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

he means the size of a train-cargo-carriage, and what the distance between the sprites is in TTD, I think.
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
mnorman
Chief Executive
Chief Executive
Posts: 655
Joined: 03 Dec 2003 07:35
Location: Cambridge, England

Post 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
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post 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)
User avatar
Colonel32
President
President
Posts: 951
Joined: 25 Apr 2004 18:41
Location: Prague, Czech rep.
Contact:

Post 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?
Image
User avatar
Raven
Director
Director
Posts: 615
Joined: 13 May 2004 18:45
Location: Madrid - Main Recio's HQ
Contact:

Post 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)
6th Member of the Reciox - The Inner Circle
Image

pak96 Simutrans Depot
http://www.raven.simutrans.com
mnorman
Chief Executive
Chief Executive
Posts: 655
Joined: 03 Dec 2003 07:35
Location: Cambridge, England

Post 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)
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 14 guests