Source Code
From Sleep is Death
Contents |
The Sleep is Death Source Code
The source code available for download is divided into two parts:
- The minorGems source, a collection of utility code used in SiD
- The code for the Sleep is Death executable
Getting the last version
You can download and compile the live version of the game with these commands:
mkdir /path/to/sid/ cd /path/to/sid/ hg clone http://minorgems.hg.sourceforge.net:8000/hgroot/minorgems/minorGems cvs -z3 -d:pserver:anonymous@hcsoftware.cvs.sourceforge.net:/cvsroot/hcsoftware export -r HEAD SleepIsDeath SleepIsDeath/build/source/runToBuild
Note that the minorGems source code hosted on the CVS server is out of date, and will not compile correctly with the latest Sleep Is Death source code. You will need a Mercurial client to download the latest code.
If everything went fine, the executable SleepIsDeathApp is in the current directory, as well as a number of other directories.
Since this version is WIP, It could break. You can also use the source code version from the download link, when you have bought the game.
Compiling on windows
Follow the instructions :-)
I managed to compile using this distro of mingw http://nuwen.net/mingw.html you need this, and msys, lpng, zlib and SDL. everything compiled and "installed".
If you have the right installation, with all the libraries that the game needed, compiling is as trivial as run the runToBuild script (with sh runToBuild in the msys command line in the right where the source is unzipped).
Getting there, (installing all the mingw, lpng, zlib.. and the like), is the part that could be a lot of troubles. Once you have the installation right, compiling sould be easy.
The linux guys have it easy, since the package system integrated in the system manage all this lpng/zlib and things by itself. But we poor windows guys we have to do it manually. Theres not Visual Studio solution files, that could make the whole thing easier for us.
- Download src (use the link from the wellcome mesage from Jason)
- Install mingw, msys and all the libraries ( unzip, sh configure, make, make install.. these type of stuff. Is complicated)
- Unzip the package (a good location could be c:\msys\1.0\<yourusernamehere>\sid, so is visible in the msys command line )
- (optional) you may need to run the configure in the SleepIsDeath folder. "sh configure"
- Runs "sh runToBuild"
Individual files
//TODO: put a list of all files here, so can be described, to help future moders
Legal stuff
The game is on "Public Domain" and the author agrees to let people distribute it. If you make modificaciones of the engine, you can distribute the resulting exe. It will be a good idea to share the code with others, since that create a "wisdow of crowds" effects that is more powerfull that just a few people editing here and there. Also, I would say is better to distribute the .exe file, and not the whole game, to make people buy the game. So people contribute to the author making more awesome stuff.

