News:

Want to praise Simutrans?
Your feedback is important for us ;D.

[patch] Load all vehicles in station

Started by VS, November 18, 2008, 09:36:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VS

This patch changes one small aspect of loading: before, the loop checked until last connected part of same station. Now it goes on, allowing loading more parts of convoi even if there is a "hole" in station...


---####\
---####/

or

---##-##--

Before: only first half of train loads
After: Only parts of train in the curve don't load

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

Well, it will not work with harbours. But I will look into it. The problem with doing it this way was, that it did not work with shorter vehicle length directly on a curve before the station. (It should be loaded, but it did not.) It was like that before though.

VS

So, a special case for ships?

I don't understand why shorter lengths should not work - this checks tile under vehicle against station, so theoretically if you have more vehicles on one tile, it should work too? But I didn't look at how shorter vehicles "own" tiles.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

Due to alignment isuues (or rather drawing issues) the vehicle drive in West and North 8 and in the other directions 15 steps until stopping. Thus a different number of vehcile will be loaded, depending on station orientation.

DirrrtyDirk

Well since offset is working now, correcting the graphics (via the .dat files) should be easy enough, so you could try and make things the same for all directions (stations and signals and all) again, could you not?
  
***** PAK128 Dev Team - semi-retired*****

prissi

No, this is due to the isometric engine. A vehicle must enter the tile in front before the first pixel is over that tile. On the same time, a vehicle must leave a tile (which is to the front) only after no pixel is on that tile. Therefore west/east and north/south vehicle positions must be offsetted by half a tile (and this is the reason, why vehicles longer than half a tile (=8) cuase severe graphics errors on everything not a ground tile.)

Simutrans tries to make this less severe by first drawing the normal ground including ways and then all other objects. This works as long as there are no bridges, tunnels, station or slopes, where the ground becomes a normal objects. Hence the graphics errors with longer vehicles.

To conclude: In an isometric pixel engine, the moving objects will be allways offsetted half a tile in north/south and east/west direction. A train going east-west would have one car, which is always loaded but but never unloaded. I spent half a month in thinking around this, but there is no better way around.

VS

#6
Then just drop it. The same can be done by following the way longer than last tile, only not so easy - more exercise for me :)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!