The Axion Playground lets you experiment with schema definitions and see generated code in real-time.
Try It Now
Features
- Live Editing: Write or modify Axion schemas with full syntax highlighting
- Code Preview: See generated C# and TypeScript code as you type
- Examples: Learn from pre-built examples covering common patterns
- Copy Code: One-click copy of generated code
Syntax Guide
Basic Types
| Axion Type | C# Type | TypeScript Type |
|---|
i8, i16, i32, i64 | sbyte, short, int, long | number, bigint |
u8, u16, u32, u64 | byte, ushort, uint, ulong | number, bigint |
fixed | DFixed64 | number |
bool | bool | boolean |
string | string | string |
Vec2, Vec3, Vec4 | DVector2, DVector3, DVector4 | { x, y, z } |
Quat | DQuaternion | { x, y, z, w } |
Entity Definition
@key id: i64 // Primary key (required)
name: string // Player display name
score: i32 // Current score
position: Vec3 // 3D position (deterministic)
Component Definition
current: fixed // Current health (Q32.32 fixed-point)
maximum: fixed // Maximum health
armor: fixed // Damage reduction
Enum Definition
Annotations
| Annotation | Purpose |
|---|
@key | Marks primary key field |
@replicated | Field is synchronized over network |
@authority(server) | Only server can modify |
@rpc(direction) | Remote procedure call |
@indexed | Create database index |
Coming Soon
- Full Compilation: Complete Axion-to-C# compilation via WASM
- Validation: Real-time schema validation and error messages
- Shareable Links: Save and share playground sessions
- More Languages: Rust, Go, and other target languages