Hello, I would like to create a simple platformer game using Phaser 3 and Tiled.
I create level and animated some tiles in Tiled(for example waterfall).
It can show the animated tiles in Tiled
but it can’t show in Phaser game.
it display a static image in game…
Is it possible to show animated tiles in Phaser ??
Thank you very much
Hi,
There is a plugin for tile animation
Really thank you for the reference
it work fine for me:
function preload ()
{
this.load.tilemapTiledJSON('map', 'assets/map.json');
this.load.image('super-mario-16bit', 'assets/super-mario-16bit.png');
this.load.scenePlugin('AnimatedTiles', 'https://raw.githubusercontent.com/nkholski/phaser-animated-tiles/master/dist/AnimatedTiles.js', 'animatedTiles', 'animatedTiles');
}
function create ()
{
let map = this.make.tilemap({
key: 'map'
});
let tileset = map.addTilesetImage("map");
let layer1 = map.createDynamicLayer("test", tileset, 0, 0);
this.animatedTiles.init(map);
}
1 Like
Still kind of new to phaser, does this still work with the new version of phaser? It would be cool if someone would send a working github example project that uses this plugin.