RUGENDOCS
Creating content

Sprites and sounds

SFF v1 and v2 sprite files and the compression formats rugen reads, linked sprites, palettes, SND sound files, music formats, and the tools for making them.

Sprites: the SFF file

An .sff is an archive of images. Each sprite has a group and an image number (200, 1), an axis (the point that lines up with the character’s position, usually between the feet) and pixel data.

Versions and formats

VersionPixel datarugen
SFF v1 (1.01)8-bit PCX (RLE or raw), one palette per sprite or sharedSupported
SFF v2 (2.00, 2.01) raw8-bit indexed, 24-bit RGB, 32-bit RGBASupported
SFF v2 RLE88-bit indexed, run-lengthSupported
SFF v2 RLE58-bit indexed, 5-bit run-lengthSupported
SFF v2 LZ58-bit indexed, LZ-styleSupported
SFF v2 PNG (format 10)8-bit indexed PNGSupported
SFF v2 PNG (formats 11, 12)24 / 32-bit PNGSupported (as RGBA)

A sprite in a format rugen cannot read becomes blank and the load prints a warning. If two sprites have the same group and image number, the first one is used.

Linked sprites

To save space, a sprite can link to an earlier one and reuse its pixels. Both SFF v1 and v2 support it, and so does rugen. Your editor creates links automatically for identical images.

Palettes

  • SFF v1: each sprite carries a 256-colour palette or says “same as the previous sprite”. For characters, sprite 0,0 and the portrait 9000,0 use the character palette that .act files replace.
  • SFF v2: palettes live in a palette table in the file (16 to 256 colours each), and each sprite points to one. Palette 1,1 is the character’s default. In v2.00 files colour 0 is transparent and the rest opaque; v2.01 keeps the stored alpha.
  • 24 / 32-bit sprites have no palette and ignore palette effects that work by index (they still take PalFX colour math).

See Characters: palettes for .act files and palette selection.

Reserved sprites

SpriteMeaning
9000,0Small portrait
9000,1Large portrait
0,0Defines the character palette in SFF v1

Fightfx and common sprites

Hit sparks, dust and super effects come from data/fightfx.sff and fightfx.air (named in the screenpack’s fight.def). HitDef sparks use fightfx by default (prefix S to use your own .air instead); Explod and GameMakeAnim reach fightfx with an F prefix, as in anim = F60.

Sounds: the SND file

An .snd is an archive of sounds addressed like sprites: group, number.

  • Sounds are WAV files (PCM 8 / 16-bit, mono or stereo). rugen’s audio library can also decode OGG, MP3 and FLAC inside an SND, but other engines cannot, so stick to WAV.
  • Duplicate entries: the first wins. Entries under 128 bytes are ignored.
  • Play them with PlaySnd value = group, number; use an F prefix for data/common.snd (F5, 0).

Conventional sound numbers

GroupUsed for
0Attack voices / swing sounds
1Hit voices
11KO voice (common1 plays 11,0)
5, 6 (common.snd)Hit and guard sounds used by most HitDefs

Music

Stages and screenpacks name music files directly (see Stages and Screenpacks). rugen streams OGG, MP3, FLAC and WAV. MIDI is not supported, and loop points are not supported yet: tracks loop from the start.

Tools

rugen’s own

CommandWhat it does
rugen view MyHero.def [action]Plays animations with collision boxes. Keys: ← / → action, ↑ / ↓ palette, B boxes, Space pause, . step, + / - zoom.
rugen view file.sffBrowses every sprite in an SFF (one “action” per sprite).
rugen view ... --shot out.pngWrites the first frame to a PNG and quits.
rugen fontgen font.ttf --size 16 --out font.defTurns a TrueType font into a MUGEN bitmap font (font .def + SFF v2). See Fonts.
rugen pixelize in.png out.webp --width 320Downscales art to a pixel look (optional --palette p.gpl, --dither, --outline).
rugen stage-gen / rugen screenpack-gen / rugen ui-genRegenerate rugen’s built-in stages and themes; their source is a good example of writing SFF v2 programmatically.

rugen does not have its own sprite editor. It writes SFF v2.01 files with raw 8-bit or 32-bit PNG sprites when it generates content.

Community tools

  • Fighter Factory (Ultimate / Studio), recommended: the standard all-in-one editor for characters, stages and screenpacks: SFF v1 / v2 sprites, palettes, AIR with box editing, SND, and the CNS / CMD text with syntax checks.
  • sprmake2: Elecbyte’s command-line tool that builds an SFF v2 from a list of PNG / PCX files. It came with M.U.G.E.N 1.1.
  • Any image editor that saves indexed PNG (Aseprite, GIMP, Photoshop) for sprite art, and any WAV editor (Audacity) for sounds.

Original reference: elecbyte.com/mugendocs-11b1.

Something wrong on this page? Edit it on GitHub.

SEARCH !!

    ↑↓ to move, Enter to open