A game-focused scripting language. Statically typed, readable, and ships with 59 built-in game modules.
Requires Python 3.10+. Optional: pip install inscript-lang[game] for pygame.
// Structs with inheritance, operators, and priv fields struct Vec2 { x: float y: float fn +(o) { return Vec2{ x: self.x + o.x, y: self.y + o.y } } fn len() { return sqrt(self.x*self.x + self.y*self.y) } } // ADT enums + exhaustive pattern matching with guards enum Shape { Circle(r: float) Rect(w: float, h: float) } fn area(s: Shape) { return match s { case Shape.Circle(r) if r > 10.0 { "large circle" } case Shape.Circle(r) { 3.14159 * r * r } case Shape.Rect(w, h) { w * h } } } // Arrow functions + method chaining let scores = students .filter(fn(s) => s.active) .map(fn(s) => s.score) .filter(fn(n) => n >= 60) .sorted() // Result type for safe error handling fn divide(a: float, b: float) -> Result { if b == 0.0 { return Err("division by zero") } return Ok(a / b) } let r = divide(10.0, 2.0).map(fn(v) => v * 3.0).unwrap_or(0.0)
RigidBody, StaticBody, World, collision callbacks, AABB and circle shapes
Entity-Component-System: spawn, query, mark_dead, remove_dead
A* and Dijkstra pathfinding, flow fields, walkable grid
Follow target, shake effects, zoom, world↔screen coordinate transforms
Emitter with burst/continuous modes, color/size over lifetime
Finite State Machine with guards, on_enter/on_exit hooks, wildcard transitions
Load Tiled maps, get layers/tiles/objects, coordinate helpers
Clip, Animator, frame-based with fps/loop/duration control
Game save slots — write/read typed data, copy, delete, list
Multi-language strings, interpolation, fallback, file loading
GameServer, GameClient, msgpack-style pack/unpack
load/play/stop/volume/mute, music, positional audio
| Tool | Command | Status |
|---|---|---|
| REPL | inscript --repl | ✅ Complete |
| Formatter | inscript --fmt file.ins | ✅ v1.0.19 |
| Watch mode | inscript --watch file.ins | ✅ v1.0.19 |
| Test runner | inscript --test | ✅ v1.0.21 |
| Static analysis | inscript --check file.ins | ✅ Complete |
| LSP server | inscript --lsp | ✅ Complete |
| VS Code extension | Syntax highlighting + snippets | ✅ Complete |
| Web playground | playground.html | ✅ v1.0.23 |