Build a Level
Scenario: Build a complete platformer level from scratch using Director. The level needs: floor tiles, floating platforms at three heights, enemy spawn points, a pickup area, collision shapes, and physics layers configured correctly.
This example demonstrates Director's batch operations for efficient level construction.
The design
Height 0: Floor (columns 0-40)
Height -3: Platform A (columns 5-9) — low jump
Height -6: Platform B (columns 14-18) — medium jump
Height -9: Platform C (columns 22-26) — high jump
Height -12: Goal platform (columns 30-35) with pickup triggerEnemies spawn on platforms A and B. A OmniLight3D illuminates the goal area.
Step 1: Create the scene
Step 2: Place the tiles
Step 3: Place enemies and pickups
Step 4: Add lighting
Step 5: Configure physics layers
Step 6: Verify the built level
Press F5 to run the game. Then verify the structure:
Summary
This level was built in 6 steps, all through Director:
- Scene structure (1 batch, 5 nodes)
- Tile placement (1 batch, 5 fill operations, 62 tiles total)
- Enemy and pickup instances (1 batch, 3 instances)
- Lighting (1 batch, 4 operations)
- Physics layers (1 batch, 2 operations)
- Verification via Spectator (2 queries)
Total: 5 batch calls + 2 Spectator calls = 7 round-trips to build a complete level.