Game Event Script

A language for event-driven game logic

Your game rules.
One event
at a time.

Write decisions in a small scripting language. Send messages from your game. Run the same rules in C# and Swift.

Open source · Apache 2.0 · C# + Swift

battle.ges01 / Receive. Decide. Emit.
module battle
on Attack(base, bonus) {
let amount be base + bonus
emit Hit(amount: amount)
}
Your application sendsAttack(base: 30, bonus: 12)
The script emitsHit(amount: 42)

You own the game world. The script describes the rule.

Playable examples · No installation

Play Cards. Change the rules.

Try Highest Card, Mau Mau, Skat and Blackjack with editable GES rules, running locally in your browser.
The WebAssembly module is about 67 MB and loads when you open the card lab.

Open the card lab

Small language. Clear boundaries.

Fits inside your game.

01

Messages connect the pieces

Handlers react to named messages and emit new ones. Your application supplies native actions, data and the starting event.

02

State stays with you

Script values are immutable. Your application owns persistent state and decides what scripts can see through explicit native bindings.

03

A shared contract

C# and Swift implement the same language and portable program format, checked against a shared Markdown conformance corpus.

Bring GES into your application

Choose your starting point.

Both guides compile a rule, start a host and receive the same result.

GES is in 0.x development. These docs follow development; check the changelog against your installed release.

Run scripts on your machine

Install the GES CLI.

Compile, run and explore scripts in an interactive console.

From source to your game

Compile where it makes sense.
Ship only what you need.

Compile text in your application or during your content build. A product that runs precompiled programs can ship Runtime and optional native adapters without the Compiler.

Understand the host lifecycle
  1. 01
    Writebattle.ges
  2. 02
    Compilebattle.gesb
  3. 03
    Load, start, sendC# or Swift host

Start with one message

Make your first rule run.

Open the language guide