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.

center camera view

Problem it solves

You want a picture-in-picture camera view sprite to stay locked onto a specific location, like a key or exit door.

What this block does

Repositions a standalone camera view sprite to look at fixed world X and Y coordinates.

The block

Block ID: splitscreen_centerCameraViewAt

center camera view $cameraView at x $x y $y

Parameters

NameTypeDefaultMeaning
cameraViewSpritemyCameraViewThe camera view sprite to reposition.
xnumberThe X coordinate in world pixels to focus on.
ynumberThe Y coordinate in world pixels to focus on.

Example

let view = splitScreen.createCameraView(60, 60)
splitScreen.centerCameraViewAt(view, 200, 150)

Add the extension

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