Page 1 of 1

[posila] [1.0.0] Incorrect Offshore pump Placement Indicators

Posted: Sat Aug 22, 2020 3:52 am
by MiniBetrayal
I have tested this in 1.0 on both my Windows and Mac installations...

Offshore pumps cannot be placed directly next to one another, but when an offshore pump is placed, the indicator next to it does not disappear.
offshorePumps
Compare and contrast to the behaviour of Rail signal placement indicators:
railSignals
It seems to me that when the offshore pump is placed, the indicators to either side of it should be removed.

Re: [posila] [1.0.0] Incorrect Offshore pump Placement Indicators

Posted: Mon Nov 02, 2020 7:26 am
by posila
Thanks for the report.

The indicators are intentially not doing full entity buildability check but just test tiles, so the result can be cached in tile layer for performance reasons, and reports about this were sorted out as a Not a bug.
However, since this keeps being reported as a bug and is causing other minor issues (87680), and since we are doing more polish work for 1.1, I thought I'd test moving the logic away from tile renderer and doing full entity buildability checks.

On maximum zoom-out it takes ~2.5 ms per frame to scan entire visible area for valid placement positions, which is actually less than I thought it would be, but is still significant portion of a frame time (16.66ms) and I am worried it could worsen multiplayer issues when clients are starting to fall behind the server. We could improve performance of this by just scanning area in some radius around mouse cursor, similarly to how rail related indicators are done, but I think it is quite convenient to have them shown in entire visible area.

I could try to add caching of viable tile positions, so that only entity collision checks need to be redone each frame, but that's going too far than I want to go with this "bug fix" at the moment.

So I'll leave it as is for now.