Staaarter

PDN to GIF Converter

Parses a PDN (Portable Draughts Notation) move list using standard 1-32 English-draughts square numbering, applies each move (including capture chains and king promotion) to a checkers board, and renders one animated GIF frame per move, reusing this codebase's existing draughts board model, with a new pixel renderer. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-29
By Staaarter Team
convertergifcheckersdraughtsgenerator

Overview

Introduction

This tool turns a PDN checkers/draughts game transcript into a simple animated GIF, playing through the game one move at a time, including real capture and king-promotion handling.

It's built on this codebase's existing draughts board model, adding a genuine (if honestly simplified) move-applying engine and a purpose-built pixel renderer.

What Is PDN to GIF Converter?

PDN (Portable Draughts Notation) is the standard plain-text format for recording checkers/draughts games, using standard 1-32 square numbering on an 8x8 board (e.g. '11-15' for a simple move, '18x11' for a capture).

This tool parses that move list, applies each move to a checkers board (including multi-jump capture chains and king promotion), and renders the resulting position as one frame of an animated GIF per move.

How PDN to GIF Converter Works

PDN text is tokenized by stripping bracketed header tags, comments, move numbers, and result markers, leaving a flat list of move tokens like '11-15' or '18x11x4'.

Starting from the standard starting position (from this codebase's shared draughts-board.ts model, 12 pieces per side), each token's squares are converted from standard 1-32 numbering to board coordinates, the moving piece is relocated hop by hop (removing any captured piece at each hop's midpoint for capture chains), and promoted to a king if it lands on the back row; the position after every successfully-applied move is rendered as one RGBA frame and the whole sequence is encoded as a GIF.

When To Use PDN to GIF Converter

Use it to get a quick, shareable visual of how a checkers/draughts game unfolded from its PDN transcript, including captures and king promotions.

Don't use it as a rules-accurate draughts engine: it doesn't verify that a capture was mandatory, that a non-king piece only jumped forward, or any other legality rule beyond basic geometry.

Features

Advantages

  • Implements real capture-chain and king-promotion logic, not just static piece placement.
  • Reuses this codebase's existing, already-tested draughts board model rather than inventing a new one.
  • Fails gracefully: an unresolvable move stops the animation at that point instead of erroring out the whole conversion.

Limitations

  • The 10x10 international draughts variant and 'flying king' long-distance diagonal jumps are not supported; only standard 8x8 single-square-adjacent jumps are recognized.
  • Move legality isn't verified: mandatory-capture rules, direction restrictions for non-king pieces, and other draughts rules beyond basic square-to-square movement are not checked.
  • When a move token can't be resolved (an invalid square number, a missing piece, or a jump that isn't a valid single-square diagonal), the animation simply stops at that point rather than guessing.

Examples

Animating an opening exchange with a capture

Input

1. 9-13 22-18 2. 5-9 25-22 3. 11-15 18x11 4. 8x15 24-19 5. 15x24 28x19

Output

An 11-frame animated GIF (starting position + 10 moves) showing pieces captured on both sides across the exchange

Each capture token removes the jumped-over piece at its hop's midpoint, and the multi-hop chain ends with the moving piece on its final square.

Best Practices & Notes

Best Practices

  • Double-check your PDN uses standard 1-32 English-draughts numbering; other draughts variants' coordinate systems aren't recognized.
  • If the animation stops earlier than expected, check the move right after the last rendered frame: it's most often an invalid square number or a jump distance this tool doesn't recognize.
  • Keep games under this category's 256-frame GIF limit; extremely long games may need trimming first.

Developer Notes

convertPdnToGif tokenizes PDN text with regex passes (bracketed headers, comments, move numbers, results), then applies each token to a DraughtsBoard from random/lib/draughts-board.ts via applyPdnMove: squares are converted between standard 1-32 numbering and (row, col) via squareToRowCol (derived directly from isDarkSquare's (row+col)%2===1 convention), capture chains are walked hop by hop removing the midpoint piece for each jump, and king promotion is checked against the back row after each token's final landing square. Every successfully-reached position is rendered via a purpose-built rasterizer (fillRect/fillCircle over a PixelBuffer) and encoded with the shared encodeGif().

PDN to GIF Converter Use Cases

  • Sharing a quick visual walkthrough of a checkers/draughts opening or tactical exchange from its PDN
  • Turning a PDN game archive into a GIF preview for a blog post or forum
  • Visually spot-checking a PDN file's move list and capture sequence for obvious notation errors

Common Mistakes

  • Assuming international (10x10) draughts notation will work here: only standard 8x8 English/American numbering is supported.
  • Expecting illegal or non-mandatory captures to be rejected; this tool applies whatever the PDN says without checking draughts rule legality.

Tips

  • If a game won't fully render, try isolating the specific move causing trouble: it's usually an out-of-range square number or an unsupported long jump.
  • Pair with gif-to-zip-archive-converter to export the animation's individual frames as separate PNGs for a move-by-move slideshow instead.

References

Frequently Asked Questions