MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Split Screen

Add split-screen multiplayer cameras and picture-in-picture camera view sprites to MakeCode Arcade games.

set split screen to capture everything below z

Problem it solves

You have UI elements, dialogue boxes, or HUD sprites that should sit across the entire screen instead of being duplicated inside each player's camera view.

What this block does

Sets the maximum Z-index captured by the split-screen cameras. Sprites with a Z-index at or above this value will be rendered globally on top of the split screens.

The block

Block ID: splitscreen_setSplitScreenZIndex

set split screen to capture everything below z $z block

Parameters

NameTypeDefaultMeaning
znumber99The Z-index cutoff. Sprites below this depth render inside the cameras; sprites above stay on the main screen.

Example

splitScreen.setSplitScreenZIndex(50)
let hud = sprites.create(img`.`, SpriteKind.Player)
hud.z = 100

Add the extension

Add github:riknoll/arcade-split-screen to your project, or open: Import arcade-split-screen.