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

Problem it solves

You want to make a platforming jump with custom vertical launch velocity and gravity.

What this block does

Applies vertical velocity and downward acceleration to make a sprite jump. Only works if the sprite is currently standing at its resting elevation.

The block

Block ID: rcRender_jump

Sprite %spr=variables_get(mySprite) jump||, with speed $v=spriteSpeedPicker acceleration $a block

Parameters

NameTypeDefaultMeaning
spriteSpritemySpriteThe sprite to jump.
vnumber60Initial vertical upward speed in pixels per second.
anumber-250Vertical acceleration / gravity in pixels per second squared.

Returns

void — Nothing.

Example

let mySprite = sprites.create(img`.`, SpriteKind.Player)
Render.jump(mySprite, 60, -250)

Add the extension

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