All examples · Sprites and 2D · As Markdown, for AIs

Split screen

What this example shows

One level and two players, each with half of the screen. Each half is a view of the world in a rectangle of the screen (createView) with a camera that follows its own player: the level runs once, and each half draws it again with its own parallax. useWorldOffScreen has the screen draw only the two halves, so the world is not drawn a third time underneath.

Click the preview first so it hears the keyboard. Player 1: A and D walk, W jumps. Player 2: ← → walk, ↑ jumps.

Starting
Starting
—