gamerfan Posted June 28, 2014 Share Posted June 28, 2014 Hi All, First of all congratulations to Phaserjs team for such a wonderful framework!!!. It is too easy to develop game using this framework. However, I have stuck with in scrolling inside the Tilemap. Currently the issue is scrolling is not smooth when the screen coordinates are greater than my value. I use game.camera.x inside update() method to scroll the tile map. When game starts, tilemap will start scrolling. Please find my code: Later I used the 'layer' object in the code to scroll the layer, but that is not scrolling either and I commented the code. Please let me know are there any other technique to do this. Thanks in advance if( game.camera.x >= 365 ) { playerShip.x = 40 ; game.camera.x = 0; }else { playerShip.x+=4; game.camera.x +=4; // layer.scrollX = game.camera.x * 2; } Link to comment Share on other sites More sharing options...
valueerror Posted June 28, 2014 Share Posted June 28, 2014 let the player fly in a normal way.. give it a velocity and fix the camera to the player. Link to comment Share on other sites More sharing options...
Recommended Posts