bousing Posted January 13, 2017 Share Posted January 13, 2017 Hello my dev friends. In this occasion, I post about a problem what I have... I make a game with this beautifull framework but is very slowly. When the game starts all is black for considerable time until loaded it because the browser is loading the game (client-side code, I know)... but I want know Why does it take too long? I want add a loadingbar for show it to the user while the browser load the code...but doesn't works I create my loading bar like this preload: function(){ this.load.image("loading","/assets/logo_eluniversalVE.jpg"); } //IN MY PRELOADER SCRIPT: create: function(){ var loadingbar = this.add.sprite(this.game.world.centerX,this.game.world.centerY,"loading"); } but doesn't work... If I apply minification to my client-side code, will be more fast ? I going to thanks every help from you, about the loading bar or about the performance Greetings and thank you for reading Link to comment Share on other sites More sharing options...
PhasedEvolution Posted January 13, 2017 Share Posted January 13, 2017 What do you mean by not working? Link to comment Share on other sites More sharing options...
Rafaelx Posted January 13, 2017 Share Posted January 13, 2017 us canvas, make sure you tell phaser to use canvas. Link to comment Share on other sites More sharing options...
samme Posted January 13, 2017 Share Posted January 13, 2017 Look at resource loading times in the Network panel. Loading bar example is in Project Templates/Basic/Preloader.js Link to comment Share on other sites More sharing options...
bousing Posted January 18, 2017 Author Share Posted January 18, 2017 On 13/1/2017 at 3:15 PM, Rafaelx said: us canvas, make sure you tell phaser to use canvas. if I use canvas and not WebGL my performance is better ? Thank you for your answer Link to comment Share on other sites More sharing options...
Fatalist Posted January 18, 2017 Share Posted January 18, 2017 26 minutes ago, bousing said: if I use canvas and not WebGL my performance is better ? Thank you for your answer In some situations. For example, if you use a BitmapData(and change it every frame), or text that you change every frame. Or if you use pre-2.7 Phaser and use a tilemap. Link to comment Share on other sites More sharing options...
Recommended Posts