Walkable tile
The smallest collision example: an ordinary tile players can walk through.
What it demonstrates: Walkability without effects.
Run this example
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-walkable-tile --template walkable-tile1
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
Add a cosmetic step callback without adding state or an editor. Walkability and feedback are independent.
Source
This code is included directly from the working example when the site builds.
src/definition.ts
ts
/** This tile declares walkability; Scape supplies collision, movement and placement. */
import { defineObject, exactKeys, record } from '@scape/sdk';
/** Walkability is independent: this tile has no actions, arrival effects or push. */
export const walkableTile = defineObject<Record<string, never>>({
type: 'example.walkable-tile',
version: 1,
emoji: '🟦',
label: 'Walkable tile',
hint: 'a floor tile with no movement or arrival effects',
initial: () => ({}),
valid: (state): state is Record<string, never> => record(state) && exactKeys(state, []),
actions: {},
walkable: true,
});1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
src/project.ts
ts
/** Project entry: exports walkable-tile to Scape's SDK loader. */
import { defineProject } from '@scape/sdk';
import { walkableTile } from './definition.js';
export default defineProject({ objects: [walkableTile] });1
2
3
4
5
2
3
4
5
