Open jmsaulnier opened 4 years ago
Got this, we will take a look and I'll let you know.
Phaser works well for me but I had to tweak a few things:
this.load.image("phaser", "assets/phaser.png")
this.phaserImg = this.add.image(this.x, 300, 'phaser');
update() {
console.log("update")
this.x = (this.x+1)%100;
this.phaserImg!.setPosition(this.x, 300);
}
cursors: Phaser.Types.Input.Keyboard.CursorKeys | undefined;
phaserImg: Phaser.GameObjects.Image | undefined;
x: number = 0;
For playcanvas, not easy to reproduce the problem with your existing code, but i used https://github.com/playcanvas/engine/blob/master/examples/graphics/model-box.html and i can reproduce it. The screen starts flickering after a few seconds
I'll keep investigating the playcanvas issue after a while. Though Phaser looks maybe good enough for simple 2D games to start with ?
Playcanvas android logs at the time flickering starts:
2020-02-13 22:42:00.817 4690-4797/org.elastos.trinity.runtime E/chromium: [ERROR:mailbox_manager_sync.cc(57)] eglCreateSyncKHR failed
2020-02-13 22:42:00.827 4690-4797/org.elastos.trinity.runtime W/Adreno-GSL:
Playcanvas issue could be related to the following things:
Trying different game engines with Ionic https://github.com/goplaychat/elastOS.Playchat/tree/feature/game-engine
Different issues
with Phaser https://phaser.io/ I can't load any asset https://github.com/goplaychat/elastOS.Playchat/blob/feature/game-engine/src/game/TestScene.tsx I tried with different methods (relative path for assets, require, etc...)
with Playcanvas https://playcanvas.com/ Render is broken or freeze after 6 frames rendering and stop working (it works fine when I try on web browser) https://github.com/goplaychat/elastOS.Playchat/blob/feature/game-engine/src/pages/Game3d.tsx More examples are available here https://github.com/playcanvas/engine/tree/master/examples