# Choppy Scrolling

**URL:** <https://phaser.discourse.group/t/choppy-scrolling/10505>\
**Category:** Phaser 3\
**Created:** [October 25, 2021, 12:31am UTC](https://phaser.discourse.group/t/choppy-scrolling/10505 "2021-10-25T00:31:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![t\_rev44](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/t_rev44/32/4157_2.png) [@t\_rev44](https://phaser.discourse.group/u/t_rev44)\
**Post date:** [October 25, 2021, 12:31am UTC](https://phaser.discourse.group/t/choppy-scrolling/10505/1 "2021-10-25T00:31:21Z")

</div>

My side-scroller game is running at around 65 fps (I still haven’t figured out how to fix it at 60) and the scrolling of the tile layers is very stuttery/choppy. I tried to record it to show as an example, but it looks smooth on the playback. It drives me crazy seeing the world move one small step at a time instead of at a consistent pace. I have reduced the size of the level.json to as small as 20KB and this happens even when the game is the only thing running on my computer, with 6BG of ram available.

My paralax backgrounds seem to scroll smoothly (maybe because of them scrolling slower)

I have:  
arcade physics  
roundPixels: true  
fixedStep: false (when this was true, the characters and entire game stuttered even more)  
this.cameras.main.startFollow(player);

What else could be causing this?

---

<div class="post-metadata">

**Author:** ![NickHatBoecker](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/nickhatboecker/32/5380_2.png) [@NickHatBoecker](https://phaser.discourse.group/u/NickHatBoecker)\
**Post date:** [October 25, 2021, 10:27pm UTC](https://phaser.discourse.group/t/choppy-scrolling/10505/2 "2021-10-25T22:27:36Z")

</div>

I dont know if this is helpful but I also had some problems with scrolling. But in my case there were some weird “scanlines”. I could fix it by using a `Point` element, whose position is always the same as the player’s one. And the camera has to follow the `Point` instead of the player. I don’t really know why this is better, but it fixed my issues :'D

```javascript
// In any scene
const cameraDolly = new Phaser.Geom.Point(player.x, player.y)
this.cameras.main.startFollow(cameraDolly)

// If you set the player's position, also set dolly's position
player.setPosition(1, 10)
cameraDolly.setPosition(1, 10)

```

---

<div class="post-metadata">

**Author:** ![t\_rev44](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/t_rev44/32/4157_2.png) [@t\_rev44](https://phaser.discourse.group/u/t_rev44)\
**Post date:** [October 27, 2021, 4:37am UTC](https://phaser.discourse.group/t/choppy-scrolling/10505/3 "2021-10-27T04:37:36Z")

</div>

Thank you, but that didn’t seem to make a difference.

---

<div class="post-metadata">

**Author:** ![Calabi](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/calabi/32/3712_2.png) [@Calabi](https://phaser.discourse.group/u/Calabi)\
**Post date:** [October 28, 2021, 8:04pm UTC](https://phaser.discourse.group/t/choppy-scrolling/10505/4 "2021-10-28T20:04:47Z")

</div>

1. Make sure you are using latest version of Phaser - 3.55.2 as there have been issues with choppy scrolling in certain versions.

2. In config make sure you have.

```javascript
  render: {
    pixelArt: true,
  },

```

1. roundPixels does need to be true. Set as second argument when calling startFollow.

```javascript
this.cameras.main.startFollow(this.player, true);

```

---

<div class="post-metadata">

**Author:** ![t\_rev44](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/t_rev44/32/4157_2.png) [@t\_rev44](https://phaser.discourse.group/u/t_rev44)\
**Post date:** [November 3, 2021, 9:23pm UTC](https://phaser.discourse.group/t/choppy-scrolling/10505/5 "2021-11-03T21:23:07Z")

</div>

Those changes didn’t make a significant difference either.

However, I just realized that when I unplug my extra monitor and run it just on my laptop, the scrolling is perfect. Any idea why that could be? I don’t want my players to have to unplug their monitors.

---

<div class="post-metadata">

**Author:** ![Calabi](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/calabi/32/3712_2.png) [@Calabi](https://phaser.discourse.group/u/Calabi)\
**Post date:** [November 4, 2021, 11:55pm UTC](https://phaser.discourse.group/t/choppy-scrolling/10505/7 "2021-11-04T23:55:43Z")

</div>

You could try adjusting lerpX and lerpY e.g.

```javascript
this.cameras.main.startFollow(this.player, true, 0.5, 0.5);

```

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [November 4, 2021, 11:56pm UTC](https://phaser.discourse.group/t/choppy-scrolling/10505/8 "2021-11-04T23:56:56Z")

</div>

Can you verify the FPS (Chrome has a meter somewhere) on both monitors?
