Now I myself am not such an experienced game developer in Phaser but i have been practicing and have learned a thing or two.
The most important thing to consider while developing games in Phaser is “State Management”.
What you do basically is that you take the game and divide it into different blocks i.e loading, main menu, gameplay & gameover screens and through state managment you control the flow of your game.
Here is a really good article explaining state management:
For the UI:
- Use images as buttons.Set the width and height of the images
according to the screen width and height.
button = game.add.sprite(x, y, ‘play’);
button.width = game.world.width*0.6;
button.height = game.world.height/0.2;
By doing this no matter what the width of screen is, your buttons/images will resize accordingly.
- If you are using multiple sprites which have same height,width, anchor then use groups.
- Kill an un-necassary sprites which you are not using, to increase the performance of the game.
These are some of the small things I learned during my dev in Phaser.
You dont need to be great to start, just keep practicing and you will get a hand of it.