cyc Posted July 31, 2014 Share Posted July 31, 2014 Like the Flappy Bird, I want to add a background image which moves from right to the left of screen in my game. I want to know how to complete this animation. Thanks ~ Link to comment Share on other sites More sharing options...
lewster32 Posted July 31, 2014 Share Posted July 31, 2014 You would probably want to use a TileSprite for this, and either use autoScroll to make it move continually, or if you want more control, subtract from the tilePosition.x property in the update function. See this fiddle: http://jsfiddle.net/lewster32/ZGLd7/ You will need to use Phaser.CANVAS as the rendering mode with this image as it is - if you want to use AUTO and allow webGL (which is highly recommended) you will need to change the size of your image so that both the width and height are powers of 2 - in this case I'd say the image would need to be 1024 pixels wide by 256 pixels high. cyc 1 Link to comment Share on other sites More sharing options...
cyc Posted July 31, 2014 Author Share Posted July 31, 2014 WoW, it's great! thanks very mach! lewster32 1 Link to comment Share on other sites More sharing options...
Recommended Posts