Low-level scripting
This track is the engine contract: what the language allows, how callbacks and tasks run, how data serializes, and how native APIs behave. It is written for people who already know they want a typed component.
OpalScript looks like C#. It is not C# or .NET, and it cannot reach the browser or JavaScript. Existing opal.component, Flow node, graph template, and scene behavior sources remain supported on the same registry.
If you want copy-paste classes first, use the high-level track. The complete flyer on that track is Flap.
Language and runtime
| Page | Covers |
|---|---|
| Language | Types, operators, loops, reserved names, 10k-op callback limit |
| Lifecycle and collisions | Start / Update / FixedUpdate / End, Rapier callbacks, GetComponent, reserved ids |
| Tasks | async Task, waits, Repeat, All / Race, cancellation |
| Data, unions, and maps | Records, Option, List, tagged unions, exhaustive match, Map, interfaces, generics, units, .opdef |
| Typed events | Emit / Subscribe / Next, Flow pins, EventId |
| World, spawn, native APIs | Scene queries, Spawner, SpawnConfigured, Health / physics / Motion / Animator, coordinates |
| Tests, packages, debugger | [Test], packages, frame budgets, Play review, replay limits |
How-tos
Longer contracts that stay on their existing URLs:
- Typed gameplay and balance data
- Typed HUD bindings
- Direct UI and touch actions
- Configured spawning and queries
- Time groups and pausing
- Gameplay time
- Task outcomes in Flow
- Committed Health commands
- Fireball and locked chest
Class reference
Every method and property: class index. Start with Component, Entity, Transform, Scene, Time, Game, Input, Vector2.
Native types such as Health and RigidBody2D are GetComponent targets. HealthChange is the immutable result of TakeDamageResult and HealResult.