Anda di halaman 1dari 3

UFGE BKG Faq by The Fenix

Date: 2/28/03
-for use with UFGE v.35The Background File (*.bkg):
----------------------------The Background File is comprised of a series of tags / flags that define
the background area that the fighters occupy. Here is an example of a simple f
unctional .BKG file;
.Example:
!layer backgrounds\Fireball\layer1.bmp 640 240 0 0
!floor 35
.end Example
In this example, we have a background that uses a single layer (called layer1.bm
p), is 640 pixels wide, and 240 pixels tall. The characters will stand about 35
pixels up from the very bottom of the screen.
.Available .BKG tags
"!layer $ # # # #" - This tag is used to define a background layer. Layers are
the main substance of the Background file, and all other elements are derivative
of them. If a background is comprised of multiple layers, the engine will auto
matically calculate parralax scrolling for them. The layer tag is followed by a
string, and four numbers. The string is used to identify the path and filename
of the image to be displayed on this layer. The first number is used to specif
y the width of the actual layer. The second number is used to specify the heigh
t of the layer. The third number is used to specify an xoffset for the layer in
the background. The fourth number is used to specify a yoffset for the layer i
n the background.
"!autoscroll # #" - This tag is used to specify an autoscroll for this layer. W
ith an autoscroll you can create a layer that will automatically scroll horizont
ally or vertically wether the characters are moving or not. This tag is followe
d by two numbers. The first indicates how many pixels that layer will scroll ho
rizontally at a time. If it is negative, the layer will scroll to the left, if
it is positive, the layer will scroll to the right. The second number indicates
how many pixels the layer will scroll vertically. If it is negative, the layer
will scroll upwards, if it is positive, the layer will scroll downwards.
"!colorkey # # #" - This tag specifies a color key for the layer. A color key i
s used for layers that may obstruct layers and objects further back with empty s
pace. By setting a color key, the color of the empty space will be transparent
allowing things behind this layer to be seen. The three numbers that follow thi
s tag are the R,G,B values for the transparent color. Each colorkey is assigned
specifically to the layer definition proceeding it. If multiple layers require
color keys, you must specify one for each, even if they use the same RGB value.
"!floor #" - This tag specifies how far from the ground the characters will stan
d in the game. If this number is 0, or not present, the characters will be stan
ding at the very bottom. The larger this number the further up from the bottom
they stand.
"!bgwipe #" - This tag will tell UFGE to automatically wipe the very back of the
screen with a given color. If the furthest end of your background does not req
uire an image, or the background is not 240 pixels tall you should use this tag.

"!noscroll" - This tag will tell UFGE not to scroll the current layer of your ba
ckground when the characters move.
"!foreground" - This tag will display this layer in front of the characters inst
ead of behind them.
"!nolayer" - This tag will define a layer where only objects are displayed not t
he layer image.
"!bgm $" - This tag specifies a background music to be used on this stage.
"=end=" - This flag will terminate the .BKG file. Any information in the file l
isted after this end will not be read by UFGE.
.end Available tags.
.Objects
Using objects, you can place a seperate entity on any given layer in you
r background that can move and animate on it's own. Objects are automatically a
ssigned to whichever layer was defined previous. Each layer can have multiple o
bjects defined that animate and operate independant of one another. Here is an
example of an object definition:
.Example:
=object=
!image backgrounds\Fireball\fire1.bmp
!delay 20
!image backgrounds\Fireball\fire2.bmp
!delay 20
!image backgrounds\Fireball\fire3.bmp
!delay 2000
!xyposition 240 75
=end=
.end Example
In this example, we define an object at the coordinate 240, 75. This object wil
l show fire1.bmp for 20 loops, then fire2 for 20 loops, then fire3 for 2000 loop
s, and then repeat.
"=object=" - This flag, when followed by one or a number of tags is used to defi
ne an object. It must be entered just like this, in lowercase with '=' signs on
both sides. Here is a list of available tags for object definitions.
"!image $" - This tag is used to specify the path and filename of an animation f
rame for the object. During play, the object animates in the order the images a
re defined. Objects automaticaly use the colorkey for the layer they are define
d on. All images in an object must be the same size.
"!xyposition # #" - This tag defines where relative to the upper left hand corne
r of the layer an object starts off. The images will be displayed centered at t
he top of the x/y position.
"!delay #" - This tag specifies the duration of time (in loops) that an image wi
ll be displayed. The larger this number, the longer it will be displayed. Dela
ys are automatically assigned to the image defined prior to them.
"!move # #" - This tag specifies the distance an object will move when it switch

es to the current image. It is a single instantaneous movement. Movements are


automatically assigned to the image defined prior to them.
"!scroll # #" - This tag specifies the distance an object will scroll while the
current image is being shown. It is a continuous movement that repeats for as l
ong as the image is being displayed. Scrolls are automatically assigned to the
image defined prior to them.
"=end=" - This flag is used to end an object definition. It must come after all
other flags and tags have been entered for any given object.
.end Objects Description

Anda mungkin juga menyukai