TheScruffyGuy Posted April 21, 2018 Share Posted April 21, 2018 I am trying to learn Phaser 3 and I have created ground object 100x100px ground object to randomize, I decided to scarp that and made a image the length I need but now the old image wont change and the second ground object I created is still on the game screen even after I had erased the code. I even went as far as removing its image from function preload(). I am saving the code after every alteration. var game = new Phaser.Game(config); function preload () { this.load.image('bulld', 'assets/images/bulldozer.png'); this.load.image('world', 'assets/images/background1.png'); this.load.image('rock1', 'assets/images/rock1.png'); this.load.image('grnd1', 'assets/images/ground1.png'); } function create () { this.add.image(550,350, 'world'); rocks = this.physics.add.sprite(550, 540, 'rock1'); rocks.setBounce(0.1); rocks.setCollideWorldBounds(true); ground = this.physics.add.staticGroup(); ground.create(400, 652, 'grnd1').setScale(0.27).refreshBody(); } Link to comment Share on other sites More sharing options...
onlycape Posted April 22, 2018 Share Posted April 22, 2018 Hi @TheScruffyGuy, It seems a problem with the browser cache. Have you refreshed the browser after save the new code ?. Greetings. Link to comment Share on other sites More sharing options...
TheScruffyGuy Posted April 22, 2018 Author Share Posted April 22, 2018 Hello @onlycape, I ended up deleting everything that referenced any objects related to the problem, refreshed the page then reinstalled it and it cleared the problem so I am pretty sure your right about it being a browser cache issue. I have since finished my first "game" and am working on something a little more difficult. Link to comment Share on other sites More sharing options...
rich Posted April 22, 2018 Share Posted April 22, 2018 If you use Chrome, always test your game with the Dev Tools window open. It automatically disables the cache, so you can be sure that what you see on-screen is what's in your code. CanDbas 1 Link to comment Share on other sites More sharing options...
Recommended Posts