Skip to content

Axion Playground

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 TypeC# TypeTypeScript Type
i8, i16, i32, i64sbyte, short, int, longnumber, bigint
u8, u16, u32, u64byte, ushort, uint, ulongnumber, bigint
fixedDFixed64number
boolboolboolean
stringstringstring
Vec2, Vec3, Vec4DVector2, DVector3, DVector4{ x, y, z }
QuatDQuaternion{ x, y, z, w }

Entity Definition

entity Player {
@key id: i64 // Primary key (required)
name: string // Player display name
score: i32 // Current score
position: Vec3 // 3D position (deterministic)
}

Component Definition

component Health {
current: fixed // Current health (Q32.32 fixed-point)
maximum: fixed // Maximum health
armor: fixed // Damage reduction
}

Enum Definition

enum GameState: u8 {
Waiting = 0,
Playing = 1,
Paused = 2,
Finished = 3,
}

Annotations

AnnotationPurpose
@keyMarks primary key field
@replicatedField is synchronized over network
@authority(server)Only server can modify
@rpc(direction)Remote procedure call
@indexedCreate 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