-
Notifications
You must be signed in to change notification settings - Fork 24
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
Can't get anything to render from Tiled file #344
Comments
Found a weird workaround: Download https://github.com/excaliburjs/excalibur-tiled/archive/refs/tags/v0.25.3.zip, extract in folder, import Basically, using the original code seems to make it work, so it's possible it's an issue with Vite. Going to dig deeper. |
@Cretezy Thanks for the issue and reproduction repo! I think Vite is doing something interesting to the code, not sure what is wrong exactly. I'm still digging 👍 |
@eonarheim I dug pretty deep, and still nothing. Using the npm version, I see that all assets are properly loaded, but I can't figure out why they aren't rendering. I see the layers and TileMap being created, the image data is populated, so I don't know what's going on still. |
Where is this code you're seeing? I'll take a look.
Changing my Vite config to this doesn't help:
|
Doing a little more digging this morning, I think there may be an issue with the esbuild pre-bundle not respecting the |
For now, switched to Parcel and having no issues with it! However, I am having a collision issue. I could open a new ticket if you'd like. https://github.com/Cretezy/excalibur-tiled-bug/tree/collision Basically when a collision happens ( |
Another question (again, I could make another issue for this if you'd like): Why is my camera not smooth? Is this just sub-pixel snapping, or is there a lerp value that can be set somewhere? quickshare-2022-04-14_18.22.03.mp4Relavant code:
I tried |
@Cretezy I'm glad Parcel 2 is working for you! I posted on that similar Vite issue so hopefully we get some clarity there, I'll update our bundler docs and perhaps the template as well to call out the For the Collision question the The event For the Camera question, try applying the camera strategy once in an I think the documentation could be clearer about how to use camera strategies, I'll make some updates 👍 |
Okay I can 100% replicate the jitter on Edit: Seems to be working correctly in the lastest Workaround in your Scene add this.on('postupdate', () => {
this.camera.pos = actor.pos;
});
// or
onPostUpdate() {
this.camera.pos = actor.pos;
} |
Also updated some documentation regarding Camera strategies https://excaliburjs.com/docs/cameras#camera-strategies |
For collisions: Yes, it does seem like it's a seam problem. Here's a video demo: quickshare-2022-04-15_12.39.38.mp4For camera: I was already doing The platformer sample also is a little jittery in Firefox, so it seems to be a browser/GPU issue. I'm on Firefox 100 on Arch. |
@Cretezy I'm closing this for now I think we've resolved all the issues in this thread 👍
|
Steps to Reproduce
Reproduction: https://github.com/Cretezy/excalibur-tiled-bug
Rough important code:
The level in Tiled:
It has an object layer with
excalibur="true"
(bool), and a camera. Camera works correctly (tested with player sprite that does show up).Expected Result
I expected the tilemap to be draw on screen.
Actual Result
Only see the player sprite.
Environment
Tested on Firefox (100) and Chromium (99) on Linux (Arch).
Tiled 1.8.4, Excalibur 0.25.3, this package 0.25.3.
Current Workaround
Download https://github.com/excaliburjs/excalibur-tiled/archive/refs/tags/v0.25.3.zip, extract in folder, import
TiledMapResource
from../excalibur-tiled-0.25.3/src/tiled-map-resource
.The text was updated successfully, but these errors were encountered: