Comics (intro, outro, interlevel sequences).
Levels (number, order and parametres of the levels).
Decorations (destroyable things in the level)
Objects (peacefull citizens and gunmen).
Sprites (definitions of the used graphics).
IMPORTANT: DON'T FORGET TO MAKE BACKUP COPY OF THE GAME BEFORE YOU DO
ANY CHANGE TO ANY PART OF IT.
Comics are simple animations with given images made by a script file. Comics are used for intro and outro animation and for interlevel shots. There are these reserved comics:
intro.cmx - played after the start of the program
gameover.cmx - played, when a player loose his last life
goodbye.cmx - played after the quit
You can modify these files as you wish, but you have to keep these names,
because they are called directly from the program. Other comics, their
names or number, is random.
Any of the *.cmx file can contain these commands:
delay <ticks>
Specifies the time the computer will wait before he does the next command.
image <index> <name>
Image loads the specified bitmap and gives it an index number. In the <name> can be just the name of the bitmap (the *.bmp file) or the path and the name. The path starts in ../WESTBANG/DATA/COMIX, so all your bitmaps and dirs have to be in the COMIX directory.
Note: The color 255,0,255 is transparent.
destroy <index>
Removes the image from the memory. Don't forget to destroy images, or you can glut the memory.
virtual <v_index> <index> <pos_X> <pos_Y> <width> <height>
Virtual is the quad shaped object taken out of the image you can work with by the commands of the comics. You can define more than one virtual in one image.
<v_index> is the index given to the new virtual.
<index> is the index of the source bitmap.
<pox_X> <pos_Y> are the coords of the upper left corner of the virtual in the image.
<width> <height> set the size of the virtual.
anime <v_index> <frames> <delay>
Makes the specified virtual the animated one. <Frames> is the number of the frames and <delay> sets the pause between the two frames (speed of animation).
Animated virtuals are made of bitmaps with all the frames placed in the row. So the height of the bitmap is the same as the frames height and width equals to <frames> times width of the frame.
anime_type <v_index> <type>
Sets the type of the animation of the specified virtual.
type=1: from first to last (1->2->3->...)
type=2: zig zag (1->2->3->2->1->...)
type=3: random
Example: These three commands make a short animated virtual.
virtual 3 1 0 0 10 10 //defines the first frame (size 10x10)
//taken from the image 1 (size 40x10)
anime 3 4 18 //makes 4-frames animation
anime_type 3 1 //sets the type of the animation to normal
setxy <v_index> <x> <y>
Puts the specified virtual on the given coords.
vis_on <v_index>
Shows the specified virtual. New created virtuals are hiden. You have to use vis_on, if you want to see them on the screen.
vis_off <v_index>
Hides the specified virtual.
move <v_index> <tx> <ty> <sx> <sy> <tempo>
Sets the virtual as "the moving" one. Moving virtual goes automaticaly from actual coords to target coords <tx>,<ty>. The speed of the motion can be controled by the length of the single step (<sx>: step along the x-axis, <sy>: step along the y-axis in pixels), or by the <tempo> - the delay between the two steps.
resize <v_index> <sw> <sh> <speed_x> <speed_y>
Sets the virtual as "the resizing" one. <Sw> and <sh> are starting height and witdth. Resizing can go by the very small steps, thats why you have to set sw=100000 and sh=100000 if you want the starting size of the virtual to be 100% x 100%.
sound <index> <name>
This is the same as the image command for the bitmaps.
play_sound <index> <volume> <panning>
Plays the sound once.
repeat_sound <index> <volume> <panning>
Repeats the sound, until you stop it by the command: stop_sound <index>
destroy_sound <index>
Removes the sound from the memory.
pause
Waits for input. The script won't continue, until the user presses any key.
include <file_name>
Plays the <file_name> comics file. You can make the hierarchy in the files by this command. It's usefull for the good control of the long comics to create one "main" cmx file, that calls the single scenes as you can see in the "intro.cmx".
If you want to learn more, how to create the script look in our *.cmx files.
Note: Max number of images is 50.
Max number of virtuals is 50.
Max number of samples is 20.
By this file you can modify the game itself. In the file there is a description of all levels in the game, order of paragraphs is unimportant, because the level order is controlled by NEXT command. For each level there is a short paragraph:
LEVEL 6 MODE 0 BACK bankbck/bank00.bmp REFRESH_DOOR 40 CREATURE gm01.obj 70 CREATURE gm02.obj 50 CREATURE c01.obj 20 CREATURE c03.obj 30 CREATURE c05.obj 40 DECORATION clock1.dec DECORATION pic1.dec MAX_DOORS_OPEN 3 TIME 0 MAX_BANDIT 20 NEXT 2 KOMIX_START l01.cmx BULLETS 6 AMMO 1000 END_OF_LEVEL 6
You can create a decoration by this script:
ANIMATION clock1.txt TYPE 1 X 288 Y 13 S_NORMAL NULL S_DESTROY glass.wav
Objects are simply the creatures you can meet in the game. Make them by the script like this one:
ANIMATION d08.txt TYPE 1 DELAY 18 MAX_SHOW 100 SCORE 500 SOUND_DEAD ugh03.wav SOUND_SHOT colt.wav SOUND_CRY reload2.wav CHILD 0 TICKS 12 0 0 1 0 2 0 3 1 4 1 5 1 6 1 7 2 8 1 9 1 10 1 11 0 END
*.txt files contain the info about the frames used by the *.obj file. Frames (or sprites) are described like this:
1 gunmen\gm12.bmp 5 0 115 216 0 0 -8 0 0 115 216 115 0 -8 0 0 115 216 230 0 -8 0 0 115 216 345 0 -8 0 0 115 216 460 0 -8 0 5 0 1 0 10 0 1 1 1 10 1 2 1 2 10 2 3 1 3 10 3 4 1 4 10 4This is the description of a gunmen. Other sprites in the game can have different number of frames/animations, but the idea is the same. Look in the pre-defined TXTs and experimentate.
First number is the number of the bitmaps. You don't have to use just one as we do.
Then there is path and bitmap name. Program starts in DATA/GFX, so put your graphics in there.
Second number if the number of frames.
Each frame is described on one line:
<index_of_source_bitmap> <width> <height> <x> <y> <x_offset> <y_offset>
X,Y are coords of the upper left corner of the frame in the bitmap.
Offset helps to place the sprite more preciselly. Try and see.
Third standalone number is the number of the animations. Anims are not implemented yet, so you have to just make the one-frame anims, that are called in the *.obj file.
Each animation is described by two lines.
1st line: <index_of_animation> <number_of_frames>
2nd line: <frame> <delay> <loop_frame>
<number_of_frames> set to 1. <delay> is unimportant, <loop_frame> set
the same as <frame>.
You have to make 5 anims for a man. They have this meaning:
anim 0: staying and waiting
anim 1: guns out! (now you can kill the bandit)
anim 2: shooting
anim 3: falling after the hit
anim 4: lying dead
You have to keep the meaning of the anims (to put the right frame in the animation with right index) if you want your man to act properly.
That's all you have to know to create your own comics, gunmen or levels. You can learn more from our data files. Don't forget to make a backup copy of the game before the modifying of anything in it. Have fun.