getmoonshotHQ / elastOS.Playchat

Elastos dApp - Play games and challenge your friends
https://goplaychat.com/
MIT License
1 stars 0 forks source link

Game engine issue #1

Open jmsaulnier opened 4 years ago

jmsaulnier commented 4 years ago

Trying different game engines with Ionic https://github.com/goplaychat/elastOS.Playchat/tree/feature/game-engine

Different issues

BenjaminPiette commented 4 years ago

Got this, we will take a look and I'll let you know.

BenjaminPiette commented 4 years ago

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;
BenjaminPiette commented 4 years ago

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

BenjaminPiette commented 4 years ago

I'll keep investigating the playcanvas issue after a while. Though Phaser looks maybe good enough for simple 2D games to start with ?

BenjaminPiette commented 4 years ago

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: : ioctl fd 398 code 0xc0200933 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 22 Invalid argument 2020-02-13 22:42:00.827 4690-4797/org.elastos.trinity.runtime W/Adreno-GSL: : (18f, 15, 46098) fail 22 Invalid argument 2020-02-13 22:42:00.827 4690-4797/org.elastos.trinity.runtime W/Adreno-GSL: : ioctl fd 398 code 0xc0200933 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 22 Invalid argument 2020-02-13 22:42:00.827 4690-4797/org.elastos.trinity.runtime W/Adreno-GSL: : (18f, 15, 46098) fail 22 Invalid argument

BenjaminPiette commented 4 years ago

Playcanvas issue could be related to the following things: