OpenTTD / OpenTTD/OpenGFX2

Y offset for 4x zoom sprites does not precisely match specification.

Open
#257 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
94
Forks
15
PR merge metrics
No merged PRs in 30d

Description

The 4x extra zoom sprites do not follow the specified offset requirements: Scaling of Y offset is currently simply zoom*yrel, wheras the specifications indicate it should have an additional ceil(zoom*-1/2).

This is needed for ground tiles to have perfect alignment with the half tile foundation sprite. Currently, the vertical offset is off by 2. By extension, all ground tiles for buildings etc. need the same offset adjustment, and so all buildings on them do too.

Image The effect is subtle, perhaps most visible for snowy rail half tiles against the normal arctic terrain background. The half tile rail sprite is not cut at precisely the widest part of the tile, and the half tile foundation does not tesselate in (the 2px wide rear wall is not visible).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked RealSprites zoom-level specification, then locate the 4x zoom sprite Y-offset scaling described in the issue. Verify the adjustment against ground tiles and half-tile foundation sprites; it is done when the vertical offset follows the specification and the affected tiles align precisely.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.