Skip to main content

InScript — a game-focused scripting language with 59 game modules and a bytecode VM

Project description

InScript v1.0.23 — Game-Focused Scripting Language

839 tests passing · 59 stdlib modules · Python 3.10+ · Audit 9.5/10
Available on PyPI: pip install inscript-lang · First stable: v1.1.0 (Q2 2026)

InScript is a statically-typed scripting language for 2D games. v1.0.23 adds the test runner and PyPI package config — one session from the first stable release.


Install

# From PyPI (when v1.0.23 is uploaded)
pip install inscript-lang

# Or from source
git clone https://github.com/authorss81/inscript
cd inscript/inscript_package
pip install -e .

# Start
inscript --repl
inscript examples/platformer.ins
inscript --version   # InScript 1.0.23

Developer Workflow

# Run a file
inscript game.ins

# Format code
inscript --fmt game.ins           # format in place
inscript --fmt-check game.ins     # CI check

# Watch mode — auto-rerun on save
inscript --watch game.ins

# Run tests
inscript --test                   # discover test_*.ins
inscript --test --verbose         # show each test name
inscript --test --fail-fast       # stop on first failure

Test file format:

// test_physics.ins
test "collision detection" {
    import "physics2d" as P
    let r1 = P.Rect(0, 0, 10, 10)
    let r2 = P.Rect(5, 5, 10, 10)
    assert(r1.overlaps(r2), "rects should overlap")
}

test "gravity" {
    let body = physics2d.RigidBody(mass: 1.0)
    body.update(0.1)
    assert(body.vel_y > 0.0, "should fall")
}

Language Features

// Arrow functions
let evens  = [1,2,3,4,5].filter(fn(x) => x % 2 == 0)
let scores = students.map(fn(s) => s.score).filter(fn(n) => n >= 60)

// Nullable + union types
fn greet(name: string?) { print("Hi " ++ (name ?? "stranger")) }
fn parse(x: int|string) -> float { return float(string(x)) }

// Pattern matching with ranges and guards
match level {
    case 1..=5   { print("beginner") }
    case 6..=10  { print("intermediate") }
    case n if n > 10 { print("expert") }
}

// Result type chaining
fn load(path: string) -> Result {
    return try { Ok(read_file(path)) } catch e { Err(e) }
}
load("data.json")
    .map(fn(s) => parse_json(s))
    .unwrap_or({})

Feature Completeness

Category Status
Core language (all features) ✅ Complete
Bytecode VM parity ✅ Complete (v1.0.13-18)
inscript fmt formatter ✅ v1.0.19
inscript --watch ✅ v1.0.19
inscript --test test runner ✅ v1.0.23
pyproject.toml for PyPI ✅ v1.0.23
59 stdlib modules ✅ Complete
LSP + VS Code extension ✅ Complete
Docs site 🔧 v1.0.22
Web playground 🔧 v1.0.23
v1.1.0 stable Q2 2026

Tests

python test_phase6.py         # 145/145 VM
python test_phase7.py         # 32/32  operators
python test_audit.py          # 54/54  audit
python test_comprehensive.py  # 335/335 features

Upgrading from v0.6

Syntax is fully backward compatible. Just upgrade:

pip install --upgrade inscript-lang

All v0.6 programs run unchanged. New features are additive.


MIT License · GitHub · Audit (9.5/10) · Roadmap

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inscript_lang-1.0.23.tar.gz (200.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inscript_lang-1.0.23-py3-none-any.whl (205.6 kB view details)

Uploaded Python 3

File details

Details for the file inscript_lang-1.0.23.tar.gz.

File metadata

  • Download URL: inscript_lang-1.0.23.tar.gz
  • Upload date:
  • Size: 200.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for inscript_lang-1.0.23.tar.gz
Algorithm Hash digest
SHA256 db923c993ebfd4fd7019d5f33c4d5acbddc654523668a1aacfd158440552c4b3
MD5 2da57a51c9ea5f8f165f6194208788d1
BLAKE2b-256 434cbfb8c41ece22b605f8a556b0464dcb42080aed1837f5dae57aff467e2497

See more details on using hashes here.

File details

Details for the file inscript_lang-1.0.23-py3-none-any.whl.

File metadata

  • Download URL: inscript_lang-1.0.23-py3-none-any.whl
  • Upload date:
  • Size: 205.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for inscript_lang-1.0.23-py3-none-any.whl
Algorithm Hash digest
SHA256 0937232dbf0900a87b52ceb6543a8620676d1e39892d44b83a7433f150e33dac
MD5 6dba3650e89df91b64eba57df44fd8c4
BLAKE2b-256 cbede2a33031fe4dd7f66d25d226088fbeffa943127ec2a0c63c006f8d548a2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page