phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.22k stars 7.1k forks source link

Camera shaking #6810

Open damian-pastorini opened 6 months ago

damian-pastorini commented 6 months ago

Version

Description

Example Test Code

The issue is visible in the current examples:

Additional Information

The issue happens in both ways depending what the camera follows, with the background or the player.

Coming from https://github.com/phaserjs/phaser/issues/5018#issuecomment-2093802674

ncoop720 commented 6 months ago

I am also experiencing this issue and it is driving me insane. It only seems to happen when when trying to implement a fixed time step for multiplayer games when the monitor refresh (165hz) rate doesn't match the fixed time step (60 fps):

update(_time: number, delta: number): void {
    if (!this.currentPlayer || this.paused) return

    this.elapsedTime += delta
    while (this.elapsedTime >= FIXED_TIME_STEP) {
      this.elapsedTime -= FIXED_TIME_STEP
      this.fixedTick()
    }  
  }

Using direct movement rather than physics movement.

0x5e5e commented 4 months ago

seems to be fixed in https://github.com/phaserjs/phaser/releases/tag/v3.85.0-beta.2 @ncoop720