Side Scroller Game

How to I make a side scroller?

Make a moving player, and if you want the screen to scroll horizontally (left right), put this code into the moving player’s update script:

this.project.pan.x+=(-(this.x-project.width/2)-(this.project.pan.x))/2;

If you want the screen to scroll vertically (up down), you can use this code instead:

this.project.pan.y+=(-(this.y-project.height/2)-(this.project.pan.y))/2;

If both ways, add both lines in the update script of the moving player.

Let me know if this is what you needed?

Hello, all it did was move to the camera to the player? I don’t have controls for the players yet though?

All parts are fully interchangeable. Use any code as needed. I have more advanced versions with powerups, floating, and fast falling, and if you need them, just ask.
The yellow is the goal. The red brings you to the placeholder. The black is ground.

Wick file

Side Scroller Engine4-8-2021_14-03-30.wick (6.0 KB)