# Update project from phaser 2 to phaser 3

**URL:** <https://phaser.discourse.group/t/update-project-from-phaser-2-to-phaser-3/3056>\
**Category:** Phaser 3\
**Created:** [July 9, 2019, 4:42pm UTC](https://phaser.discourse.group/t/update-project-from-phaser-2-to-phaser-3/3056 "2019-07-09T16:42:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lapamplemousse](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@lapamplemousse](https://phaser.discourse.group/u/lapamplemousse)\
**Post date:** [July 9, 2019, 4:42pm UTC](https://phaser.discourse.group/t/update-project-from-phaser-2-to-phaser-3/3056/1 "2019-07-09T16:42:47Z")

</div>

I am trying to put all my phaser 3 games into one ionic 4 application. I found the following example which works perfectly for phaser 2 ([https://store.enappd.com/product/ionic-phaser-game-framework-ionic-4/](https://store.enappd.com/product/ionic-phaser-game-framework-ionic-4/)). however when I try to update to phaser three the screen goes blank. I imagine one of the problems is to do with how scenes have replaced states. does anyone have any ideas how to get around this or is this example workable anymore??

below is some code

```
 export class HomePage {

   constructor(private menuCtrl: MenuController) {
     game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO, 'space- 
     invaders',
       { preload: this.preload, create: this.create, update: this.update, render: this.render });

       that = Object.create(this.constructor.prototype);

   }

    preload() {
        this.load.image('bullet', 'assets/phaser/bullet.png');
        game.load.image('enemyBullet', 'assets/phaser/enemy-bullet.png');
    }
 }

```

game.load works for phaser 2, if I use this.load in ionic it throws the following error ‘Property ‘load’ does not exist on type ‘HomePage’.’

With these changes to phaser is this method even possible??

---

<div class="post-metadata">

**Author:** ![ThePandaJam](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/thepandajam/32/1814_2.png) [@ThePandaJam](https://phaser.discourse.group/u/ThePandaJam)\
**Post date:** [July 12, 2019, 10:44am UTC](https://phaser.discourse.group/t/update-project-from-phaser-2-to-phaser-3/3056/2 "2019-07-12T10:44:45Z")

</div>

I am currently updating a game from Phaser 2 to Phaser 3 and I noticed that the entire project structure has changed. if your homepage is a scene, you’re going to need to define it as

```
class HomePage extends Phaser.Scene {
	constructor() {
		super("homePage");
	}
	create() {
	}
	update() {
	}
}

```

for me `game.js` is a separate file entirely, which contains all the configs.  
`game.load` is not really a thing anymore either, it’s `this.load` instead. You can have that in a separate preloader scene or load assets for each level. I recommend the former.

Check out these links for a list of things which are done completely differently in Phaser 3 compared to Phaser 2

> **[Phaser World Issue 116](https://madmimi.com/p/a022cb)**
>
> Welcome to Issue 116 of Phaser World Oh wow. It's been quite intense here since the last issue! The big news, of course, is that Phaser 3 shipped....

  

> **[Phaser World Issue 118](https://madmimi.com/p/ff68db)**
>
> Welcome to Issue 118 of Phaser World And we're back with another jam packed issue! On the games-front, we've a multiplayer hero battler, a sup...
