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.

create camera view sprite width height

Problem it solves

You want a picture-in-picture mini-map or security monitor sprite that shows a different area of the map.

What this block does

Creates a new sprite that acts as a standalone camera viewport displaying the game world.

The block

Block ID: splitscreen_createCameraView

create camera view sprite width $width height $height

Parameters

NameTypeDefaultMeaning
widthnumber160Width of the camera viewport sprite in pixels.
heightnumber120Height of the camera viewport sprite in pixels.

Returns

Sprite — A camera view sprite that displays part of the world.

Example

let miniMap = splitScreen.createCameraView(60, 45)

Add the extension

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