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
36.64k stars 7.07k forks source link

Camera shaking #6810

Open damian-pastorini opened 2 months ago

damian-pastorini commented 2 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 1 month 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.