Skip to content

GameEventScript 0.4.0

Latest

Choose a tag to compare

@schloepke schloepke released this 11 Oct 00:54
· 100 commits to main since this release
3d5e6d3

GameEventScript 0.4.0

GameEventScript 0.4.0 expands the language, improves runtime performance, and adds the browser-based Card Lab. This release also strengthens binary validation, cross-language testing, and verification of the distributed packages and CLI tools.

Language improvements

  • Collection pipelines: Combine sources with cartesian, lockstep/zip, union, intersect, and difference. Multiple bindings let selectors work directly with individual components.
  • Compact nested loops: Write for suit in suits and rank in ranks { ... } with the same ordering and scope as ordinary nested loops.
  • More readable conditions: Use condition-first choices such as when condition then value otherwise fallback, parameterless predicate shorthand, and inclusive is between comparisons.
  • Direct extension-result access: Parenthesized extension calls now support member access and collection selectors without additional parentheses.
  • Inline assembly: C# and Swift support asm blocks with symbolic operands, scope validation, and definite-initialization checks.

For example, creating a deck no longer requires a nested fold:

let deck be [:cartesian suits, ranks
    :select suit, rank => [suit: suit, rank: rank]]

Card Lab

Explore Highest Card, Mau Mau, Skat, and Blackjack in the browser, then change their GES rules and start a new game.

The fullscreen editor includes syntax highlighting, diagnostics, source folding, search, local Draft and Saved slots, and source downloads. A read-only GESA dump provides highlighted bytecode, foldable regions, and source annotations.

The game and editor share one WebAssembly instance. Board layouts, badges, notices, and contextual actions can be configured through the game environment.

Runtime and tooling

  • Strict Numeric modes provide dedicated numeric operations, including efficient register-level paths.
  • sum and average now consistently require numeric values.
  • Swift register storage and inline execution reduce value-copy overhead while preserving exact Int64 arithmetic and units.
  • Both CLIs support opcode profiling through run --profile report.md.
  • Swift CI separates native verification from isolated package-consumer checks and reuses refreshed builds for API validation.

Reliability and distribution

This release adds bounded binary-reader fuzzing, independently generated Reader/Writer roundtrip tests, and bidirectional C#–Swift binary exchange. Selected consumer upgrades from 0.3.0 are verified using frozen fixtures.

Release verification covers package metadata, symbols, reproducibility, fresh installation, and native CLI execution across Windows, macOS, and Linux targets. Platform support and hardware-specific performance profiles are now explicitly documented.

Upgrading from 0.3.0

  • Upgrade Compiler and Runtime together and recompile scripts. New instructions and Numeric modes require the updated Runtime.
  • Use fold for text or list concatenation. sum and average are numeric; numeric strings require explicit conversion. Boolean and Dice values remain numeric.
  • Keep qualified extension names contiguous: use :namespace.name without internal whitespace.
  • Combined sources evaluate left to right before validation. Later source expressions still execute when an earlier source is invalid.
  • Perform a clean rebuild of C# consumers after upgrading packages.

GameEventScript remains pre-1.0. The selected 0.3.0 upgrade checks do not establish general backwards compatibility for all existing binaries.

[Full changelog](https://github.com/schloepke/GameEventScript/blob/0.4.0/CHANGELOG.md) · [Platform support](https://github.com/schloepke/GameEventScript/blob/0.4.0/docs/guide/distribution/Platforms.md)