Jump pad
A same-floor travel recipe moves the entering player four cells east when a safe landing exists.
What it demonstrates: Offset travel · host-authoritative movement.
Run this example
This example requires a host with generic travel support. Check host compatibility before trying it.
All learning examples appear in a compatible developer world. To export a standalone project, an operator with source access runs this from the Scape repository (choose a new destination under an existing directory):
sh
yarn sdk:starter /path/to/my-jump-pad --template jump-pad1
In the exported project:
sh
yarn install
yarn build
yarn dev --origin https://your-scape-host1
2
3
2
3
Follow connection and approval. The exported dev script invokes scape gizmo dev. The kit includes three private archives for the SDK, CLI and MCP server; keep them and the Yarn resolutions together. Third-party dependencies still need installation. See the CLI reference for commands; no public Scape registry install is available yet.
Try changing it
Try a different bounded offset and exit order. Validate blocked, occupied, and out-of-bounds landings on a compatible host.
Source
This code is included directly from the working example when the site builds.
src/definition.ts
ts
/** Jump pad demonstrates a directional offset destination without linking or Portal artwork. */
import { defineObject, exactKeys, record } from '@scape/sdk';
export const jumpPad = defineObject<Record<string, never>>({
type: 'examples.jump-pad',
version: 1,
emoji: '⏩',
label: 'Jump pad',
hint: 'Walk into this pad to jump four cells east',
initial: () => ({}),
valid: (state): state is Record<string, never> =>
record(state) && exactKeys(state, []),
actions: {},
walkable: true,
travel: () => ({
destination: { kind: 'offset', x: 4, y: 0 },
exits: [[0, 0]],
cooldownMs: 650,
arrival: { durationMs: 180, scale: 0.7 },
}),
});
export default jumpPad;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
src/project.ts
ts
/** Standalone project entry for the Scape development CLI. */
import { defineProject } from '@scape/sdk';
import { jumpPad } from './definition.js';
export default defineProject({ objects: [jumpPad] });1
2
3
4
5
2
3
4
5
