a Keen: Modding utility created by CK Guy for Keen Day 2008
2003-10-20: | In a post on the Keen: Modding message board, I request some sort of a grouting feature for ModKeen, and MultiMania concurs. | |
2008-03-14: | Keen Day 2008! First public release. | |
2008-05-21: | Updated version. Now processes sprites in all episodes, as well as the 8x8 tiles in Keens 4-6. This has actually been done for two months, but I was too lazy to update the documentation and re-release it. (Yes, I know this is pathetic.) |
While not the most difficult part of creating a tileset, possibly the most frustrating task is the alignment of your tiles to the sixteen-pixel boundaries, where ModKeen expects them to be (and rightfully so!). In the "second-generation" Keens, there is the added complication of keeping the "masking" portion of the foreground tile image up-to-date. And of course, there is the matter of creating the masking plane for all of the sprites.
This program attempts to help this issue by "en-grouting" and "de-grouting" (adding/removing a grid to/from) the tileset and handling the sprite images. For the foreground tiles of Keens 4-6, it also address the other issue and makes all areas that are not part of the tiles a different color. In case you were wondering, the color of the grid in all episodes is RGB 0xE0A000, and the color of the background in Keen 4-6 foreground tiles is RGB 0x206000. These were chosen fairly arbitrarily—the first by me and the second by adurdin, although not in that order chronologically. ;-) This same green color is also used as the background for the sprite images.
If you want to peek at it, the PureBasic source code is included in the file "keengrout.pb". Feel free to re-use whatever you want, but credit would be nice. It's not exactly open source (and definitely not GPL), it's more of an unspecified honor-system license. You know the deal; just play nice.
Here is a rundown of what files this program processes, and what it does for each.
nTIL0000.BMP (unmasked 16x16 tiles / for all episodes) The processed version of the graphics is stored in GnTIL0000.BMP, and contains grid lines every 17 pixels, to delimit the 16-pixel tiles.
nTIL0001.BMP (masked 16x16 tiles / for Keens 4-6 only) The processed version of the graphics is stored in GnTIL0001.BMP, and also contains grid lines every 17 pixels. It also examines the masking plane and makes all pixels that are not actually part of the tiles a different color.
nTIL0002.BMP (unmasked 8x8 tiles / for Keens 4-6 only) The processed version of the graphics is stored in GnTIL0002.BMP, and includes grid lines every 9 pixels, to delimit the 8-pixel tiles.
nTIL0003.BMP (masked 8x8 tiles / for Keens 4-6 only) The processed version of the graphics is stored in GnTIL0003.BMP, and also contains grid lines every 9 pixels. It also examines the masking plane and makes all pixels that are not actually part of the tiles a different color.
nMBMnnnn.BMP (masked bitmaps / for Keens 4-6 only) The processed version of the graphics is stored in GnMBMnnnn.BMP. It examines the masking plane and makes all pixels that are not actually part of the bitmap a different color.
nSPRnnnn.BMP (masked sprites / for all episodes) The processed version of the graphics is stored in GnSPRnnnn.BMP. It examines the masking plane and makes all pixels that are not actually part of the sprite a different color. The bounding box is carried over without change.
The file keengrout.exe MUST be placed in the same folder as your images. The program is only 36k, so it doesn't really matter how many copies you have spread around. The grouted files have the same filenames as the originals, but with "G" added to the beginning. The program's interface is very simple: a single button and a textbox. Pressing the "Sync" button causes the program to go through all of the Keen graphics files in its folder. For each normal-file/grouted-file pair, it compares the two files' timestamps. The newer one is used to update the older one. (And if one is completely missing, the other is used to create it.) When one of the files is updated, its timestamp is changed to match its partner's.
This gives you a bit of flexibility in how you work on your graphics. Some tile work is easier in the original, non-grouted version. The only thing you shouldn't do between two executions of KeenGrout is edit both the original and grouted versions of a file, because any changes made to the older file will be lost.
The program window is "sticky" in that it will remain on top of other windows, even when it does not have focus. It is small enough that it should not get in your way. I did this so that you could just leave the program running during graphics-modding sessions, and move it to some corner of the screen.
This program was initially written as a last-minute contribution for the Keen Day 2008 festivities. If you have any questions, comments, or suggestions, please post them in the thread in either the PCKF or in Keen: Modding. This second version was essentially finished a week after Keen Day, and I uploaded a version without any documentation. However, it took a good two months for me to officially release it (complete with updated documentation).
In the end, my reasons for making this software were selfish—I like playing Keen mods and want people to make more. ;-) I thought that this sort of program is exactly the thing I would want if I ever were to make a Keen mod. (I'm not ruling this out, it just seems unlikely at this point. I don't do graphics at all. I'm more of a levels and utilities person.)
Thanks must go out to my betatesters, Commander Spleen, jimmyjames, and KeenRush (in alphabetical order, so no one gets mad). They let me know a few changes that should be made to the program, but in general said how great it was. (Seriously!) KeenRush suggested that I change the name from "KeenGrout" which he had a hard time remembering. Commander Spleen said keep it the way it was. This is about as dramatic and exciting as the betatesting got, which was fine by me. Anyway, one last thank-you to the great communities at the PCKF and K:M. You guys are awesome!
"smiley faces and love"
☺ ♥ ☺ ♥ ☺ ♥
KeenGrout / A Keen Day Release