|  | 
 
 Recently Krylar posted an article about encryption of data in a game. This means that you can stop crackers from making your game look different, or changing stuff you'd rather they didn't. Personally I prefer to keep games "open". This means that anyone can release mod-packs, levels, extra-animations, etc. which: 
 
 Civilization II, (IMHO a brilliant game, I still play it) did this. The game "rules" were as simple text files, and had comments to help people make modpacks. The graphics were simple .gifs, and had info on making modpacks. The game lasted *ages*. It was released (I think) in '95, and still lots of people play it, make mods for it, and release the mods on the net. For large games you will often need to write a level-editor. I've found my editors are horrible "press 's' to save, right-click to delete an object, left-click to create an object, 1-to-9 to set object to create" sort of thing. Now this isn't a bad thing, in its way, as it allows you to have a very simple level editor very quickly so you can get on with coding. Release the level-editor with the game, or even release the source-code of the editor, and so allow someone else make a better one =). Its a good idea to comment open-source code *very* fully, as you are not the only person who will be looking at the source-code. Not only will you drive people off who might have helped if they could understand any nasty bits of un-commented code, but also its a lot easier to comment at the begining than later. Also write some documentation for it, writing simple text-file docs are not hard, and they *really* make it a lot easier to use. Use the standard .bmp (or similar) for the animations, as others can edit these easily, in GIMP, photoshop, or even paint! again, write some documentation on how the anims work, and perhaps include some example files. If you can be bothered, another nice thing is to write some option-loading from a text file. With Blitzbasic this is not difficult, and its not *that* hard with other languages either. Normally a file will look a little like this: 
 
 Now this is a very simple options-type file for a platform-game, which is fairly obvious. its very easy to edit, and well commented. you can have rules in it like the format, comments start with ";", blank lines are allowed, and each rule *must* have no spaces, and be 4 chars long. Very easy to use this setup, and very easy to code: 
 As you can see I'm including "val.bb". As BlitzBasic doesnt (yet) have its own string-to-integer converting function, I wrote my own (thanks Krylar for ASC idea!). The function works just how you think it ought to, and is included in val.bb. To download all of the source for this stuff: Click Here. Once BB has its own version of this (IMHO very vital) function, that bit wont be needed. Now your game is mod-packable! If you're feeling really keen you can even write some code that loads a modpack from a modpack-directory, to make it even simpler for people. Write some more documentation, and say you'll link from the "offical site" you've made to any modpacks they make. This method gives an alternative to encrypting your game-data, and may help your game to stay popular for a longer time (possibly!). 
 For a printable copy of this article, please click HERE. 
 This site is Copyright© 2000-2004, BlitzCoder. All rights reserved.   |