https://github.com/excaliburjs/excalibur-tiled
Adds Tiled Map Editor File support to Excalibur
https://github.com/excaliburjs/excalibur-tiled
excalibur excaliburjs plugin tiled-map-editor
Last synced: 7 months ago
JSON representation
Adds Tiled Map Editor File support to Excalibur
- Host: GitHub
- URL: https://github.com/excaliburjs/excalibur-tiled
- Owner: excaliburjs
- License: bsd-2-clause
- Created: 2015-10-24T22:56:49.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T03:19:11.000Z (7 months ago)
- Last Synced: 2024-11-17T13:06:15.873Z (7 months ago)
- Topics: excalibur, excaliburjs, plugin, tiled-map-editor
- Language: TypeScript
- Homepage: https://excaliburjs.com/docs/tiled-plugin
- Size: 31.3 MB
- Stars: 50
- Watchers: 9
- Forks: 22
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Tiled Plugin for Excalibur.js
Tiled is a super useful tool for building game levels across the industry. The Tiled plugin for Excalibur offers support for both Orthogonal (standard) and Isometric maps!
The current Tiled plugin aims to support *parsing all data* in the Map (.tmx/.tmj), Tileset (.tsx, .tsj.) and Template files (.tx, tj). The plugin however does not support rendering all map types, currently hexagons and isometric staggered are not supported.
The plugin officially supports the latest version of Tiled that has been published and will warn if you are using an older version. This is because there have been many breaking changes to the Tiled map format over time that are difficult to reconcile.

## Installation
```sh
npm install --save-exact @excaliburjs/plugin-tiled@next
```Create your resource, load it, then add it to your scene!
```typescript
const game = new ex.Engine({...});const tiledMap = new TiledResource('./path/to/map.tmx');
const loader = new ex.Loader([tiledMap]);
game.start(loader).then(() => {
tiledMap.addToScene(game.currentScene);
});```
## Documentation
For information on how to use the plugin visit https://excaliburjs.com/docs/tiled-plugin
## Contributing
- Built with webpack 5
- Uses webpack-dev-serverTo start development server:
npm start
To watch:
npm run watch
To compile only:
npm run build
To run tests:
npx playwright install
npm testTo update snapshots
* Windows
```powershell
npx playwright test --update-snapshots
```* Linux for CI
```powershell
docker run --rm --network host -v C:\projects\excalibur-tiled:/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.41.2-jammy /bin/bash
npm install
npx playwright test --update-snapshots
```