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.

schematexΒ§ source-defined
Four Verticals football play. 11 offensive players, 11 defenders, 5 assignments. Four Verticals 2nd & 7 Β· ball on 40 40 40 50 50 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
9 lines Β· 172 chars
βœ“ parsedΒ·0.0 msΒ·0 B
100%

1. Your first play

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

schematexΒ§ source-defined
Give & Go basketball play. 5 players, 0 opponents, 3 assignments. Give & Go 1 pass 2 cut 3 pass 1 2 3 4 5 Offense (1–5) Defense (X) Cut Pass Dribble Screen
5 lines Β· 75 chars
βœ“ parsedΒ·0.0 msΒ·0 B
100%

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.


Basketball and soccer actions run in declaration order. A cut, dribble or run updates the player's position for later passes; a pass or shot does not move the player. Player symbols show starting positions, and numbered actions show the sequence. Football assignments remain simultaneous from the snap formation.

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):

  • Football β€” formation 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.
  • Basketball β€” set horns | 1-4-high | 1-4-low | box | spread-pnr | 4-out | 5-out. Players are numbered 1–5.
  • Soccer β€” formation 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:

schematexΒ§ source-defined
Overlap & Cross soccer play. 11 players, 0 opponents, 6 assignments. Overlap & Cross 1 dribble 2 run 3 pass 4 pass 5 run 6 run 1 2 4 5 3 6 8 10 7 9 11 Team Keeper Opponent Pass Run Dribble Shot
13 lines Β· 291 chars
βœ“ parsedΒ·0.0 msΒ·0 B
100%

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)
dribbleβ€”wavywavy
screen / blockT-bar βŠ₯T-bar βŠ₯ (screen)T-bar βŠ₯
shotβ€”soliddouble 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:

schematexΒ§ source-defined
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
9 lines Β· 215 chars
βœ“ parsedΒ·0.0 msΒ·0 B
100%

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 landmarks β€” rim 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:

schematexΒ§ source-defined
Spread Pick & Roll basketball play. 5 players, 0 opponents, 4 assignments. Spread Pick & Roll 1 screen 2 dribble 3 cut 4 pass 1 2 3 4 5 Offense (1–5) Defense (X) Cut Pass Dribble Screen
6 lines Β· 110 chars
βœ“ parsedΒ·0.0 msΒ·0 B
100%

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:

schematexΒ§ source-defined
Build-Up From the Back soccer play. 11 players, 0 opponents, 5 assignments. Build-Up From the Back 1 pass 2 pass 3 run 4 pass 5 run 1 2 4 5 3 6 8 10 7 9 11 Team Keeper Opponent Pass Run Dribble Shot
7 lines Β· 119 chars
βœ“ parsedΒ·0.0 msΒ·0 B
100%

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.

Found this useful?

Schematex is free, fully open source, and zero-dependency. A star helps other developers discover it.