News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

merge one-sided and double-sided platform addons

Started by Ichou, April 04, 2017, 01:09:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ichou

<This topic is derived from http://forum.simutrans.com/index.php?topic=15241.0>
Hey, everyone.
There are two types of platform addons: double-sided(mainly dims=1,1,8) and one-sided(mainly dims=1,1,16).
And there are many cases that a one-sided platform and a double-sided platform quote same images.
It seems there are something we can reduce(number of icons, or memory occupied by pak files).

So I propose to allow dims=1,1,24(24=8+16) which means one-sided AND double-sided platform.
How to assign images is same to dims=1,1,8.
Both frontimgs and backimgs are drawn when it's regarded as double-sided, while either frontimgs or backimgs are drawn when it's one-sided.

If it's constructed where there's already a platform on the next tiles, the "direction" follows to the condition of next tiles.
Otherwise it's constructed as double-sided at first, and change to one-sided when clicked again, change the direction when clicked again, and return to double-sided if once again.

gauthier

The idea is interesting but not as simple as drawing only back or only front images, that's making an assumption about the graphics, where you are sure in EVERY cases that a station which has its platform before the rail does not have anything in backimage and vice versa, which is not true. You have an example of this in pak128 where the big covered early station has a pillar after the track even if there is a platform only before the track.

Leartin

Sometimes, it really is that simple  8)
It's not a general assumption, hence the suggestion is not to change behaviour of current 16dim-platform, but allow for 24-dim platforms. Nothing happens automatically, the 8 additional dims would still require a definition. It's just that in many cases (not all) those would reuse the one-sided platforms. Thus saving space (if it were two seperate pak files, the images would take up space twice) and saving menu-space (only one icon instead of two).

If a platform does not work well with this, eg. those that show half a roof and expect a second station for the other half, either stay 16dim or need to add additional graphics.

Either way, it's only theory without a proper way to handle station rotation.

TurfIt

Quote from: Ichou on April 04, 2017, 01:09:17 AM
It seems there are something we can reduce(number of icons, or memory occupied by pak files).

Identical images are only loaded into memory once, but they do consume disk space in the pak files.