Schematex

Sports playbook

About sports playbooks

A sports playbook is the coach's diagram of a single play, set, or team shape — dots for players, lines for movement, drawn in a notation every coach reads at a glance. Schematex renders one from text for the three biggest team sports: American football (X&O play diagrams), basketball (half-court sets), and soccer / association football (team shapes and movement patterns). Each sport is drawn in its own coaching-standard notation on its own correctly-scaled field, court, or pitch.

You name a sport and a formation; the engine places the players. You add movement verbs (route, pass, cut, dribble, run, screen, shot); the engine draws each in the line style that sport's coaches actually use. Unlike an image generator, the output is editable — adding a fourth receiver or moving a screen is a one-line change.

playbook·§
↘ preview
100%
Four Verticals football play. 11 offensive players, 11 defenders, 5 assignments. Four Verticals 2nd & 7 · ball on 40 deep half deep half T G C G T QB RB X H Y Z E T T E W M S C C F $ Offense Defense Route / run Block Motion Zone
UTF-8 · LF · 9 lines · 172 chars✓ parsed·4.9 ms·15.1 KB SVG

1. Your first play

Every diagram starts with a header naming the sport, then a formation (which places the players), then assignments:

playbook·§
↘ preview
100%
Give & Go basketball play. 5 players, 0 opponents, 3 assignments. Give & Go 1 2 3 4 5 Offense (1–5) Defense (X) Cut Pass Dribble Screen
UTF-8 · LF · 5 lines · 75 chars✓ parsed·1.5 ms·6.8 KB SVG

pass 1 2 draws a pass from player 1 to player 2; cut 1 rim sends player 1 to the rim. Basketball draws passes dashed and cuts solid — the convention on every coaching whiteboard.


2. The three sports

Pick the sport in the header (sport football|basketball|soccer). Each uses its real unit and the conventional coaching viewpoint:

SportUnitViewSurface
footballyardsoffense at the bottom attacking up; downfield = upgreen field with yard lines, hashes, end zone
basketballfeetNBA half-court; baseline + hoop at the toplight maple hardwood
soccermetresfull 105 × 68 m pitch (attack toward the right); or view halfgreen pitch with IFAB markings

3. Players & formations

The fastest way to place players is a formation (football/soccer) or set (basketball):

  • Footballformation i-form | shotgun | singleback | pistol | spread | trips | empty | goal-line | wishbone with optional strength left/right. Receivers are X Z H Y (Y = tight end), backs QB RB FB, line LT LG C RG RT.
  • Basketballset horns | 1-4-high | 1-4-low | box | spread-pnr | 4-out | 5-out. Players are numbered 15.
  • Soccerformation 4-3-3 | 4-4-2 | 4-2-3-1 | 4-5-1 | 4-4-1-1 | 3-5-2 | 3-4-3. Players are numbered 1 (GK) … 11.

For set-pieces or free-form diagrams, place players individually and crop to a half:

playbook·§
↘ preview
100%
Overlap & Cross soccer play. 11 players, 0 opponents, 6 assignments. Overlap & Cross 1 2 4 5 3 6 8 10 7 9 11 Team Keeper Opponent Pass Run Dribble Shot
UTF-8 · LF · 13 lines · 291 chars✓ parsed·1.9 ms·10.2 KB SVG

4. Movement verbs & line styles

The same line style means different things in different sports — Schematex draws each sport's own convention, and the legend always matches:

VerbFootballBasketballSoccer
passdashed (throw)dashedsolid
run / cutsolidsolid (cut)dashed (run)
dribblewavywavy
screen / blockT-bar ⊥T-bar ⊥ (screen)T-bar ⊥
shotsoliddouble line

Note the inversion: basketball draws a pass dashed and a cut solid; soccer draws a pass solid and a run dashed. That is how the two coaching communities actually diagram — Schematex honours each.

Move targets can be a player id, a landmark name, or explicit coordinates (to x,y).


5. Football — routes, runs, defense

Pass routes use the route tree: go fly streak slant flat hitch out in dig curl comeback corner post wheel cross drag seam. Run concepts: dive iso power counter sweep toss draw trap. Blocking uses block, pull, and handoff. Set goal N to draw the end zone and goalposts:

playbook·§
↘ preview
100%
Red Zone — Play-Action Fade football play. 11 offensive players, 11 defenders, 5 assignments. Red Zone — Play-Action Fade 1st & 5 · ball on 5 10 10 deep middle T G C G T Y QB F RB X Z E T T E W M S C C $ F Offense Defense Route / run Block Motion Zone
UTF-8 · LF · 9 lines · 215 chars✓ parsed·1.4 ms·13.6 KB SVG

defense cover-0/1/2/3/4/6 draws the coverage shell; defense 4-3 | 3-4 | nickel | dime sets the front. hash nfl|college|none controls the hash marks.


6. Basketball — sets, landmarks, screens

Cuts and passes target named landmarksrim elbow wing corner short-corner block slot top high-post dunker (prefix l/r for left/right). screen A B draws a ball-screen (T-bar) for player B; dribble is a wavy line:

playbook·§
↘ preview
100%
Spread Pick & Roll basketball play. 5 players, 0 opponents, 4 assignments. Spread Pick & Roll 1 2 3 4 5 Offense (1–5) Defense (X) Cut Pass Dribble Screen
UTF-8 · LF · 6 lines · 110 chars✓ parsed·0.7 ms·8.2 KB SVG

defense man matches each defender to a man; defense zone-2-3 | zone-3-2 | zone-1-3-1 draws a zone front.


7. Soccer — shapes, runs, build-up

A formation alone draws the team shape. Add pass (solid), run (dashed), and dribble (wavy) to show a phase of play:

playbook·§
↘ preview
100%
Build-Up From the Back soccer play. 11 players, 0 opponents, 5 assignments. Build-Up From the Back 1 2 4 5 3 6 8 10 7 9 11 Team Keeper Opponent Pass Run Dribble Shot
UTF-8 · LF · 7 lines · 119 chars✓ parsed·0.7 ms·9.4 KB SVG

Landmarks include box top-box d penalty-spot near-post far-post six-yard center. defense low-block | mid-block | high-press overlays the opponent's shape. Soccer renders daylight-only — theme: dark falls back to the default pitch.


8. Validation

The engine rejects the mistakes models actually make and lists the valid options:

  • unknown sport, formation / set, defense, or named route;
  • a move referencing an undeclared player id;
  • a malformed coordinate or a missing to target.

Softer issues (e.g. a zero-length move) render with a warning rather than failing.


9. Grammar (EBNF)

playbook   = "playbook" string "sport" sport NL { stmt NL } ;
sport      = "football" | "basketball" | "soccer" ;
stmt       = field | formation | defense | player | move | zone | "view" view ;
field      = "field" { "down" num | "distance" num | "los" num
                     | "goal" num | "hash" hash | "view" view } ;
formation  = ( "formation" | "set" ) name [ "left" | "right" ] ;
defense    = "defense" scheme ;
player     = "player" id pos "at" coord "label" text ;
move       = route | run | pass | cut | dribble | screen
           | shot | motion | handoff | pull | block ;
route      = "route" id namedRoute [ num ] [ "left" | "right" ] ;
run        = "run" id ( concept [ "left" | "right" ] | "to" coord ) ;
pass       = "pass" id ( id | landmark | "to" coord ) ;
cut        = "cut" id ( landmark | "to" coord ) ;
dribble    = "dribble" id "to" coord ;
screen     = "screen" id id ;
shot       = "shot" id [ "to" coord ] ;
zone       = "zone" coord coord string ;
coord      = num "," num ;
view       = "full" | "half" ;
hash       = "nfl" | "college" | "none" ;

Five canonical plays per sport ship as examples — Four Verticals, Mesh, Smash, Power O, and a Red-Zone fade for football; Pick & Roll, Horns, Give & Go, Floppy, and a Backdoor cut for basketball; 4-3-3 shape, Build-Up, Overlap, High Press, and Counter-Attack for soccer.