George wrote:After a lot of doubts I've decided to return to LV4's schema for vehicles. At least trucks. They would be represented as a single sprite. Whose trucks, who do not fit 8/8 template, would be represented as a two part vehicle, where the front part would be transparent part. I understand that it would keep tunnels, bridges and slope problems, but I do not see any solution nor any devs plan to provide some new code to provide something better. The view of bending RV makes me sick

I made a number of tests to make the code that would prevent bending of RVs and at the same time to fit in default bounding boxes. I had to use 8 time more sprites for a cabin ... And I would like to say, that I've failed again. You can see the attached file.
1) Tunnels problem - solved (the heigh problem can't be fixed in general, only by special tunnels graphics)
2) Bridge problem - solved
3) Slope problem - solved
4) Hills problem - accepted (will not be solved) (also solves the jump problem)
5) Sprites problem - 8-x sprites for a cabin for only drive side
6) New problems - sprite sorter problem

- sorter.png (2.14 KiB) Viewed 6474 times
So, I would like to ask devs to provide completely new feature for vehicles code. I would like to ask to provide the support for houses/industry tiles sprites usage possibility for vehicles.
Code: Select all
Since 2.0.1 alpha 55 vcs 3, houses and industry tiles support an extended syntax as well, which looks as follows:
<Sprite-number> * <Length> 02 07/09 <set-id> <num-sprites> <groundsprite> [<buildingsprite> (<xoffset> <yoffset> <zoffset> <xextent> <yextent> <zextent>) | (<xpixeloffset> <ypixeloffset> 80)]...
Such definition allows to draw a sprite over a sprite
Code: Select all
-- for sprites sharing their bounding box with the previous sprite
xpixeloffset B x offset from the top left corner of the previous sprite
ypixeloffset B y offset from the top left corner of the previous sprite
80 B a literal 80h byte to distinguish from new-bounding-box definitions
Code: Select all
For vehicles, the data looks as follows:
<Sprite-number> * <Length> 02 <veh-type> <cargo-id> <num-loadtypes> <num-loadingtypes> <loadtypes...>
where
Code: Select all
loadtypes
The sprite sets to use for the states of load. Each entry is a WORD value in little endian format, and refers to the most recent action 1 sets. For example, action 1 sets 4, 5 and 7 would be encoded as 04 00, 05 00 and 07 00, respectively. Note the additional 00 which is needed because it must be a word value here.
The first entries of these are used when not loading. There have to be num-loadtypes of these. After this follow the sets to use while loading/unloading, and there must be num-loadingtype of those.
I would like to use use sprites, defined like house tile sprites, instead of sprite sets for vehicles for load types. I do not see any other way to prevent vehicles from bending without providing any other annoying glitches.