hi @Treeman92 any luck with your finding so far?
I’m having the same problem setting up Phaser 3 for Ionic 4/5 too. I’ve been searching for few days now, and found no clue about how to proceed.
I tried both compile-time & runtime integration (same as your solution), but I couldn’t get any far and I also have the same “this.game.load is not a function” problem.
Has there been a resolution to this? Oddly enough, I just started trying to get Phaser 3 and Ionic 5 to integrate and I am getting the exact same error…the Phaser Discord has not yet responded with whether these 2 even play nice together…
Thank you! I am new to this. I am using Ionic 6 with Angular 10 and Phaser 3 with type definitions. How to I make the script from the .ts file display in the .html file with best practices?
I’m no expert, but compared to what I have been doing, we seem to be going about it the same way except I have abstracted my scenes to individual xxxx.scene.ts files for separation of concerns.
for example
export class MyScene extends Phaser.Scene {
constructor() {
super('MyScene'); //Your Scene name reference
}
preload() {
}
create() {
}
update() {
}
}
I end up with something like BootScene → LoadingScene → TitleScene → GameScene
BootScene: add all the scenes and then go to the next scene
LoadingScene: load assets, sprites, tiles, sound, etc
TitleScene: once the loading is done show your game and prompt user to start
GameScene: GameScene
and then all you have to change is your config var:
I think you should import phaser in the app component and delete the homepage.
Edit. Since I don’t know how to use the full height of newer Android phones, I am following android dev docs trying to find a solution. Maybe it Is possibile to use Kotlin and Phaser. Who knows, I am Reading docs trying to find a way to solve this issue.