Strona 6 z 10
Konstrukcja areny
Arena to jedna z nazw, chodzi tu o przestrzeń na której walczą postacie. Arena ma bardzo prostą konstrukcję, składa się z 2 lub 3 plików: DEF, SFF i ostatecznie pliku z muzyką (MP3, MID, itd.)
Plik DEF - Zawiera w sobie podstawowe informacje i ustawienia jak chociażby nazwę, ale też opis jakiej grafiki, w którym momencie i w jaki sposób należy użyć. W tym pliku jest też ścieżka do pliku SFF i pliku z muzyką która zostanie odtworzona podczas walki. Więcej o tym w artykule: Plik DEF - plik z kodem areny.
Plik SFF - Plik z grafiką wykorzystywaną przez arenę, więcej w: Grafika i paleta kolorów, Plik SFF - plik z grafiką.
Przykładowy fragment pliku DEF:
;-------------------------------------------------------- [Info] ;Name of the stage. name = "Training Room" displayname = "Training Room" ;Name to display versiondate = 09,30,2009 ;Version date of stage (MM,DD,YYYY or X.XX) mugenversion = 1.0 ;Version of M.U.G.E.N stage works on (X.XX) author = "Elecbyte" ;Stage author name ;-------------------------------------------------------- ... ;-------------------------------------------------------- [PlayerInfo] ;--- Player 1 --- ;Player 1 starting coordinates. ;p1startx is typically -70 and p2startx is 70. ;p1starty should be 0. p1startx = -70 ;Starting x coordinates p1starty = 0 ;Starting y coordinates p1facing = 1 ;Direction player faces: 1=right, -1=left ;--- Player 2 --- p2startx = 70 p2starty = 0 p2facing = -1 ;--- Common --- ;Don't change these values. leftbound = -1000 ;Left bound (x-movement) rightbound = 1000 ;Right bound ;-------------------------------------------------------- ... ;-------------------------------------------------------- [Reflection] ;Intensity of reflection (from 0 to 256). Set to 0 to have no ;reflection. Defaults to 0. intensity = 0 ;-------------------------------------------------------- [Music] ;Put a filename for a MOD, MP3 or MIDI here, or just leave it ;blank if you don't want music. If an invalid filename is ;given, then no music will play. To play CD audio, put ;the track number followed by ".da". Using a track number of ;0 will play a random audio track. For example, to play ;track 3 from a music CD, use: ; bgmusic = 3.da bgmusic = ;bgmloopstart = ;bgmloopend = ;Adjust the volume. 100 is for 100%. bgmvolume = 100 ;========================================== ; Main background definition [BGdef] ;Filename of sprite data spr = stage0.sff ;Set to 1 if you want to clear the screen to magenta before ;drawing layer 0 (the default background). Good for spotting "holes" ;in your background. ;Remember to turn this off when you are done debugging the background, ;because it slows down performance. debugbg = 0 ;---------------------------- ; Start each background element with the following: ; Make sure it's "[BG n]", where n is anything you like (it's only used to ; report errors.) For example, you could use: [BG TheFloor] ; Specify as many as you like. This is an example of a normal background: [BG 0] type = normal spriteno = 0, 0 layerno = 0 start = 0, 0 delta = 1, 1 trans = none ;alpha = 256,0 mask = 0 tile = 1, 0 tilespacing = 0,0 ;window = 0,0, 319, 239 ;windowdelta = 0,0 ;---------------------------- [BG 1] type = normal spriteno = 0, 1 start = 0, 185 delta = 1, 1 mask = 0 velocity = 0, 0 tile = 1, 0 tilespacing = 0, 0 ;----------------------------