question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Excalibur crashes when using tilemaps and actors together

See original GitHub issue

Steps to Reproduce

import { Engine, Loader, Actor } from 'excalibur';
import { TiledResource } from '@excaliburjs/excalibur-tiled';

const game = new Engine();
const loader = new Loader();
const levelResource = new TiledResource('assets/map/single-layer.json');
loader.addResource(levelResource);

game.start(loader).then(() => {
  const tileMap = levelResource.getTileMap();
  game.addTileMap(tileMap);

  const actor = new Actor();
  game.add(actor); // Game crashes on this line
});

Expected Result

The map should display, along with any defined actors.

Actual Result

The entire browser tab freezes and needs to be force closed.

Environment

  • browsers and versions: Chromium 79.0.3945.130, Firefox 72.0.2
  • operating system: Ubuntu 19.10
  • Excalibur versions: 0.23.0

Notes

  • UIActors are fine; the problem specifically seems to happen when combining the Tiled TileMap and an Actor.
  • import * as ex from 'excalibur' instead of the above import style makes no difference.

Current Workaround

None.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DaVincecommented, Apr 12, 2020

Found the method that caused the lockup: stub out method TileMapImpl.collides() and the browser doesn’t freeze anymore.

Will attempt a fix and send a PR tomorrow.

0reactions
DaVincecommented, Apr 15, 2020

https://github.com/excaliburjs/excalibur-tiled/issues/87 is a duplicate of this and can also be closed 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excalibur/CHANGELOG.md at main · excaliburjs ... - GitHub
Text instances would cause Excalibur to crash webgl by ... TileMap tlies are now drawn from the lower left by default to match...
Read more >
Problem using excalibur-tiled with Parcel - Google Groups
I've just started using Excalibur and I'm finding it an awesome engine, ... but the game fails to load when I add the...
Read more >
TileMap | Excalibur.js Edge API Documentation
The TileMap class provides a lightweight way to do large complex scenes with collision without the overhead of actors. Tile maps are made...
Read more >
Tweets with replies by excalibur.js (@excaliburjs) / Twitter
Ever have those troublesome gaps/seams in your game tile maps? I wrote a post about some possible causes and solutions! #gamedev https://erikonarheim.com/posts/ ...
Read more >
Editor crashes when painting tiles using the Tilemap Editor
Resolution Note (fix version 2023.1.0a6):. Fixed in 2023.1. · Resolution Note (fix version 2022.2.0b8):. Fix for this issue is available on Unity ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found