Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridges: action 1/2/3 to reduce glitches with pillars #4492

Closed
DorpsGek opened this issue Feb 9, 2011 · 7 comments
Closed

Bridges: action 1/2/3 to reduce glitches with pillars #4492

DorpsGek opened this issue Feb 9, 2011 · 7 comments
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Feb 9, 2011

planetmaker opened the ticket and wrote:

When the backward pillar is disabled, the bridge pillars actually glitch (see attached image) and test with the attached test newgrf by building a wooden bridge.

Original report (in German) here: http://www.tt-ms.de/forum/showthread.php?tid=5133

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4492
@DorpsGek
Copy link
Member Author

frosch wrote:

Looks like nothing we can do about it: The pillars are just too big.

Problem is that there is only one pillar sprite which contains both the sprites for the left and right pillar. OTTD then cuts the sprite in the middle to draw the left and right pillars with the correct length in case the bridge is on a slope. The cut is currently done in the middle of the edge.
Not sure whether we can tweak the cutting position a bit.

Edit: Tried moving the clipping position, but that caused glitches with other bridges.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4492#comment9661

@DorpsGek
Copy link
Member Author

frosch wrote:

When adding vertical clipping as well, maybe the horizontal clipping can be relaxed:

http://devs.openttd.org/~frosch/diffs/fs4492tweak.diff


This comment was imported from FlySpray: https://bugs.openttd.org/task/4492#comment9663

@DorpsGek
Copy link
Member Author

frosch wrote:

There is another drawback to consider: The bridge pillar does not only glitch due to the clipping, but it also glitches with vehicles crossing under the bridge.
Maybe that can be solved by using different bounding boxes if the back-pillar is disabled, but that is certainly no 1.1 stuff.

Anyway, enjoy the weekend!


This comment was imported from FlySpray: https://bugs.openttd.org/task/4492#comment9666

@DorpsGek
Copy link
Member Author

frosch wrote:

I don't see this fixable keeping the way bridgepillars are drawn.
The pillars are too big. Disabling drawing of the backpillar does not allow the front pillar to become bigger.

If there are ever Action-1-2-3-ish NewGRF bridges they need to supply a way to specify individual sprites for the various pillar positions on a tile. Maybe 9 possible positions in a 3x3 grid?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4492#comment9716

@DorpsGek
Copy link
Member Author

wallyweb wrote:

TTDPatch would appear to get this right. How does it's implementation differ from that of OTTD?

The workaround (NOT A FIX) is to trim the width of the pillar to just within the clipping, however this will ruin the perspective of the pillar when compared to the bridge superstructure. A pity really, considering that it would seem that Bridges Action0 Property 0E was designed to allow for wider single pillars when they become fully visible with higher bridges.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4492#comment12697

@DorpsGek
Copy link
Member Author

frosch wrote:

For many bridges, especially the default bridges, the pillar sprites contain two pillars for opposite ends of the tile.

As such with drawing whole sprites it is not possible to draw pillars with correct length over sloped terrain. You will see this effect in TTDPatch and older versions of OpenTTD: Pillars are drawn with incorrect length above sloped terrain.

Recent versions of OpenTTD however have the feature to cut the pillar sprites in the middle, and draw the parts of the pillars with correct length on both sides of the tile. In the case of the bridge GRF here, the pillar sprite extends over the middle of the tile, and thus the cutting of the sprite splits the pillar. Above sloped terrain OpenTTD will thus draw half pillars.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4492#comment12698

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) component: NewGRF This issue is related to NewGRFs enhancement labels Apr 7, 2018
@andythenorth
Copy link
Contributor

No progress in 5 years, not a likely candidate for a fix. Cleanup of issues, so closing, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

2 participants