microsoft / pxt-arcade

Arcade game editor based on Microsoft MakeCode
https://arcade.makecode.com
MIT License
478 stars 207 forks source link

Using placeOnTile makes it easy to clip through walls for large sprite #1753

Open riknoll opened 4 years ago

riknoll commented 4 years ago

For sprites that are 16x16 or larger, using placeOnTile will sometimes cause your sprite to be placed so that it overlaps with adjacent walls. This causes you to clip though the floor

Here's a game that demonstrates the issue with a 16x16 sprite. Run into the "bad" tile and it should teleport you up top. Roughly 50% of the time you will clip through the floor.

https://makecode.com/_PgJC7T2tR1HM

And here's the same code with a 17x17 sprite which clips 100% of the time:

https://makecode.com/_1su0wLWwJWLk

We should be smarter when placing a sprite on a tile to ensure it isn't colliding with any walls (if possible)

riknoll commented 4 years ago

This bug was reported through the forum here: https://forum.makecode.com/t/sprite-in-continuous-fall/1237/11

abchatra commented 4 years ago

@riknoll I am removing next-release as there are no taker.