Jump to content

Texture Atlas issue. All frames showing at the same time, instead of frames being show one-by-one like in a proper animation


Recommended Posts



The game is still a work in progress but you can try it in action here - jetset.site44.com


The animation should be running and not showing all frames at the same time. 


I tried both XML and JSON.


Here's the code:


In Preload()

//    this.game.load.atlas('bricks_FX', 'assets/images/bricks_FX.png', 'assets/images/bricks_FX.json');    this.game.load.atlasXML('bricks_FX', 'assets/images/bricks_FX.png', 'assets/images/bricks_FX.xml');

In create()

    this.bricks_animation = this.game.add.sprite(0, this.game.height*2, 'bricks_FX');    this.bricks_animation.animations.add('bricks_explode', Phaser.Animation.generateFrameNames('bricks_FX', 1, 23), 24, false);





Link to comment
Share on other sites

Hi! All frames are shown when Phaser can not find frames for atlas or you are asking for incorrect frame - it shows default frame, which is frame 0, which is whole texture.


You are not showing atlas xml data in your post, but is name of your frame really "bricks_explode"  or "bricks_explode.png"?


Yesterday, there was similar question on this forum: http://www.html5gamedevs.com/topic/17634-atlas-problem/ - look there for additional details.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...