-
Notifications
You must be signed in to change notification settings - Fork 226
Background features
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.
-
Containers: WebM (
.webm), Matroska (.mkv) - Video codecs: VP8, VP9
- Audio codecs: Opus, Vorbis
Audio plays if present in the media.
- Stages: base pivot is the center of the screen.
- Motifs & storyboards: base pivot is the top-left of the screen.
Must be video.
Path to the media file. By default it resolves relative to the engine’s video directory (you may also use absolute paths).
Audio playback volume (defaults to 100).
Set to 1 to loop the video (defaults to 0).
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/scaledeltaand camera zoom (zoomdelta,zoomscaledelta) are applied in addition to the size implied byscalemode.
Scaling filter (defaults to fastbilinear). Options:
lanczos, fastbilinear, bilinear, bicubic, experimental, neighbor, area, bicublin, gauss, sinc, spline.
The following work the same as for normal/anim elements unless noted.
-
layerno0draws behind characters;1draws in front. Back-to-front ordering still follows file order inside each layer. -
Position & motion
-
start = x,y– Initial position relative to the base pivot (+x right, +y down). -
delta = dx,dy– Parallax factor relative to camera movement. -
velocity = vx,vy– Initial per-tick velocity (px/tick). - BGCtrls: VelSet, VelAdd, PosSet, PosAdd all work on video elements.
-
-
Sinusoidal motion
-
sin.x = amp, period, phase,sin.y = ...BGCtrls SinX / SinY also supported.
-
-
Identification & visibility
-
id– For controller targeting. -
BGCtrl
Visible– Hides/shows the element; time still advances (the video keeps playing while invisible, and the audio continues but is muted). -
BGCtrl
Enable– Disables/enables the element; time does not advance while disabled (video pauses and resumes).
-
-
Clipping windows
-
maskwindow = x1,y1,x2,y2(preferred) -
window = x1,y1,x2,y2(deprecated; top-right–relative, endpoint-inclusive) -
windowdelta = dx,dy– Camera-relative movement of the clipping window.
-
-
Scaling & zoom interaction
-
scalestart = sx,sy,scaledelta = dsx,dsy– Element scale and its camera-parallax response. -
zoomdelta = d– How camera zoom affects this element (0 = no size change from camera zoom, 1 = match camera zoom). -
zoomscaledelta– Applies additional element-scale change per unit of camera zoom, analogous to other elements.
-
-
Sprite/anim-only:
spriteno,actionno,mask -
Tiling:
tile,tilespacing -
Parallax-only:
width,xscale,yscalestart,yscaledelta,rasterx,autoresizeparallax,xbottomzoomdelta -
Blending & palettes:
trans,alpha,PalFX,RemapPal, and BGCtrlsPalFX/RemapPal/Anim
Fullscreen stretch, minimal settings
[BG fullscreen_video]
type = video
path = video/intro.webm
scalemode = stretch
scalefilter = bilinearBasic 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 = 100Foreground 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