Opus Motion ★ Star on GitHub

Game & sports · pixel-platformer-scene

Pixel platformer scene

Attract-mode pixel platformer in crisp 180p index colour: parallax mountains, clouds, forest hills with a colour-cycling waterfall, a scrolling ground with a river and sagging plank bridge, a chibi hero running, jumping, grabbing coins and stomping slimes, with +100 / +500 popups and a SCORE / COIN HUD.

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

Pixel platformer scene: three frames of the game graphic, start, middle and end
Pixel platformer scene — start, middle and end of the 8.0-second motion.

What Pixel platformer scene is for

Gaming channels, indie-game trailers, "level up" beats in explainers and nostalgic brand ads; set `events` to land coins and stomps on the music.

  • pixel
  • pixel art
  • platformer
  • game
  • 8-bit
  • retro
  • parallax
  • hero
  • coins
  • stomp
  • hud
  • score
  • attract mode
  • crt
  • level
  • trailer

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
—
Colour props
—
Mood
pixel, nature, hud
Roles
subject

Use Pixel platformer scene in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render pixel-platformer-scene --props '{"events":[{"t":30,"kind":"coin"},{"t":56,"kind":"coin"},{"t":84,"kind":"stomp"},{"t":106,"kind":"coin"},{"t":205,"kind":"jump"},{"t":234,"kind":"stomp"}],"scrollSpeed":1.25,"heroColor":"","palette":[]}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export pixel-platformer-scene --as mp4 --props '{"events":[{"t":30,"kind":"coin"},{"t":56,"kind":"coin"},{"t":84,"kind":"stomp"},{"t":106,"kind":"coin"},{"t":205,"kind":"jump"},{"t":234,"kind":"stomp"}],"scrollSpeed":1.25,"heroColor":"","palette":[]}'

React / Next.js

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

<MotionPlayer
  motion="pixel-platformer-scene"
  props={{
    events: [
      {t: 30, kind: 'coin'},
      {t: 56, kind: 'coin'},
      {t: 84, kind: 'stomp'},
      {t: 106, kind: 'coin'},
      {t: 205, kind: 'jump'},
      {t: 234, kind: 'stomp'},
    ],
    scrollSpeed: 1.25,
    heroColor: '',
    palette: [],
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="pixel-platformer-scene"
  props='{"events":[{"t":30,"kind":"coin"},{"t":56,"kind":"coin"},{"t":84,"kind":"stomp"},{"t":106,"kind":"coin"},{"t":205,"kind":"jump"},{"t":234,"kind":"stomp"}],"scrollSpeed":1.25,"heroColor":"","palette":[]}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "pixel-platformer-scene",
      "props": {
        "events": [
          {
            "t": 30,
            "kind": "coin"
          },
          {
            "t": 56,
            "kind": "coin"
          },
          {
            "t": 84,
            "kind": "stomp"
          },
          {
            "t": 106,
            "kind": "coin"
          },
          {
            "t": 205,
            "kind": "jump"
          },
          {
            "t": 234,
            "kind": "stomp"
          }
        ],
        "scrollSpeed": 1.25,
        "heroColor": "",
        "palette": []
      }
    }
  ]
}

Pixel platformer scene props

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

PropDefaultWhat it does
events[{"t":30,"kind":"coin"},{"t":56,"kind":"coin"},{"t":84,"kind":"stomp"},{"t":106,"kind":…list of {t (frame the hero meets it), kind: coin | stomp | jump | stop}; stop = decelerate and stand
scrollSpeed1.25world scroll in pixels per frame (180p picture)
heroColor""hero suit colour (hex); empty = default red
palette[]optional hex overrides for the 38 palette slots (see SLOT order in r2-mg2b-kit); empty = daylight palette
stagesAt[]frames at which the day shifts to afternoon, golden, sunset, dusk, night (empty = stay daytime)
hudtrueshow the SCORE / COIN counters
crttruescanlines + vignette over the upscaled pixels
seed3seed for clouds, trees and ground texture

Notes & credits

Technique sources:

  • mg-styles-15 demos/20-pixel/film.js (MIT)
  • video 20-pixel 0.3-4.4 s