MakeCode Games!

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

← Back to extensions

Raycasting 3D Render

Transforms your 2D tilemaps and sprites into a first-person 3D/2.5D raycasted world with jumping, heights, camera controls, and multi-directional animations.

Sprite jump, with height duration

Problem it solves

You want the player or an enemy to do a smooth, predictable jump into the air and land after a specific amount of time.

What this block does

Calculates vertical launch speed and gravity automatically so the sprite reaches an exact peak height and lands after the given duration.

The block

Block ID: rcRender_jumpWithHeightAndDuration

Sprite %spr=variables_get(mySprite) jump, with height $height duration $duration=timePicker|ms  block

Parameters

NameTypeDefaultMeaning
spriteSpritemySpriteThe sprite that will jump.
heightnumber16Maximum jump height in pixels.
durationnumber500Total airtime in milliseconds from takeoff to landing.

Returns

void — Nothing.

Example

controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
    Render.jumpWithHeightAndDuration(Render.getRenderSpriteInstance(), 16, 500)
})

Add the extension

Add github:The-Code-Zone/Raycasting-pxt-extension to your project, or open: Import Raycasting-pxt-extension.