Comprehensive Language Reference

The PyLua Documentation Portal

Welcome to the official, in-depth documentation for PyLua: a high-performance programming language fusing Lua's lightweight speed, Python's clean imports, C-style curly braces, and an integrated hardware-accelerated 2D Game Engine.

Language Tour in 30 Seconds

overview_showcase.lua
-- 1. Python-style imports (No redundant require boilerplate!)
import engine
import vector
import hash

-- 2. Safe Auto-Local scoping (Variables default to local!)
origin = vector.Vector2(0, 0)
target = vector.Vector2(300, 400)
dist = (target - origin):length()

-- 3. C-style curly braces & modern != inequality:
if (dist != 0) {
    print("Distance to target: " .. dist .. " pixels")
}

-- 4. Built-in 2D Game Engine (LEngine):
win = engine.Window.create("PyLua Game Showcase", 1280, 720)
world = engine.Physics.createWorld(0, 9.8)

engine.run({
    window = win,
    physicsWorld = world,
    draw = function() {
        engine.Graphics.clear(0.1, 0.1, 0.15, 1.0)
        engine.Graphics.drawText("Welcome to PyLua!", 40, 40, 2.0, 1.0, 1.0, 1.0, 1.0)
    }
})

Documentation Sections

1. Language Syntax & Semantics

2. Compiler & Virtual Machine Runtime

3. Standard Libraries

4. 2D Game Engine (LEngine)