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 view property

Problem it solves

You need to measure where a camera view viewport is currently pointing in world space.

What this block does

Reads a positioning property (X, Y, Left, Right, Top, or Bottom) from a custom camera view sprite.

The block

Block ID: splitscreen_getCameraViewProperty

$cameraView camera $property

Parameters

NameTypeDefaultMeaning
cameraViewSpritemyCameraViewThe camera view sprite to check.
propertyCameraPropertyThe camera property to inspect.

Returns

numberThe pixel position value of the requested property.

Example

let view = splitScreen.createCameraView(80, 60)
let viewX = splitScreen.getCameraViewProperty(view, CameraProperty.X)

Add the extension

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