Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Phaser 3 Beta 4 Released


Recommended Posts

I'm glad to announce that Phaser 3 Beta 4 is now available.

You can download it from GitHub: https://github.com/photonstorm/phaser/releases/tag/v3.0.0-beta.4

Or use the webpack project template: https://github.com/photonstorm/phaser3-project-template

Once you've got it running I'd urge you to check out the Phaser 3 Examples. Click 'Edit' on any demo to see the code and learn from it! If you find one that doesn't work, please report it.

Any questions? Post them here.



Link to comment
Share on other sites

@richLove the "3D" engine capacity. You could very easily convert this to stereo view if linked to LCD glasses. Simply by shifting camera offset a little to the left and then back a little to the right would give the changes in retinal correspondence that the visual cortex would detect as depth, aka 3D stereo. A fps of 60 would be acceptable but obviously the higher the better. It would be soooo amazing!  So all 2D games can become "3D" with minimal change in coding! I am a newbie when it comes to coding and don't even have LCD glasses. BUT I am a retired optometrist and would be happy to help if you need advice on what to do. It would create an entire new genre of games with little to no coding once the basic set up is integrated into Phaser 3. A bit like how you can now choose your style of Physics (Arcade vs other options).

So i would not be apologetic that it is not true 3D because you now have the mechanics built in to be a leader in this area. Go Phaser 3! Need API's and other stuff that I have no idea about to talk to the LED glasses but would think that is available somewhere.

Wow just thought about training software for students, mechanics, company demos where people have to see it to understand it. A fricking huge potential market on top of true 3D stereo games! I would also love to be involved to use this concept for therapeutic purposes for treatment of lazy eyes.

Here to help if I can.

Link to comment
Share on other sites

On 9/25/2017 at 6:11 PM, rich said:

What exactly doesn't work? I just ran a few tests fine on an iPhone 5, which isn't far off the 4.

nothing. the game can't initialize, i traced it to

//  Phaser.Cache.BaseCache

var BaseCache = new Class({


    function BaseCache ()
        this.entries = new Map(); ////////////// jumps out back to game = new phaser.Game(config);
                                  /////////////  then game over ;)
        this.events = new EventDispatcher();

i suspect the safari mobile too old on this phone to get the subtleties of es6. If it works on iphone 5, it"s cool.

Link to comment
Share on other sites

of course, it is set to CANVAS, it just don't go to the init phase at all :

var config = {
type: Phaser.CANVAS,
width: 320,
height: 480

window.onload = function(){
game = new Phaser.Game(config);


normal console ouput :
phaser version x.y.z type ; canvas or webgl with fancy colors

my output :

when i trace it steps in up to Phaser.Cache.BaseCache then pops out

Link to comment
Share on other sites

ok, after further investigation the problem is in :


var Game = new Class({


function Game (config)
this.config = new Config(config);

this.renderer = null;
this.canvas = null;
this.context = null;

this.isBooted = false;
this.isRunning = false;

this.events = new EventDispatcher();

this.anims = new AnimationManager(this);

this.textures = new TextureManager(this);

//this.cache = new GlobalCache(this);

if you remove this line, it (almost) works.
the init completes, you have the console.log that prints the good version of phaser (3.0.0 - canvas) and it runs
but in the console you now have

default - BaseLoader start. Files to load: 1
project.bundle.js:29649 Fallback TODO
project.bundle.js:40729 default - Loader Complete. Loaded: 0 Failed: 1

and the bouncing logo bounces but displays a green transparent square made of two triangles, clearly the bitmap has not been loaded! ;)

Link to comment
Share on other sites

better but another (similar) problem with the set function maybe :

the baseloader exits at :

processLoadQueue: function ()
console.log('======== BaseLoader processLoadQueue');
console.log('List size', this.list.size);
console.log(this.inflight.size, 'items still in flight. Can load another', (this.maxParallelDownloads - this.inflight.size));

var _this = this; //////////////////// up to here it"s ok

this.list.each(function (file) ///////////////////// This part is not evaluated

//cut for clarity


the function exits and the console outputs :

PlayGame - BaseLoader start. Files to load: 2
phaser.min.js:41986 ======== BaseLoader updateProgress
phaser.min.js:41991 ======== BaseLoader processLoadQueue
phaser.min.js:41992 List size 2
phaser.min.js:41993 0 "items still in flight. Can load another" 4
phaser.min.js:42135 PlayGame - Loader Complete. Loaded: 0 Failed: 2

so the app works but does not display the bitmaps

Link to comment
Share on other sites

Hmm, Set is definitely imported properly in BaseLoader. It's possible it doesn't like it having the same name as a native data-type, so I have renamed it to CustomSet in the attached build.

Also, how come your log says phaser.min in it, but I provided a file called phaser.js? Did you rename it to test it locally?


Link to comment
Share on other sites

yeah, twas faster to add .min to the filename, lazy me :)

so further i traced upto the loading process of the images wich return CONST.FILE_ERRORED in the logs (i uncommented the logs in phaser.js and added a few)
all is good until we reach :

var ImageFile = new Class({

Extends: File,


function ImageFile (key, url, path, xhrSettings, config)
//// cut for clarity

onProcess: function (callback)
console.log('CONST.FILE_PROCESSING'); ////////////////////// ok it logs
this.data = new Image();

this.data.crossOrigin = this.crossOrigin;

var _this = this;

this.data.onload = function () /////////////////////// we never go in
console.log('data onload begin'); /////////////////////// we never go here




this.data.onerror = function (){

                           //// cut for clarity                                                   

                          //////////////////// logs ok

console.log('endof CONST.FILE_PROCESSING'); //////////////////// logs ok

this.data.src = URL.createObjectURL(this.xhrLoader.response);


Link to comment
Share on other sites

Did something text-related change with Beta 6? I updated from Beta 5 and there are no error messages but the texts are invisible (or non-existent), everything else seems to work fine.

class BootMenu extends Phaser.Scene {
  constructor () {
      key: 'BootMenu'

  create () {
    let config = {
      x: 100,
      y: 100,
      text: 'Phaser 3 - Examples',
      style: {
        font: '64px Arial',
        fill: '#ff00ff',
        align: 'center',
        stroke: '#ffffff',
        strokeThickness: '4'

  update () {

export default BootMenu


Link to comment
Share on other sites

  • 2 months later...
  • rich unpinned this topic

  • Recently Browsing   0 members

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