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 camera views and picture-in-picture viewports to Arcade games for multiplayer or mini-maps.

camera property

Problem it solves

You want to find the exact edge positions (like top or left) of a player's split-screen camera to spawn obstacles just off-screen.

What this block does

Returns the current numeric value of a specific camera property, such as X, Y, Left, Right, Top, or Bottom.

The block

Block ID: splitscreen_getCameraProperty

camera $camera $property

Parameters

NameTypeDefaultMeaning
cameraCameraWhich camera to inspect.
propertyCameraPropertyThe coordinate property to read (X, Y, Left, Right, Top, or Bottom).

Returns

numberThe current pixel value of the selected property.

Example

let camLeft = splitScreen.getCameraProperty(splitScreen.Camera.Camera1, CameraProperty.Left)

Add the extension

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