Opus Motion ★ Star on GitHub

Game & sports · lives-counter

Lives counter

A dark rounded toon panel (ink outline, hard shadow) with hero-head icons: on a loss one icon cracks in five frames, shards fly, it shakes and greys while a slam caption announces it; the last life blinks at 2 Hz under a top-spot light; a gain re-lights an icon with a pop.

A free, MIT-licensed game graphic from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Lives counter: three frames of the game graphic, start, middle and end
Lives counter — start, middle and end of the 8.0-second motion.

What Lives counter is for

Battery / retries / chances metaphors, gamified explainers, quiz shows, "you only get three tries" beats.

  • lives
  • life counter
  • hearts
  • game
  • hud
  • microgame
  • quiz
  • retries
  • chances
  • battery
  • crack
  • toon
  • hard shadow
  • blink
  • gamified
  • game show

Details

Category
Game & sports graphics
Length
8.0 s (240 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
icon label
Colour props
panel background rayColor ink textColor tabColor lossColor lastColor gainColor
Mood
comic, hud, editorial, night
Roles
subject

Use Lives counter in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add lives-counter --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render lives-counter --props '{"icon":"pilot","label":"LIVES","panel":"#1B0B45","background":"#2A0F5C","rayColor":"#3A1A78","ink":"#1A1030","textColor":"#ffffff","tabColor":"#FFC928","lossColor":"#FF3B3B","lastColor":"#FF7A1A","gainColor":"#3BDC5A"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export lives-counter --as mp4 --props '{"icon":"pilot","label":"LIVES","panel":"#1B0B45","background":"#2A0F5C","rayColor":"#3A1A78","ink":"#1A1030","textColor":"#ffffff","tabColor":"#FFC928","lossColor":"#FF3B3B","lastColor":"#FF7A1A","gainColor":"#3BDC5A"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="lives-counter"
  props={{
    icon: 'pilot',
    label: 'LIVES',
    panel: '#1B0B45',
    background: '#2A0F5C',
    rayColor: '#3A1A78',
    ink: '#1A1030',
    textColor: '#ffffff',
    tabColor: '#FFC928',
    lossColor: '#FF3B3B',
    lastColor: '#FF7A1A',
    gainColor: '#3BDC5A',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="lives-counter"
  props='{"icon":"pilot","label":"LIVES","panel":"#1B0B45","background":"#2A0F5C","rayColor":"#3A1A78","ink":"#1A1030","textColor":"#ffffff","tabColor":"#FFC928","lossColor":"#FF3B3B","lastColor":"#FF7A1A","gainColor":"#3BDC5A"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "lives-counter",
      "props": {
        "icon": "pilot",
        "label": "LIVES",
        "panel": "#1B0B45",
        "background": "#2A0F5C",
        "rayColor": "#3A1A78",
        "ink": "#1A1030",
        "textColor": "#ffffff",
        "tabColor": "#FFC928",
        "lossColor": "#FF3B3B",
        "lastColor": "#FF7A1A",
        "gainColor": "#3BDC5A"
      }
    }
  ]
}

Lives counter props

21 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
lives3lives at frame 0
max3number of icons
icon"pilot"pilot | heart | star
events[{"t":1.4,"delta":-1},{"t":3.4,"delta":-1},{"t":6,"delta":1}]array of {t seconds, delta} (-1 = lose a life, +1 = gain one)
spotlighttruetop-spot light on the last remaining life
stagetruepaint the violet sunburst stage; false = transparent overlay
label"LIVES"tab label on the panel
lossText"OUCH!"slam caption on a loss
lastText"LAST LIFE!"slam caption when one life remains
gainText"+1 LIFE"slam caption on a gain
panel"#1B0B45"panel fill colour
seed2shard seed
background"#2A0F5C"stage ground colour (stage=true)
rayColor"#3A1A78"stage sunburst ray colour
ink"#1A1030"outline colour of the panel, icons, tab label
textColor"#ffffff"slam caption fill colour
tabColor"#FFC928"label tab colour
iconColor""icon body colour ('' = the icon's own colour: heart red, star gold, pilot cream)
lossColor"#FF3B3B"caption hard-shadow colour on a loss
lastColor"#FF7A1A"caption hard-shadow colour when one life remains
gainColor"#3BDC5A"caption hard-shadow colour on a gain

Notes & credits

Technique sources:

  • lemo-opuscar styles/microgame STYLE.md "Lives as UI" + demo/hud.js (MIT, LemoLab)