Jump to content

Basic splash screen


Recommended Posts

Hi guys.


I would like to add a splash screen to my little game and I've been looking around for the simplest option. It would basically be an image for now and the game needs to start once the splash image is gone. Is there any way to pull this off without using states/stages?


I've been looking at the Tanks example and found this in the create(); function.

logo = game.add.sprite(0, 200, 'logo');logo.fixedToCamera = true;game.input.onDown.add(removeLogo, this);
function removeLogo () {game.input.onDown.remove(removeLogo, this);logo.kill();}

So, instead of a logo like in the example, I would have an image that matches the canvas size. Any other suggestions, examples?

Link to comment
Share on other sites

That's pretty much the way to do it as you described. Add a button or something that activates all the killing of logos and the button itself to start the game. Although its a way to do it, I would recommend learning the states way. I wanted a splash screen and all the other stuff we associate with games but without states it was going to be a pretty hard task to pull off. Look in the resources folder in your phaser files and have a look at basic template if you even feel like giving states a shot.

Link to comment
Share on other sites


This is a shot in the dark, but maybe you're avoiding sates because of the lack of transition between them? Am I right?

If that's the case, check this plugin I wrote: https://github.com/cristianbote/phaser-state-transition


It's really helpful, and I'm thinking to improve it when I stumble over more 'demanding' transitions or something.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...