Once your level is bigger than the screen, the camera needs to follow the player. MDog Engine doesn't actually have a camera object. Instead, MDog.Draw.translate() shifts everything drawn after it, so you move the world instead of the camera.
Run right with the arrow keys. The camera eases along behind you and stops at the ends of the level.
Everything in the game uses "world" positions, so the player's x goes from 0 all the way to the end of the level. cameraX is the world position of the left edge of the screen.
To keep the player centered, the camera's left edge sits half a screen to the left of them. Then it's clamped between 0 and the level's width minus the screen's width, so you never see past the ends of the level.
translate(-cameraX, 0) shifts everything after it left by cameraX, and that's what makes the world scroll. translate(0, 0) puts things back for anything that should stay put, like the score.
lerp() moves the camera part of the way to where it wants to be each tick, so it catches up smoothly. If you'd rather it be locked to the player, skip the lerp():
cameraX = player.x + 6 - MDog.Draw.getHalfScreenWidthInArtPixels();
The camera can land between two pixels, so we round it with Math.round() before using it. Skip that and things will jitter by a pixel as the camera moves, which is weirdly noticeable.
If your level is tall as well as wide, do the same thing with a cameraY and shift both ways at once:
MDog.Draw.translate(-Math.round(cameraX), -Math.round(cameraY));
One gotcha: mouse positions from MDog.Input.Mouse are screen positions, so add cameraX and cameraY to get where the mouse is in the world.