Time for a Wham Line: KEEN DREAMS SOURCE CODE RELEASED

Here, you can get help with anything or just chat about the original Commander Keen games.
AST
Grunt
Posts: 10
Joined: Thu Jul 19, 2012 11:14

Post by AST »

Out of interest where did you get the ID sound/music program from?
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

I got it while pestering one of the Softdisk people about the titlescreen compression. He had some old stuff (I wanted the source code to his decompressor or an explanation of the compression, but he had forgotten.) It's called 'Muse' and I dunno much else about it. https://dl.dropboxusercontent.com/u/3940020/Muse.exe
What you really need, not what you think you ought to want.
User avatar
lemm
Blorb
Posts: 696
Joined: Fri Jul 03, 2009 10:18
Location: canada lol

Post by lemm »

Isn't this John Romero's tool for making the game archives?
User avatar
Roobar
Vorticon Elite
Posts: 3267
Joined: Tue Jan 08, 2008 16:12
Contact:

Post by Roobar »

Paramultart wrote:Wait... If we have the source code for a Keen game, why hasn't anyone released any cool mods taking advantage of it yet?
Because coders are hardly working on making Oculus Rift support.
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

lemm wrote:Isn't this John Romero's tool for making the game archives?
I dunno, I didn't pay much attention.
What you really need, not what you think you ought to want.
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 »

All right, if there have been doubts about the differences between any of the recent source code releases and their "original" forms (whatever that means)...

I'm just going to tell what has been the result of building Keen Dreams Shareware v1.13 for DOS (the KDREAMS.EXE file) with Borland C++ 2.0, and later compressing the EXE with LZEXE 0.91. Note that not Turbo C, Turbo C++, Borland 3.1 or any other environment differing from Borland C++ 2.0 should be used for building the EXE.

I could've given some more details about the installation process, but since it's probably boring for most readers, and the success of the process can easily depend on some luck, it may be better to skip this for now.

After building KDREAMS.EXE from the recently released sources (Shareware v1.13), and then packing with LZEXE 0.91, I think that I've gotten a file named KDREAMS.EXE which has:
- The filesize of 81619 bytes.
- The md5sum of 530e3605b40e27f712e251f1141952ee.
- The sha1sum of 6841cb967090e4c84b8cfcab72ff0b4ac5c8a446.

If one doesn't get what I'm talking about, you may be able to concentrate at the file size only.

ANOTHER POST EDIT: ok, to summarize, I've gotten the exact same EXE as the original, byte-by-byte. Guess we can have even less doubts about the authenticity now!
User avatar
Paramultart
VBB's Partner in Crime
Posts: 3004
Joined: Mon Jul 26, 2010 8:36

Post by Paramultart »

h00rj! :birthday
"Father Mabeuf was surveying his plants"
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

NY00123 wrote: - The filesize of 81619 bytes.
- The md5sum of 530e3605b40e27f712e251f1141952ee.
- The sha1sum of 6841cb967090e4c84b8cfcab72ff0b4ac5c8a446.

ANOTHER POST EDIT: ok, to summarize, I've gotten the exact same EXE as the original, byte-by-byte. Guess we can have even less doubts about the authenticity now!
Then it is time we give a community salute to you.
What you really need, not what you think you ought to want.
User avatar
MoffD
Vorticon Elite
Posts: 1220
Joined: Thu Jul 05, 2012 17:30
Location: /dev/null
Contact:

Post by MoffD »

Levellass wrote:
NY00123 wrote: - The filesize of 81619 bytes.
- The md5sum of 530e3605b40e27f712e251f1141952ee.
- The sha1sum of 6841cb967090e4c84b8cfcab72ff0b4ac5c8a446.

ANOTHER POST EDIT: ok, to summarize, I've gotten the exact same EXE as the original, byte-by-byte. Guess we can have even less doubts about the authenticity now!
Then it is time we give a community salute to you.
For he is about to rock? :celtic

Good job NY00123!
mortimermcmirestinks wrote: Now I wish MoffD wasn't allergic to me.
Levellass wrote:You're an evil man.
Image
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 »

Thanks for all the comments about the recreation of the EXE!

I haven't really changed anything in the codebase to make it work, though. Basically, given the fact we've gotten multiple source code versions like that not long after the transfer of the rights, I've had the hopes there are good chances these are the originals (plus the GPL notices and possibly different static data files (KDR instead of OBJ?)).

So what should be done first is getting an installation of Borland C++ 2.0 ready to use in a DOS compatible environment, including the "PATH" environment variable set to its "BIN" directory. While you can technically use DOSBox, the usage of DOSBox for non-DOS gaming is generally discouraged, which is a kind of a warning.

Then, still within a DOS prompt and ready-to-use BC++, you should enter the "static" directory of the corresponding Keen Dreams (probably want to try Shareware v1.13) source code tree and type "make.bat". This should build makeobj.c with BC++ (written by Blzut3, should be compatible with MakeOBJ by John Romero minus the checksums), and then use makeobj to reconstruct object files from the static data.

Finally, the Keen Dreams project itself can be opened with BC.EXE. Note that you may need to pick the correct LIB and INCLUDE dirs within BC before building the project. Once you get an exe, you can optionally compress it with LZEXE 0.91 (exactly this version) and compare. Even without the compression, the EXE should theoretically behave in the same way, including compatibility with original saved games (which do have a dependency on the decompressed EXE's layout).
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

Ok, this is important, I want some actual assistance here people, don't let me down.

Currently a Keen Dreams mod is being held back by this error: "MM_GETNEWBLOCK: No free blocks!"

What this seems to mean is that there are too many tiles being used in some levels or something but I want more information on what this error is specifically and if possible how it may be avoided. (Say by increasing the number of blocks.) It is triggered when a level is being loaded and seems to occur when moving from one complex level to another.

I'm serious here people, I shan't be working on anything Keen related until this issue is resolved. If it isn't then I'm pretty much just going to leave the community.
What you really need, not what you think you ought to want.
User avatar
Multimania
Vortininja
Posts: 84
Joined: Sat Nov 10, 2007 8:10
Location: Hiding in a small, cramped corner of the BwB megarocket.
Contact:

Post by Multimania »

This error is a result of there being too many separate memory allocations done by the game. Keen Dreams supports a maximum of 1300 by default.

Every graphics chunk loaded (cached sprites, tiles in the level or part of an animation used in the level, etc.) uses a "block", as do the sounds (28 in total), as well as a few blocks for other things (the map, etc).

If you can reduce the number of unique tiles or sprites used in a single map, that's probably the simplest way to work around the problem. Obviously recompiling the game with MAXBLOCKS increased would do the job, too.
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

You mention the map; how is that stored because it seems to me a 'too complex' level once loaded into memory somehow isn't properly unloaded and takes up room that really should be cleared.

Does anyone have a compilation of the game with MAXBLOCKS increased so I can see what effects it has?
What you really need, not what you think you ought to want.
Keening_Product
Kuliwho?
Posts: 2167
Joined: Fri Jan 20, 2012 7:02
Location: Tied up in the Oracle Chamber's basement
Contact:

Post by Keening_Product »

I found this interesting:
The campaign is going well, but could use a little more boosting. The Steam build is going well too, hooks for achievements, leaderboards and cloud saving are being implemented. In around a few weeks preview builds will be ready for testing.
From here: http://steamcommunity.com/sharedfiles/f ... /315040793
Keening_Product was defeated before the game.

"Wise words. One day I may even understand what they mean." - Levellass
User avatar
Lunick
Vortininja
Posts: 283
Joined: Tue Jun 01, 2010 10:37
Location: Melbourne, Australia
Contact:

Post by Lunick »

Yet he can't address customer problems: http://steamcommunity.com/workshop/file ... 901765592/
Lunick is Here
Post Reply