-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
add buffer bounds in TileMap #3389
Comments
@nionis Good find, this looks like a bug! I wonder why this is happening with large tiles in theory the math should have been correct |
@nionis Would you be able to share some more details, I think something else might be happening to cause this. I've tweaked my integration test to have 320px tiles and I'm not able to get the bug. Perhaps engine configuration or camera orientation? https://github.com/excaliburjs/Excalibur/tree/main/sandbox/tests/tilemap var tm = new ex.TileMap({
pos: ex.vec(-300, -300),
tileWidth: 16 * 20,
tileHeight: 16 * 20,
columns: 40,
rows: 40
});
var tileSprite = ss.sprites[0];
tileSprite.destSize.width = 320;
tileSprite.destSize.height = 320; tilemap-bug.mp4 |
I noticed today that including parallax on the tilemap produces incorrect culling |
@eonarheim does tiledplugin enable parallax for whatever reason? - meanwhile I will try to reproduce it and get back to you FYI: the map was imported via tiledplugin, display mode FillScreen, nothing else in my engine config |
The plugin will add parallax if the layer has the parallaxx/parallaxy properties set. I've pushed up a maybe fix for this (certainly it was a bug for culling w/ parallax enabled) |
I can confirm this fixed my issue! |
Context
Tiles can be clipped/culled while they are still visible on the screen.
This is reproducible when using tiles that are large (>100px).
Excalibur/src/engine/TileMap/TileMap.ts
Lines 530 to 560 in 4ffa2fa
Example:

Sloppy workaround:
Fixed:
Proposal
Find a way to take that into account or add some buffering.
The text was updated successfully, but these errors were encountered: