News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Bug: Overlapping drawing of vehicle panels in the depot dialog

Started by Ranran(retired), April 09, 2019, 01:01:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

The depot vehicle panel is drawn overlapping every time player performs an action. (´・ω・`)))))
In other words, the vehicle picture that looks like 1 vehicle at first glance may actually be 20 overlapping pictures.

This bug became apparent when I was making a constraint display patch of a depot dialog. This affected not only the vehicle but also the color bar.


I used to know that vehicle panels of the depot dialog don't display transparency properly, but I have thought it to be a bug from the standard.
For example, when the alpha channel is used for the outline of the vehicle picture created by 3d modeling, it looks unnatural because the pixel becomes opaque after the deterioration.
And the image is different from before and after selection, and after selection (upper part of the depot dialog) it is displayed normally.
However, as a result of verification, it turns out that this is a bug specific to extended.
(This is different from the nighttime display bug I previously reported to the standard bug report)






I made an image dummy vehicle pak showing transparency for verification of this bug. The numbers in this dummy vehicle pak indicate the percentage of transparency.


Test on standard:

There is no particular problem.
(The transparency of the image does not change through various operations. This is the correct behavior.)



Test on extended:



Description of the demonstration image:
There are experimental paks with different transparencies. The numbers represent transparency.
One can not be selected because the axial weight is too heavy. They are displayed with a gray color bar.

Pay attention the change in the "90" on the right side of the screen.

1) Repeating "Show all" on and off. You can see that this operation causes the panel to lose transparency.

2) Reopen the depot dialog and reset the duplicate display bug. Then I have repeatedly clicked on the panel of "10" whose color bar is gray. You can see that this operation causes the panel to lose transparency.

3) Reopen the depot dialog and reset the duplicate display bug. Then I'm choosing numbers and assembling convoy. The assembled convoy has the correct transparency, but the lower panel has lost transparency.

4) Reopen the depot dialog and reset the duplicate display bug. However, the transparency seems to be different at the assembled convoy and the choose panel.







This is the state that just opened the depot dialog.
Notice the color differences of 10, 25 and 90. The difference is already seen in the initial state. The lower 10 and 25 are true black, and the lower 90 is darker than the upper 90.
Judging from its transparency, the lower selection panel seems to overlap two sheets from the beginning.


This bug has also been confirmed to occur on the June 19, 2018 build.
The code around the depot is different between extended and standard. The extended code is partially transferred to gui_convoy_assembler.
I speculate that this may be a bug that has existed since it was done.

I attach png and pak for test to this thread.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Thank you for the report. I have never looked into the transparency code, and I do not know how this works; I suspect that some code somewhere was not ported when transparency was implemented in Extended. Given the amount of time that it would take me to understand the code in order to fix it compared with the seriousness of the issue, I will have to categorise this as low priority for now, but if anyone else would care to work on a fix for this, I should be most grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran(retired)

QuoteI have never looked into the transparency code, and I do not know how this works
I am sorry that my explanation was not transmitted well but this is not a transparency code problem. The problem is the duplicate drawing process of "Vehicle panel".
"Vehicle panel" is the contents of tab, that is, the part enclosed in red.


For example, when looking at bundled 10 canvases from directly above, you do not know how many canvases overlap.
What if the picture was colored clear glass? The lower picture may be seen through, and it may be understood from the color depth that it is overlapping.
That is, the use of a transparent image exposed the duplicate drawing process. For example, if two images with 50% transmittance are superimposed, it will appear as an image with 25% transmittance.
Repeating that will eventually make it not transparent.

I tried searching for and removed the code that seems to be the cause of the duplication.
https://github.com/Ranran-the-JuicyPork/simutrans-extended/tree/fix-duplicate-drawing-in-the-depot
Testing this results in correct transparency, but does not seem to cause other problems. Please check just in case.



The transparency of assembled convoy and vehicle panel is the same.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.