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

Tile x/y position sometimes wrong for array of all color tiles block #1323

Open
kevinjwalters opened this issue Sep 11, 2019 · 0 comments

Comments

@kevinjwalters
Copy link

commented Sep 11, 2019

Describe the bug
The x,y position from each tile retrieved with the array of all color tiles block is wrong sometimes. @mileswatson noted this during development of Chomper game. It's very visually apparent if the tile position is used to place multiple sprites as the layout should be evenly spaced but often isn't.

I did some digging on this and from a brief investigation it looks like this only affects some colours, possibly only the 0th palette pseudo-color which represents the transparent background pixels/tiles.

The bug is very peculiar as it doesn't affect first/last one but rather a tile somewhere in the middle of list. Perhaps this relates to default position of sprites and/or some attempt not to overlap them when initially placed, or perhaps not.

To Reproduce
Steps to reproduce the behavior:

  1. Use array of all blocks to retrieve a tile list for background color (the first one: 222,222,222).
  2. Use the x,y position in some way.
  3. Check the x,y position is correct for all tiles.
  4. Observe a few being incorrect.

Expected behavior
Consistent x,y position/local-offset for a tile.

Screenshots
This shows problem, code is highlighting the bug with red circle (demo code embedded in png):

arcade-Tile-XY-Bug

This is the code:

arcade-Tile-XY-Bug-screenshot-codecrop1

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 76.0.3809.132

Smartphone (please complete the following information):

  • n/a but does behave the same

Additional context
Originally noticed on Chomper, note white dot layout on animated gif showing Level 1: MakeCode Forum: Presenting: Chomper

@kevinjwalters kevinjwalters changed the title tile x/y position sometimes wrong for array of all color tiles block Tile x/y position sometimes wrong for array of all color tiles block Sep 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.