|1st Step: Preparing YOUR MIND!|
So you have come to realize that your character needs a place to hang out, chillax and occasionally kick some enemy
butt, eh? The D-Engine allows you to create new stages even more easily than characters: This time around, all you need
is one single tool, which creates one single file. In case you have already created a character, most of the things
here will seem familiar, but please read on anyway to find out about the subtle differences.||
Not sure where this is going, but hey, it's a cat with a tie.
|2nd Step: Preparing the Sprites!|
Before you start working on a new stage, please take note of the D-Engine's limits: If the engine has to draw a texture
to the entire screen multiple times, things can get frame-droppery pretty quick. To avoid that, only draw the textures
as big as you need them to be.|
Background sprites are not as fixed as character sprites: Their width and height still both have to be a power of two, but the width and the height can have a different size. Don't worry about the sprites fitting on the screen in a pixel-perfect kind of way, you can define their exact position and size later. Scientific experiments have proven that the upper size for a texture is 1024, although the engine itself does not have a limit. The overall limit would be the PowerVR texture memory, where the uncompressed background textures are stored. This means that your limit is 8 MB, with each TrueColor/Normal texture taking up TextureSizeX*TextureSizeY*2 bytes and each paletted texture TextureSizeX*TextureSizeY bytes.
Name the texture whichever way you want. Currently, the background Dolmexiler is the only tool to not be limited to the whole exactly-eight-letters rule. Animated backgrounds have to have their frame number added to the name. For example, a normal unanimated texture could be called SKY.png, whereas the second frame of an animated texture called CROWD would be CROWD2.png.
This time around, paletted textures can be used as well (to save space). Check the Create-a-Character manual for info about paletted images, just keep in mind that this time around the images must have the file extension .p8b. The palette has to be named 0.pal and kept along with the other textures.
Put all the sprites (and the palette if there is one) in the same folder and move on to the next step.
A 512x512 Background texture.
|3rd Step: Preparing the Background-Dolmexiler!|
Download the Background-Dolmexiler at the Download section and extract the executable as well as the TOOLS.cfg in a
folder of your choice. Before you start with the textfile this tool needs, open the TOOLS.cfg. There, define the command
line used to call genromfs, the KOMPRESSOR (available at the downloads section) and kmgenc (only in case you want to
use TrueColor textures). Notice how I did not mean simply the programs location, but rather the line necessary to
perform the desired option. Here is an example how the three parts could be filled:|
KMGENC = [/home/captaindc/kos/utils/kmgenc/kmgenc -a4]
GENROMFS = [/home/captaindc/dc/kos/utils/genromfs/genromfs]
KOMPRESSOR = [/home/captaindc/Desktop/kos/KOMPRESSOR/kompressor]
Yup, the -a4 option has to be included in the kmgenc line. Now that you have finished setting up the tool, open a new text file with the barebone ASCII editor of your choice (Windows: Editor; Linux: Mousepad) and ready yourself for the next step.
|Alternatively, you can always take a look at the example files.|
|4th Step: Header Data, galore!|
Phew, the last step was way too easy, so let's dwelve into the difficult stuff. This text file consists of values.
Values are declared by using an initiator, followed by a space, an equal sign, another space and brackets in which
the actual value is stored. Values can be numbers, names or YES/NO/WHATEVER types, check the list of identifiers below
to see what is possible. Just to clarify the layout, if there was an identifier called SUPERCOOLVALUE which took numbers
as its input, it would look like this:|
SUPERCOOLVALUE = 
Notice the spaces before and after the equal sign. Never forget those!
Now first we need to declare some global values which deal with the entire stage. Lists are a great way to convey information, so let's get cracking!
STAGE NAME = [BESTEVER]
The stage's name, by which it is referred to within the engine and which also is the final stage file's name. Please note that it has to be exactly eight letters long.
BACKGROUND AMOUNT = 
The amount of textures. Animated textures only count once, so if you have one animated texture with ten frames and one normal texture, the value to use would be !
BACKGROUND SOUND TRACK = 
The CD soundtrack to be played. Tracks 1-6 are reserved, so the first one usable is track seven. The background music will be burned to the disc just like you would do with that ACDC CD you downloaded last week, but more on that in the guide that deals with putting together the final disc. For now, let's say the preferred audio format here is WAV.
REAL STAGE SIZE = 
This value declares how much the characters can move around. If the value is 1280, the characters can move 1280 pixels horizontally (double screen size). On the other hand, if it was 640 (screen size), the stage is no bigger than the screen. Obviously, you don't want to set this value lower than 640. As far as I'm aware, there is no upper limit for the size of the stage. Trolls might try to make some Beat 'em up stuff outta this, but we all know there is a better option for that...
START POSITION CHARACTER ONE = 
Well, it's kind of given, but this is the X-AXIS position character one starts at.
START POSITION CHARACTER TWO = 
Well, it's still kind of given, but this is the X-AXIS position character two starts at.
STAGE GROUND = 
To be overly exact, this is where the lowest parts of the two characters' sprites are located. To put it blunt, this is the ground. Keep in mind that the Y-AXIS of the screen is going from the top to the bottom and goes up (or rather down) to 480.
START STAGE POSITION = 
This is the position (within the stage) of the left side of the screen when the game resets the stage.
SHADOW POSITION X-AXIS = 
Declares how much the upper part of the shadow is moved to the right. You see, it is drawn diagonally, with the "feet" of the shadow touching the feet of the character and the "head" of the shadow drawn at STAGEGROUND+SHADOWPOSITION Y-AXIS and CurrentCharacterPositionX+SHADOW POSITION X-AXIS.
SHADOW POSITION Y-AXIS = [-30]
Declares how large the shadow is drawn. Negative value mean the shadow is drawn "towards" the top of the screen, positive values are drawn towards the bottom. Again, it is drawn diagonally, with the "feet" of the shadow touching the feet of the character and the "head" of the shadow drawn at STAGEGROUND+SHADOWPOSITION Y-AXIS and CurrentCharacterPositionX+SHADOW POSITION X-AXIS.
SCROLL LIMIT LEFT = 
If both characters are left of the value, the stage starts scrolling to the left.
SCROLL LIMIT RIGHT = 
If both characters are right of the value, the stage starts scrolling to the right!! Yay!
SCROLL SPEED X-AXIS = 
This value is in pixels per frame, the game runs at 60 frames/second. Furthermore, the X-Size of the Screen is 640.
TEXTURE TYPE = [RGB]
The type of your textures can either be TrueColor [RGB] or paletted [PALETTE].
CHARACTER STRETCH FACTOR = 
This beautiful value defines how large your character is drawn to the screen, the stretch factor being multiplied with 64. A value of  means 256,  means 320 and so on and so on...  is my personal preference, but it all depends on your characters. All of your character's values are scaled according to this stretch factor. Convenient, eh?
|5th Step: Individual background data fun|
Now, all that's left to do is declare some things for each texture. Before starting with the actual textures, you need
to start by adding an identifier:|
--ACTUAL STAGE DATA--
There, now you can start with the next step:
To tell the Background-Dolmexiler you want to deal with a single texture now, you need to identify it by typing three minuses in front of the data for each texture. Here's a comprehensive list of the stuff that needs to be written down for each texture:
Three minuses need to be put in front of every texture. No matter how tempting it may seem, do not add three minuses after finishing the data for the final texture. Your file must never end with minuses. That'd be... negative. OOHHHH YEAAAAHHH!
BACKGROUND NAME = [SKY]
The name of the texture. No limit this time around.
BACKGROUND ANIMATED = [YES]
Declares whether the background uses some of the special ANIMATED values later on.
TEXTURE SIZE X-AXIS = 
The X-Size of the actual texture. Has to be a power of two, remember?
TEXTURE SIZE Y-AXIS = 
The Y-Size of the actual texture. Another power of two!!
LAYER SIZE = 
The size of the layer the texture is drawn on. Basically, it has to do with scrolling. If it is set to 640, there is no scrolling, if it is set to the REAL STAGE SIZE, it scrolls just as fast as the characters. The POSITION X-AXIS of the texture is set within this LAYER SIZE.
POSITION X-AXIS = 
The X-Position within the Layer. Highly depends on LAYER SIZE.
POSITION Y-AXIS = 
The Y-Position on the screen. The top of the screen is 0, the bottom of the screen is 480.
POSITION Z-AXIS = 
The values 0-5 are reserved for backgrounds. Lower value means the textures are farer int the back, bigger value means the textures are rather in the foreground.
DRAWN SIZE X-AXIS = 
The size with which the texture is actually drawn to the screen. This one also depends on the whole LAYER SIZE thing.
DRAWN SIZE Y-AXIS = 
The size with which the texture is actually drawn to the screen. Depends on the screen's size (480).
SPEED = 
Only used if BACKGROUND ANIMATED is set to YES. Declares how long each sprite is displayed. This value is in frames, so keep it mind that the game runs at 60 frames per second.
FRAME AMOUNT = 
Only used if BACKGROUND ANIMATED is set to YES.
WHICH FRAME = 
Only used if BACKGROUND ANIMATED is set to YES. The frame with which the animation starts.
LOOP = [YES]
Only used if BACKGROUND ANIMATED is set to YES. Declares whether the the animation restarts after FRAME AMOUNT has been reached.
MOVEMENT X-AXIS = 
Only used if BACKGROUND ANIMATED is set to YES. Use it if the texture moves across the screen.
MOVEMENT Y-AXIS = 
Only used if BACKGROUND ANIMATED is set to YES. Use it if the texture moves across the screen... Y-AXIS.
MOVEMENT BORDER X-AXIS = 
Only used if BACKGROUND ANIMATED is set to YES. Declares where the texture is going with MOVEMENT X-AXIS. Once it has reached that position, the next thing to happen is declared with TINGLE.
MOVEMENT BORDER Y-AXIS = 
Only used if BACKGROUND ANIMATED is set to YES. Declares where the texture is going with MOVEMENT Y-AXIS. Once it has reached that position, the next thing to happen is declared with TINGLE... Y-AXIS.
TINGLE = [YES]
Only used if BACKGROUND ANIMATED is set to YES. This initiator, sharing its name with one of the most "interesting" Zelda characters, declares whether your Texture returns to its original position once MOVEMENT BORDER is reached [YES], or whether it remains at that place [NO].
SPECIAL PAUSE FRAME = 
Only used if BACKGROUND ANIMATED is set to YES. If a certain frame is displayed longer than the rest, set it to something other than .
SPECIAL PAUSE DURATION = 
Only used if BACKGROUND ANIMATED is set to YES. The amount of time the SPECIAL PAUSE FRAME is displayed.
|6th Step: Background-Dolmexiling for experts|
Now, save the textfile and open a command line in the folder the Background-Dolmexiler is located. The program has
-i = The text file you made during the last two steps.
-d = The directory in which the textures are located.
-o = The output directory, in which the final stage file will be created.
So if your textfile's directory was "/home/captaindc/INPUT.txt", your texture directory was "/home/captaindc/TEXTURES/" and the output directory was "/home/captaindc/OUTPUT/", the command line would be (on Linux):
./D-STAGES -i /home/captaindc/INPUT.txt -d /home/captaindc/TEXTURES/ -o /home/captaindc/OUTPUT/
This will produce a .bga file in the output folder. Keep that file for the final tutorial which will deal with putting together a complete D-Engine CD. You might also notice that the D-Engine has produced a folder named "DONE" in your texture folder. Delete that if you feel like it, it is mainly for debugging and/or manual adjustments.
Oh Yeeeeeeah! That's how it's done!