High Score

A pixel arcade table inserts a new top entry, 'NEW HIGH SCORE', above four lower scores. A free, MIT-licensed Remotion number animation.

In Remotion, High Score is a retro arcade leaderboard: a pixel-font high score table where a new top entry races up past four lower scores, the initials type in and a 'NEW HIGH SCORE' flash slams in.

Installation
$ pnpm dlx shadcn@latest add @remocn/high-score

How to make a retro arcade leaderboard with a new high score in Remotion

A retro pixel arcade leaderboard that inserts a new top entry above four lower scores, with a 'NEW HIGH SCORE' flash, is one component. You don't need to load Press Start 2P or Silkscreen from @remotion/google-fonts, build the row shuffle with spring() or step a flash with interpolateColors() by hand. Install it and pass the scores:

bash
npx shadcn@latest add @remocn/high-score
  • rows is the table before the new run, best first: an array of { name, score }, where name is three-letter initials and score a number, for example rows={[{ name: "ACE", score: 870450 }, { name: "JFK", score: 812300 }]}. Up to five rows are shown.
  • playerScore is the new score and should beat the current #1; it races up the table and shoves each row down as it overtakes it. player is typed in as initials once it lands.
  • flash replaces the table title once the initials are in, so pass your own line, for example flash="NEW RECORD".

For a real-world ranking or product leaderboard without the arcade look use Rank Climb.

Good to know

  • Length: 128 frames of motion at 30 fps (256 at 60 fps) with the default props. That is the minimum for its Sequence; add your own hold on top. The Usage example below is a 60 fps composition with a hold, so its durationInFrames (330) is longer than twice the motion. The component's own props counted in frames stay in 30 fps frames at any frame rate, see Frame rate.
  • Installs: remotion, @remotion/google-fonts from npm, plus the remocn helpers glide, frame-rate, timeline. The shadcn CLI copies the source into your project; nothing else is needed at runtime.
  • Font: loads the Silkscreen pixel font itself through @remotion/google-fonts, so the default needs no setup. Pass fontFamily to use your own face, and load that font in your project.

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { HighScore } from "@/components/remocn/high-score";
 
const HighScoreScene = () => <HighScore player="YOU" playerScore={999990} flash="NEW HIGH SCORE" />;
 
export const RemotionRoot = () => (
  <Composition
    id="HighScore"
    component={HighScoreScene}
    durationInFrames={330}
    fps={60}
    width={1280}
    height={720}
  />
);

A pixel-font leaderboard slides in, then a new score races up the table, shoving each row down as it overtakes it. At the top the score lands with a shake, the initials type in behind a block cursor and a flash line slams in before the logo rises. Pass rows for the existing scores, plus player, playerScore and flash to make it yours. It ships light and dark through the theme prop.

Props16

PropTypeDefault
rows
HighScoreEntry[]—

The table before the new run, best first. Up to five rows are shown.

player
string"RMC"

Initials typed in once the new score lands at the top.

playerScore
number999990

The new score. Should beat the current #1.

title
string"HIGH SCORES"

Small table title shown before the flash.

flash
string"NEW HIGH SCORE"

The flash that replaces the title once the initials are in.

columns
[string, string, string]["RANK", "NAME", "SCORE"]

Column labels over the table: rank, name and score.

stagger
number3

Frames between rows as the table slides in.

accent
string"#3B5BFD"

Small cursor block while the initials are typed.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Silkscreen"

Typeface for the copy. The default loads itself; load any other font in your project first.

logo
React.ReactNode—

Replaces the remocn mark.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

theme
"dark" | "light""dark"

Ships light and dark.

speed
number1

Playback speed multiplier; 1 is the designed pace.

  • rowsHighScoreEntry[]

    The table before the new run, best first. Up to five rows are shown.

  • playerstring

    Initials typed in once the new score lands at the top.

    Default"RMC"

  • playerScorenumber

    The new score. Should beat the current #1.

    Default999990

  • titlestring

    Small table title shown before the flash.

    Default"HIGH SCORES"

  • flashstring

    The flash that replaces the title once the initials are in.

    Default"NEW HIGH SCORE"

  • columns[string, string, string]

    Column labels over the table: rank, name and score.

    Default["RANK", "NAME", "SCORE"]

  • staggernumber

    Frames between rows as the table slides in.

    Default3

  • accentstring

    Small cursor block while the initials are typed.

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background fill; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy. The default loads itself; load any other font in your project first.

    Default"Silkscreen"

  • logoReact.ReactNode

    Replaces the remocn mark.

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • theme"dark" | "light"

    Ships light and dark.

    Default"dark"

  • speednumber

    Playback speed multiplier; 1 is the designed pace.

    Default1