Phaser 3 Tutorial

Phaser V3 is out now! There are lots of new features and improvements. In this article i am going to cover basics of Phaser 3.

First of all, Phaser is not using Pixi rendering engine anymore. Phaser V3 uses it’s own rendering engine. If you want to learn more about it’s new renderer, you can take a look to renderer’s source code from here. I haven’t do any performance benchmarks between Phaser CE and Phaser 3 but i am sure about it’s performance.

Phaser  3 Tutorial

Before getting starting with Phaser 3, i checked it’s documentation, there are some weird changes. First of all, Phaser 3 is now supporting 3D cameras using 2d objects. Second, groups are a little bit changed. I couldn’t see setAll() and forEach() methods in groups.

Starting a Game

We still use new Phaser.Game(), but we are going to use only one parameter with Phaser 3.

One parameter of Game() function is an object, we put all required attributes into this object and pass it to Game() function.

Loading & Rendering Assets

Actually, loading asses and rendering them is almost same in Phaser 3.

Loading asset:

Rendering an image:

But result is not same:

Phaser 3 Tutorial
Phaser 3 Tutorial


As you may remember, (0,0) was bottom left corner of screen, it still is. But image anchors are changed.

If you run same code with Phaser CE, you will see that whole image. But now we can only see half of image. So let’s move it a little bit.


Aannd result:

Phaser 3 Coordinates
Phaser 3 Coordinates

That’s it. Ok, it’s a good feature, but i still need some time to get used to it.


You can start Physics using configuration object:

Creating new sprite is a little bit changed, you can initialize a new sprite using active physics model’s factory. In this example I am going to use arcade factory to create a new sprite:

Now you can see bouncing image on your screen.

Oh i also created an issue about resizing arcade sprites.


Phaser is a great framework to create html5 games, with version 3 it will be better. Today, i am going to focus on cameras. After figuring out them, write a new article about cameras in Phaser 3.

Do not forget to subscribe my Youtube and Twitch channel. I am making games on Twitch, every friday 21:00 (GMT+3)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.