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

Minor Bug: Layer offsets in tiled map don't respect scaling #1904

Closed
jtmcdole opened this issue Sep 13, 2022 · 0 comments · Fixed by #1906
Closed

Minor Bug: Layer offsets in tiled map don't respect scaling #1904

jtmcdole opened this issue Sep 13, 2022 · 0 comments · Fixed by #1906
Labels
bug fix available A PR fixing this bug is available and waiting for a review

Comments

@jtmcdole
Copy link
Contributor

Current bug behaviour

TiledMaps with destination tile sizes smaller/larger than the Tiled map have offsets that do not scale.

Two examples:
image

The offsets calculated in #1886 need to include scale.

Expected behaviour

Small or larger maps look like regular maps... just smaller or bigger.

Steps to reproduce

Use a TiledMap - with a destination tile size different from the actual map. The map should included layer offsets.

More information

I'll put up a fix. Offsets should also not be calculated per-frame.

@jtmcdole jtmcdole added the bug label Sep 13, 2022
jtmcdole added a commit to jtmcdole/flame that referenced this issue Sep 14, 2022
- Take scale into account when calculating offsets
- Memoize the work of offsets - don't calculate it each time.
- Tests - everyone loves tests.

Fixes flame-engine#1904
jtmcdole added a commit to jtmcdole/flame that referenced this issue Sep 15, 2022
- Take scale into account when calculating offsets
- Memoize the work of offsets - don't calculate it each time.
- Tests - everyone loves tests.

Fixes flame-engine#1904
jtmcdole added a commit to jtmcdole/flame that referenced this issue Sep 15, 2022
- Take scale into account when calculating offsets
- Memoize the work of offsets - don't calculate it each time.
- Tests - everyone loves tests.

Fixes flame-engine#1904
@st-pasha st-pasha added the fix available A PR fixing this bug is available and waiting for a review label Sep 16, 2022
jtmcdole added a commit to jtmcdole/flame that referenced this issue Sep 17, 2022
- Take scale into account when calculating offsets
- Memoize the work of offsets - don't calculate it each time.
- Tests - everyone loves tests.

Fixes flame-engine#1904
spydon pushed a commit that referenced this issue Sep 18, 2022
- Take scale into account when calculating offsets
- Memoize the work of offsets - don't calculate it each time.
- Tests - everyone loves tests.

Fixes #1904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix available A PR fixing this bug is available and waiting for a review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants