dajomu Posted October 29, 2014 Share Posted October 29, 2014 Hi, I'm posting this because I've been doing a lot of searching and I can't seem to find a solution to this problem. I'm sorry if this is something generic that I've missed. The problem:When I start to move my player character, the character remains in the centre (good), but the tiled background doesn't scroll with the player. This means that the player can run and jump on platforms, but they are "invisible" as the background hasn't moved. I'm using a Tiled generated level in a platformer.The camera is following the player using -this.camera.follow(player);The level was created in tiled, it uses a 200 x 200 image split into a grid of 20x20 tiles.The level itself is 64 x 40 tiles, so if the full resolution of the tiled level is 1280 x 800.The resolution of the main phaser game is 640 x 400.This means that the game should scroll in both x and y. I'm just doing this as a test so far and I may want to produce larger levels later. Does anyone have any clues as to why this might be happening? Thanks,Dan Link to comment Share on other sites More sharing options...
MaximeC Posted October 29, 2014 Share Posted October 29, 2014 Same issue for me. Fixed by using an older version of Phaser. Apparently, this might be fixed in the dev version too. Link to comment Share on other sites More sharing options...
dajomu Posted October 29, 2014 Author Share Posted October 29, 2014 So is this an actual bug in phaser then?What version did you go back to? Link to comment Share on other sites More sharing options...
MaximeC Posted October 29, 2014 Share Posted October 29, 2014 I think it was 2.0.7. I finally decided to stop moving the camera anyway so I'm back with the last version. Link to comment Share on other sites More sharing options...
dajomu Posted October 29, 2014 Author Share Posted October 29, 2014 Brilliant, thanks for the info! Link to comment Share on other sites More sharing options...
UgnisKarolis Posted October 29, 2014 Share Posted October 29, 2014 This is a known bug in Phaser 2.1.3. There is a fix in the dev branch of Phaser. https://github.com/photonstorm/phaser/tree/dev#bug-fixes Link to comment Share on other sites More sharing options...
Recommended Posts