jk90 Posted March 25, 2014 Share Posted March 25, 2014 I'm having problems displaying a splash screen/ loading screen using Phaser. I have managed to create a splash screen using text and a background colour, but one problem I am having is with displaying an image before the rest of the files have loaded. All of the loading of images must be done in the preload function but I cant use this function to actually display any images. What I would really like to do is load the splash screen image, display it and then continue to load the rest of the images ect. in the background. Preferably with text displaying the loaded %. Phaser apparently doesn't make this easy. Link to comment Share on other sites More sharing options...
Chupup Games Posted March 25, 2014 Share Posted March 25, 2014 Look in the Phaser directory, there have one resources folder with game templates. You can load your Splash Screen in the Boot State together with a loading bar, that gets updated when your other assets are loading. Normaly this is pretty easy to do in phaser. Link to comment Share on other sites More sharing options...
jk90 Posted March 25, 2014 Author Share Posted March 25, 2014 hmmm... you see I didn't use these templates with my game, but looking over the code it seems they loaded the 'preloaderBackground' in the boot state and then switched and added the sprite in the next states preload. I was trying to do this all in one state. I will try to work something out. Link to comment Share on other sites More sharing options...
rich Posted March 26, 2014 Share Posted March 26, 2014 You can't do this with just one state I'm afraid. But it would be quite trivial to add in a tiny Boot state to handle it, then your full game. Link to comment Share on other sites More sharing options...
Recommended Posts