GRAPHICS.txt Description of graphics files For X-Bomber v. 0.8 by Bill Kendrick kendrick@zippy.sonoma.edu New Breed Software http://zippy.sonoma.edu/kendrick/nbs/ June 19, 1998 WHAT'S THIS ALL ABOUT? This document lets you know how to change the graphics in X-Bomber, if you feel like it. It also explains how to create your own alternate full-color graphics sets (like the included "jungle" set). If you create some good graphics, and would like them distributed with a future release of X-Bomber and/or on the official X-Bomber website, e-mail the graphics, "TAR" and "GZIP"'d to: kendrick@zippy.sonoma.edu Thank you! BITMAP GRAPHICS: The standard (non "-color") monochrome graphics are stored in a directory called "bitmaps/". These files are monochrome "XBM" files, 32 x 32 pixels in size: block.xbm --------- primary indestructable block block2.xbm -------- secondary indestructable block bomb.xbm ---------- bomb bones.xbm --------- bones (player after death ate them) box.xbm ----------- standard box death.xbm --------- death death_eating.xbm -- death, while eating dirt.xbm ---------- background 'dirt' explosion1.xbm ---- explosion animation frame 1/2 explosion2.xbm ---- explosion animation frame 2/2 invert.xbm -------- "invert" upgrade invisible.xbm ----- "invisible" upgrade kicker.xbm -------- "kicker" upgrade man_down.xbm ------ player facing down man_left.xbm ------ player facing left man_right.xbm ----- player facing right man_up.xbm -------- player facing up morebomb.xbm ------ "more-bomb" upgrade morefire.xbm ------ "more-fire" upgrade mushroom.xbm ------ "mushroom" upgrade nuke.xbm ---------- "nuker" upgrade pusher.xbm -------- "pusher" upgrade radio_bomb.xbm ---- radio-bomb radioupgrade.xbm -- "radio-bomb" upgrade shield.xbm -------- "shield" upgrade tnt.xbm ----------- TNT box totalfire.xbm ----- "total-fire" upgrade warp.xbm ---------- warp spot Colors for these objects are defined in "xbomber.c" at the top in a static character string array: /* Object colors: */ #define YOU_COLOR "LightYellow" #define THEM_COLOR "light goldenrod" #define GOODIE_COLOR "green" char * object_colors[NUM_OBJECTS] = { "Black", THEM_COLOR, THEM_COLOR, THEM_COLOR, THEM_COLOR, "deep sky blue", "blue", "red", "grey", "grey", "yellow", "yellow", GOODIE_COLOR, GOODIE_COLOR, GOODIE_COLOR, GOODIE_COLOR, GOODIE_COLOR, GOODIE_COLOR, GOODIE_COLOR, GOODIE_COLOR, GOODIE_COLOR, GOODIE_COLOR, GOODIE_COLOR, "white", "red", "yellow", "yellow", "white", "orange", /* color-only pixmaps: */ "white", "white", "white", "white", "black", "black", "black"}; The objects refered to by each position in the array are defined directly above this, in lines like this: #define OBJ_TNT 24 #define OBJ_DEATH 25 Colors are, as you can see, specified by name. See your server's "rbg.txt" or a good book on X-Window to find out what colors are defined and their Red/Green/Blue hexadecimal values. FULL-COLOR GRAPHICS: The standard ("-color", with no further specifications) full-color graphics set is stored in the "pixmaps/" directory. The files are PPM files (WITH NO COMMENTS!) and are 32 x 32 pixels in size: block.ppm ----------- primary indestructable block block2.ppm ---------- secondary indestructable block bomb.ppm ------------ bomb bones.ppm ----------- bones (player after death ate them) box.ppm ------------- standard box checker_dirt1.ppm --- alternate dirt, checkered (1/2) checker_dirt2.ppm --- alternate dirt, checkered (2/2) cross_dirt.ppm ------ alternate dirt, cross (1/1) death.ppm ----------- death death_eating.ppm ---- death, while eating dirt.ppm ------------ standard background 'dirt' explosion1.ppm ------ explosion animation frame 1/2 explosion2.ppm ------ explosion animation frame 2/2 invert.ppm ---------- "invert" upgrade invisible.ppm ------- "invisible" upgrade kicker.ppm ---------- "kicker" upgrade man_down.ppm -------- other player facing down man_left.ppm -------- other player facing left man_right.ppm ------- other player facing right man_up.ppm ---------- other player facing up morebomb.ppm -------- "more-bomb" upgrade morefire.ppm -------- "more-fire" upgrade mushroom.ppm -------- "mushroom" upgrade nuke.ppm ------------ "nuker" upgrade pusher.ppm ---------- "pusher" upgrade radio_bomb.ppm ------ radio-bomb radioupgrade.ppm ---- "radio-bomb" upgrade shield.ppm ---------- "shield" upgrade tnt.ppm ------------- TNT box totalfire.ppm ------- "total-fire" upgrade warp.ppm ------------ warp spot you_down.ppm -------- your player facing down you_left.ppm -------- your player facing left you_right.ppm ------- your player facing right you_up.ppm ---------- your player facing up Colors are, of course, determined by the pixel colors within these files. The images should (more or less, depending on the video settings of the server) appear exactly as they are stored in the files. FULL-COLOR GRAPHICS BACKGROUNDS: The background images are slightly hard-coded. There are currently three types of background "dirt" images that are randomly chosen when a level starts: Normal (1 image) Checkered (2 images) Cross (1 image) When these images are loaded is determined by these values in "xbomber.c": /* Background modes: */ #define BKG_NORMAL 0 /* ... normal pops up 3 times as much as others */ #define BKG_CHECKER 3 #define BKG_CROSS 4 #define NUM_BACKGROUND_MODES 5 "BKG_NORMAL" is a kind of placeholder. A number between 0 and NUM_BACKGROUND_MODES - 1 (4) is picked at the beginning of the level, and if it's not "BKG_CHECKER" (3) or "BKG_CROSS" (4), then the normal graphics are chosen, otherwise the checker or cross graphics are chosen, respectively. MOUSE POINTER: The mouse pointer bitmaps are stored as "XBM" files in the "bitmaps/" directory: cursor-mask.xbm --- mouse pointer mask cursor.xbm -------- mouse pointer image TITLE GRAPHICS: The title image is stored in both the "bitmaps/" and "pixmaps/" directories. They are 300 x 200 pixels in size. bitmaps/title.xbm ------- main title graphic (300 x 200 pixels) pixmaps/title.ppm ------- main title graphic (300 x 200 pixels) If you wish to change the title image for some reason, you'll need to change the size settings in "xbomber.c": /* Title size and position: */ #define TITLE_WIDTH 300 #define TITLE_HEIGHT 200 #define TITLE_LEFT ((WIDTH - TITLE_WIDTH) / 2) #define TITLE_TOP ((HEIGHT - TITLE_HEIGHT) / 2) ALTERNATE GRAPHICS SETS: If you wish to create an alternate full-color graphics set, like the provided "jungle" set, create a directory in your "xbomber/" directory and place "PPM" image files (WITHOUT COMMENTS!) within it. For each object, and its filename described above in the "Full-Color Graphics" section, create an image. You need not create EVERY file. If X-Bomber can't load it from your directory, it pulls the default image from the "pixmaps/" directory. As you can see in the "jungle/" directory, only a few graphics files are stored there. And as you can see while playing the game in "-color jungle" mode, not all of the objects look different from the standard "-color" mode. (In fact, "-color" is really just the same as "-color pixmaps".) Finally, as stated before, if you create a graphics set you'd like distributed with X-Bomber and/or placed on the X-Bomber website, please e-mail it, TAR and GZIP'd, to: kendrick@zippy.sonoma.edu Thanks!