EGN Specification v1.5

The Open Standard for
Euchre Game Data

Euchre Game Notation (.egn) is a platform-agnostic, human-readable, and machine-optimized file format designed to record the complete chronological play of competitive Euchre games.

game.egn
{
  "fileType": "Euchre Game Notation",
  "version": "1.5",
  "metadata": {
    "title": "WEC Finals",
    "players": ["P1", "P2", "P3", "P4"],
    "ruleset": { "std": true }
  },
  "deals": [
    {
      "dealNumber": 0,
      "initialState": {
        "dealer": 3,
        "upCard": "Jd"
      },
      "phases": [
        {
          "type": "EUCHRE_BIDDING",
          "calls": ["Pass", "Pass", "Order"]
        }
      ]
    }
  ]
}

Why a Standard Notation?

The Euchre ecosystem has historically suffered from fragmentation. EGN establishes a common language for players, developers, and platforms.

Platform Interoperability

Different digital Euchre sites use custom database rows or raw log configurations. EGN acts as a bridge, allowing games played on any client to be exported, shared, and evaluated on a unified engine.

Engine Neutrality

EGN isolates the chronological facts of the game from internal application representations. A parser can load the format independently of specific rendering frameworks or proprietary state management structures.

Archival & Analysis Sizing

By eliminating redundant state data, EGN compresses entire games into an incredibly tiny memory footprint. This makes massive databases of historical games and tournament statistics highly accessible and cheap to host.

Deterministic Minimalism

EGN is built on a simple rule: store only the raw, unpredictable actions of a game, and let the parser calculate the rest.

Unlike verbose database schemas that duplicate real-time player points, trick counts, or whose turn it is to lead, EGN stores four foundational pieces of information:

  • Initial Environment: The dealer seat index and the revealed up-card.
  • Bidding Calls: Sequential decisions made clockwise from the dealer's left.
  • Play Stream: The chronological card drops exactly as they hit the table.
  • Annotations: Human commentaries, events like misdeals, or alternate branching lines

By relying on a deterministic rules engine, parsers reconstruct the exact game state dynamically. This guarantees 100% data integrity while stripping out unnecessary data bloating.

01

Minimal Input (.egn)

Contains Dealer, Up-Card, Calls, Plays, and Ruleset rules.

02

Rules Engine Parsing

Applies standard rules, handles Left Bower, computes winning cards.

03

Full Game State

Calculates trick winners, scores, led suits, and player turn orders.

Specification Reference

Quick guide to the EGN v1.5 vocabulary and standard card representations. View the JSON schema on GitHub.

Card Representations

Cards are written as 2-character strings combining Rank (Capital letter) and Suit (Lowercase letter). Special characters support edge cases:

Format Description Example
[Rank][Suit] Standard card (9s, Tens, J, Q, K, A) As (Ace of Spades), 9h (9 of Hearts)
N[Suit] Alternative notation for 9 Nc (9 of Clubs)
R or L Explicit Right or Left Bower markers R (Right Bower), L (Left Bower)
B Joker / Benny (if ruleset enabled) B (Best Bower)
Xx Unknown rank/suit (hidden data) Xc (Unknown Club), Xx (Unknown card)

Bidding Calls

Decisions are mapped sequentially in the bidding phases. Standard calls include:

Call Meaning Description
"Pass" Pass Player passes action.
"Order" Order Up / Pick Up Orders dealer to pick up up-card (Round 1).
"s", "h", "d", "c" Suit Bid Calls Spades, Hearts, Diamonds, or Clubs (Round 2).
"n" No Trump Calls No Trump (if ruleset allows).
"x" Unknown Call Used for incomplete or partial logging.

Supported Ruleset Variables

EGN supports regional and local variations through the ruleset metadata object. This lets engine parsers validate actions accordingly:

std (boolean) Enforces standard rules, including "Stick the Dealer" (prevents throw-ins).
min_rank (integer) Lowest card in the deck (e.g. 9 for 24-card deck, 7 for 32-card deck).
winning_score (integer) Target score required to win the game (defaults to 10).
canadian (boolean) If the dealer's partner orders, they must play alone (Canadian Loner).
loner_lead (string) Lead rule: "LEFT_OF_DEALER" or "LEFT_OF_LONER".
partners_best (boolean) Allow loners to swap one card with their partner (Call for Best).
joker (boolean) Adds Joker (Benny B) as the highest trump card.
allow_no_trump (boolean) Enables No Trump bidding call ("n") in Round 2.

Space-Optimized Serialization

EGN supports multiple formats to fit different application demands, from human debugging to production network transfer.

JSON

Standard JSON (.egn)

Highly readable, structured, and easy to edit. Perfect for game logging databases, human analysis notes, and sharing on github repos.

~ 15.0 KB
Condensed

Condensed Bitpack

Replaces the verbose JSON arrays with base64URL bitpacked strings. Encodes bids, dealer, cards, commentary, and alternative lines into tiny bitstreams.

~ 800 Bytes
Protobuf

Expanded Binary

Serialized binary format powered by Google Protobuf schema. Provides strong types, speed, and compatibility for enterprise backend integration.

~ 1.5 KB

CLI Utility: egn-convert

npm package

Convert seamlessly between human-readable JSON files and condensed/expanded binary representations using our Node CLI.

bash
# Install global library
npm install -g euchre-game-notation

# Convert EGN JSON to condensed binary bitpack
egn-convert game.egn game.egnb

# Convert condensed binary back to human JSON
egn-convert game.egnb restored.egn

Powered by EGN

NextSuit Labs develops a companion application suite leveraging the EGN standard to analyze, render, and capture Euchre games.

Interactive Replayer / Analyzer →

A desktop-grade analysis web app. Allows users to load EGN files, scrub through plays step-by-step, view annotations, switch perspective focus to any player's seat, and analyze alternative branching gameplay lines.

React + Vite

EGN Game Logger →

Manual game loggers built for real-time game logging. Provides button-based entry for live game recording, saving directly to clean EGN format without the need manual code formatting.

React + TypeScript

CV Auto-Logger (Coming soon!) →

Computer vision processing pipeline. Users upload game video files, and the automated pipeline detects dealers, card distributions, bidding calls, and tricks, outputting schema-compliant EGN records.

Computer Vision + TypeScript Pipeline

Overlay Renderer (Coming soon!) →

HTML5 Canvas-based graphic overlay system. Features timing controls and studio settings. Headless Puppeteer runner captures the canvas overlay dynamically, injecting real-time game cards into broadcast streams.

Canvas2D + Puppeteer