padel-play/1: a notation for one padel point
A play is one JSON object. It describes who is on court, where each player and the ball are at chosen moments ("keys"), and what happens to the ball at each moment. The studio fills in everything between the keys. The same text is published at https://padel.sport.sovereignweb.site/studio/notation/.
The court
Metres, seen from above.
xruns across the court, 0 to 10. 0 is the near team's left.yruns along the court, 0 to 20. 0 is the far back glass, 20 the near back glass. The net is aty = 10.zis height above the floor.- The service lines are 6.95 m from the net (
y = 3.05andy = 16.95); the centre line isx = 5between them. - The back walls are glass, 3 m high. Each side wall is glass for its first 4 m from each back wall (3 m high for 2 m, then 2 m high), and mesh in between.
- Team
Ais the near team (y > 10), teamBthe far team.
The object
{
"notation": "padel-play/1",
"title": "The lob to take the net",
"summary": "One sentence.",
"notes": "The coach's notes, plain text, paragraphs split by a blank line.",
"source": "Where the idea comes from. Library plays say: general coaching knowledge, not a claim about a real player.",
"players": [
{ "id": "A1", "team": "A", "label": "A1" },
{ "id": "B1", "team": "B", "label": "B1" }
],
"keys": [
{ "t": 0, "p": { "A1": [2.5, 18], "B1": [2.8, 7] },
"ball": { "x": 2.8, "y": 7.3, "z": 1, "ev": "hit", "by": "B1", "shot": "volley" },
"caption": "Shown from this moment on." },
{ "t": 1.6, "ball": { "x": 7.5, "y": 2, "z": 0, "ev": "bounce", "arc": 6 } }
]
}
| Field | Required | Meaning |
|---|---|---|
notation | yes | Always "padel-play/1". |
title, summary, notes, source | no | Text. |
id, level, tags, explanation | no | Used by the library. explanation is a list of paragraphs. |
players | yes | One entry per player: id (letters and digits, up to 12), team ("A" or "B"), label (up to 3 characters are drawn). |
keys | yes | Moments, in time order. |
keys[].t | yes | Seconds from the start. |
keys[].p | no | Positions at this moment, { id: [x, y] }. A key may move only some players. |
keys[].ball | no | The ball at this moment: x, y, z; ev one of hit, bounce, wall, net, out; by (a player id, for a hit); shot (free text, such as lob, bandeja, chiquita); arc. |
keys[].caption | no | A line of text shown from this moment until the next caption. |
How the studio fills the gaps
- A player moves smoothly from one key that places them to the next (an eased curve), and stands still before their first and after their last.
- The ball moves in a straight line across the court between keys that place it, at a steady speed. Its height goes from one key's
zto the next, plus a curve:arcon the arriving key adds4 * arc * s * (1 - s)metres at fractionsof the way. Soarc: 6on a lob's landing gives a flight about 6 m higher in the middle than a straight line. - An event is drawn for a short moment around its key's time.
- The play lasts until 0.8 s after its last key.
In a link
A play can travel inside a link: https://padel.sport.sovereignweb.site/studio/play/#p=<data>. The data is the JSON, compressed with raw deflate and written in base64url, after a z; or, where the browser cannot compress, the JSON in base64url after a j. The part after # is never sent to the server.
Versions
Anything a later version adds will be optional, so a padel-play/1 play keeps working. A change that breaks that rule gets a new name (padel-play/2).
Every play in the tactics library is written in this notation. The studio's code that reads it is padel.js.