Skip to content

Background features

K4thos edited this page Sep 27, 2025 · 19 revisions

Video Background Element (nightly build only)

Ikemen GO adds a fourth background element type that plays a video as part of the background definition. It follows the same [BG ...] block format as other elements and participates in draw order exactly like them.

Media support

  • Containers: WebM (.webm), Matroska (.mkv)
  • Video codecs: VP8, VP9
  • Audio codecs: Opus, Vorbis

Audio plays if present in the media.

Coordinate system & base pivot

  • Stages: base pivot is the center of the screen.
  • Motifs & storyboards: base pivot is the top-left of the screen.

Parameters (video-specific)

type (required, string)

Must be video.

path (required, string)

Path to the media file. By default it resolves relative to the engine’s video directory (you may also use absolute paths).

volume (optional, int)

Audio playback volume (defaults to 100).

loop (optional, boolean int)

Set to 1 to loop the video (defaults to 0).

scalemode (optional, string)

How the video frame is sized into the window (defaults to none):

  • none – No scaling.
  • center – No scaling; center the frame; crop/pad as needed.
  • fit – Uniform scale to fit entirely inside; letter/pillar-box if needed.
  • fitwidth – Match window width; center-crop vertically if taller; otherwise pad.
  • fitheight – Match window height; center-crop horizontally if wider; otherwise pad.
  • zoomfill – Uniform scale to fully cover window; center-crop overflow.
  • stretch – Non-uniform scale to exactly fill (may distort).

Element‐level transforms like scalestart/scaledelta and camera zoom (zoomdelta, zoomscaledelta) are applied in addition to the size implied by scalemode.

scalefilter (optional, string)

Scaling filter (defaults to fastbilinear). Options: lanczos, fastbilinear, bilinear, bicubic, experimental, neighbor, area, bicublin, gauss, sinc, spline.


Standard background parameters

The following work the same as for normal/anim elements unless noted.

  • layerno
  • start
  • delta
  • positionlink
  • id
  • velocity
  • sin.x
  • sin.y
  • scalestart
  • scaledelta
  • zoomdelta
  • zoomscaledelta
  • maskwindow
  • window (deprecated)
  • windowdelta
  • roundpos
  • angle
  • xangle (nightly)
  • yangle (nightly)
  • projection (nightly)
  • focallength (nightly)

Unsupported background parameters

  • spriteno
  • animno
  • tile
  • tilespacing
  • trans (all modes)
  • alpha
  • mask
  • remappal
  • facing
  • vfacing

Examples

Fullscreen stretch, minimal settings

[BG fullscreen_video]
type        = video
path        = video/intro.webm
scalemode   = stretch
scalefilter = bilinear

Basic looping background video behind characters

[BG city_video]
type        = video
path        = video/city_loop.webm
loop        = 1
volume      = 70
scalemode   = fit
scalefilter = fastbilinear
layerno     = 0
start       = 0,0
delta       = .25,.25
id          = 100

Foreground video banner with motion and visibility control

[BG banner]
type        = video
path        = video/banner.mkv
scalemode   = fitwidth
layerno     = 1
start       = 0,-30
delta       = 1,1
velocity    = .4, 0
scalestart  = 1,1
zoomdelta   = 0

[BGCtrlDef vid_ctrls]
looptime = -1

[BGCtrl hide_banner]
type  = Visible
time  = 600,900
value = 0
ctrlID = 101

[BGCtrl drift_right]
type = VelSet
time = 0,-1
x    = .4
ctrlID = 101

Clone this wiki locally