Getting Started
InScript — a game-focused scripting language for Python 3.10+
Installation
pip install inscript-lang
Or with game support (requires pygame):
pip install "inscript-lang[game]"
Verify installation:
inscript --version # InScript 1.0.21
Hello World
print("Hello, InScript!")
let name = "world"
print(f"Hello, {name}!")
// Variables are typed
let x: int = 42
let pi: float = 3.14159
let greeting: string = "Hello"
First Program
Save as hello.ins and run with inscript hello.ins:
fn greet(name: string) -> string {
return "Hello, " ++ name ++ "!"
}
let people = ["Alice", "Bob", "Charlie"]
for person in people {
print(greet(person))
}
// Output:
// Hello, Alice!
// Hello, Bob!
// Hello, Charlie!
REPL
Start the interactive shell:
inscript --repl
Useful REPL commands:
.help Show all commands .doc math Show math module docs .vars List defined variables .fns List defined functions .vm Toggle bytecode VM mode exit Quit
Next Steps
💡 Upgrading from v0.6? Run
pip install --upgrade inscript-lang.
All v0.6 syntax is fully backward compatible.