Tutorial Mugen
Tutorial Mugen
This document assumes that you are already familiar with how to create SFF
files.
A background in MUGEN consists of the following elements:
*) One or more background sprites, drawn from back to front, with or
without masking, and with or without parallax effects
*) Specifications of how those sprites should move in relation to the camera
*) Animation data for background animations
*) Specifications of the width and height of the playing field
*) Specification of the "ground level" for the stage
*) More miscellaneous settings
*) Background controller definitions for more advanced effects.
The simplest kind of stage will simply have a single layer in the background.
Suppose you have a single PCX file which you want to use as a background
picture. Create a file stage1.sff with this PCX as sprite 0,0. Place the axis
on the center of the bottom edge of the PCX. Now copy stage0.def to
stage1.def and open stage1.def up in a text editor.
In the [Info] group, you can customize the name of the stage. Stage names
should be enclosed in double quotes.
To get the stage up and running as quickly as possible, simply go to the
[BGDef] group. Change the spr parameter to point to stage1.sff, and set
debugbg to 1. Now go to the [BG 0] group. Make sure the type parameter is
set to normal (since this is not a parallaxing background element). Make
sure the spriteno parameter is set to 0,0. Set the layerno to 0 to prevent
the background from being drawn in front of the characters. Finally, set
the start parameter to the desired starting location of the background.
The coordinates are measured from the center of the bottom edge of the
screen. If you placed the axis for sprite 0,0 in the bottom center as
suggested, then you can just set start = 0, 0.
Other parameters that can be set for this BG element:
delta = xdelta, ydelta
xdelta and ydelta are scaling factors: for each pixel the camera moves
horizontally, the background element will move xdelta pixels, etc. If you
only have a single background image, you will generally want to set delta to
1, 1. Using smaller deltas for the rear background layers can create the
illusion of depth when you have multiple layers.
trans = none, add, or sub
Controls the transparency of the background element.
mask = 0 or 1
If you have multiple layers, set mask = 1 on the foreground layers to prevent
drawing color 0 for them. If masking is not necessary, then make sure to set
mask = 0.
tile = x, y
tilespacing = x, y
window = x1, y1, x2, y2
Unless you are using a small image which you want to tile to fill up the whole
background, you should set tile to 0,0. window should be left at 0,0,639,479
for now.
Finally, delete or comment out the [BG 1] block, since we don't have any