18 ms·
Commander Keen source code released
- 3327 12y agoThis is a good day for humanity.
- dubfan 12y agoAfter Keen 3, the id guys were still under contract with Softdisk for another game. They made Keen Dreams to fulfill this obligation, but it wasn't released until some time after Keen 6. http://www.thefloppydisk.com/articles/commander_keen_the_game_that_made_id/ http://www.thefloppydisk.com/articles/commander_keen_the_gam...
- thristian 12y agoNote that "Keen Dreams" is the game sometimes called "Commander Keen 3.5" or "The Lost Episode"; unlike episodes 1-3 and 4-6 which were made by ID for sale by Apogee, Keen Dreams was (I think) the last game ID made to fulfill their contractual obligations with SoftDisk. It's interesting in a number of ways - the engine and art is very clearly halfway between the first and second Keen trilogies, it's the only game where Keen doesn't have his iconic pogo-stick or his Neuralizer Ray gun.
- jenscow 12y agoIt looks like Crystal Caves. ID and Apogee stole many hours of my childhood
- madaxe_again 12y agoCrystal Caves... there's a blast from the past. And Wizball - that game was like smack for kids.
- xmlninja 12y agoOh man the memories. Games are just too complicated these days. http://en.wikipedia.org/wiki/Crystal_Caves http://en.wikipedia.org/wiki/Crystal_Caves "On October 24, 2005, 3D Realms (formerly Apogee) released a maintenance patch to fix a bug in the game which set the player's computer's clock backwards 100 years after playing on Windows XP." lol.
- ryanhuff 12y agoPC games are perhaps too complicated, but from what I have seen of my son's gaming tastes, they have simply moved to the tablet and mobile devices.
- archagon 12y agoSecret Agent, anyone? I still love that game. In fact, all the old Apogee games had a sense of mystery and discovery that's sorely missing in modern titles. (Or is it nostalgia?) I remember playing through so many shareware titles and salivating at the new goodies that the nag screen promised from the remaining two episodes! By the way, Apogee has released a lot of their old titles for free. You can find them at 3drealms.com, in the Downloads section.
- dkfmn 12y agoMy childhood rejoices!
- Touche 12y agoThere's also an html5 version: https://github.com/JoeAnzalone/HTML5-Keen https://github.com/JoeAnzalone/HTML5-Keen
- jianshen 12y agoThis just caused a rush of nostalgia from a generation of PC computing that seems like a lifetime ago. Norton Commander, Jazzy the Jack Rabbit, TheDraw, the Gravis Gamepad...
- doorhammer 12y agoJazz Jackrabbit and Commander Keen on a gravis gamepad are second in nostalgia only to playing the original Test Drive [1] and Stunts [2] on a crappy old joystick... crap. Also playing Jet [3] on the same joystick. [1] http://en.wikipedia.org/wiki/Test_Drive_(video_game) [2] http://en.wikipedia.org/wiki/Stunts_(video_game) [3] http://en.wikipedia.org/wiki/Jet_(video_game)
- tejon 12y agoJoystick, feh! I played Stunts with a keyboard and I liked it. :D Also, you forgot Scorched Earth [1]. [1] http://www.whicken.com/scorch/ http://www.whicken.com/scorch/
- doorhammer 12y agoHoly crap. How could I forget scorched earth? That was one of the first games I remember playing with friends until all hours of the night. Actually took a road trip with my friend and his fifty pound laptop, and played it along the way.
- malkia 12y agoWe spend long nights with my friends trying to reproduce the weird high-resolution Scorched Earth was using, and then playing it. This game and Heroes of Might and Magic are the games I like to play with other people in the same room. So much fun!
- lubos 12y agoYeah, I used to play "Test Drive" but then "Stunts" came out and it completely blew my mind what was possible with computers back then. I wasn't even 10. Wikipedia says Don Mattrick, CEO of Zynga, was original designer of those two games? Consider me surprised.
- drivingmenuts 12y agoPretty much the only platformer I ever really liked.
- gaving 12y agohttp://github.com/keendreams/keen/blob/master/kd_main.c#L279 http://github.com/keendreams/keen/blob/master/kd_main.c#L279 God, so wish I'd known this at the time.
- SuperKlaus 12y agoHad to press F10 and one of the debug keys (eg. J for Jump cheat) https://github.com/keendreams/keen/blob/f477cef79f0893420f47c219e9b2c2053787c4cc/kd_play.c#L257 https://github.com/keendreams/keen/blob/f477cef79f0893420f47...
- Arjuna 12y agoA little slice of history regarding one of the technical foundations of Commander Keen, for those that aren't aware: "Then, the first breakthrough. John Carmack devised a smooth, scrolling routine similar to that used for the background of Nintendo games but never before possible on the PC." [1] The technique is called, adaptive tile refresh. [2] [1] http://www.3drealms.com/keenhistory http://www.3drealms.com/keenhistory [2] https://en.wikipedia.org/wiki/Adaptive_tile_refresh https://en.wikipedia.org/wiki/Adaptive_tile_refresh
- sprokolopolis 12y agoI remember reading in Masters of Doom that they had actually asked Nintendo if they could license games to get them on personal computers, Obviously, Nintendo declined. They were able to get the first level of Super Mario Bros running on personal computers and used that method in the Commander Keen series.
- hadoukenio 12y agoI recommend Masters of Doom to everyone. It's wonderful, historical, nostalgic and inspiring.
- prezjordan 12y agoSeconded. One of the best books I've ever read - I honestly wish I could forget it and start over.
- ekianjo 12y agoPretty good, but the technical explanations were pretty light at times. I'd really like to have the narration they had and on top of that, much more details about the technical side and how it was achieved. When you talk about literature you actually quote authors, when you talk about hackers I think it's appropriate to go back to the code and what it does, too.
- easytiger 12y agoIf you like that you will also like a book called Showstopper which is similar but about early challenges at Microsft building the NT kernel
- gohome190 12y agoI'd love to find the portion of code that has Keen moon the camera if the player is inactive for a period of time
- w-m 12y agoDoesn't really reference mooning, I guess: https://github.com/keendreams/keen/blob/master/kd_keen.c#L1531 https://github.com/keendreams/keen/blob/master/kd_keen.c#L15...
- trhaynes 12y agoThe variables are here, though... https://github.com/keendreams/keen/blob/f477cef79f0893420f47c219e9b2c2053787c4cc/kd_keen.c#L1120 https://github.com/keendreams/keen/blob/f477cef79f0893420f47...
- thristian 12y agoI'm not sure if that's was a feature of Keen Dreams; I definitely remember it was an easter-egg in Commander Keen 4, though. Normally, if you left Keen alone for a while, he'd pull out a book, sit down, and start reading it. However, in the Temple of the Moon, if you stood Keen on one of the moon-shaped carvings on the floor then left him alone, you'd get... a different animation.
- corbinpage 12y agoWhat about the source code for Episodes 1-3? Don't let the Vorticons win!! I'll never forget the day I discovered the Vorticon alphabet in episode 3. Mind blown.
- endgame 12y agoYou mean the standard galactic alphabet: http://www.shikadi.net/keenwiki/Standard_Galactic_Alphabet http://www.shikadi.net/keenwiki/Standard_Galactic_Alphabet
- cnvogel 12y agoOh my... the memories. In those times, I made me a loadable font for my Star-LC-10 9-pin dot matrix printer, and after a while could effortlessly read text printed in the SGA ;-)
- tripzilch 12y agoI had almost deciphered the entire thing on my own, before I found that translation sign in the hidden area in ep.3. IIRC the only one I missed was the character for 'Z', which I simply hadn't encountered on any sign so far.
- jff 12y agoKeen was amazing, I hope we see more of them released like this... IMO Keen Dreams was the worst of the lot.
- bane 12y agoSlightly related (from the same era). But the composer for the music for Unreal, Unreal tournament, Deus Ex, Tyrian, Jazz Jackrabbit and others has a music bundle for sale. http://loudr.fm/bundle/alexander-brandon-bundle/hq4hZ http://loudr.fm/bundle/alexander-brandon-bundle/hq4hZ
- eru 12y agoI'm getting old, if people refer to Deus Ex and Command Keen as being from the same era.
- Pxtl 12y agoKeen 1 was 1990, deus ex was 2000. Says how far PC gaming went in those 10 years, eh? It understates it, even, since Keen was a great technical achievement, while Deus Ex had unremarkable graphics - the game sold on a great fusion of rpg and fps, not graphics.
- bane 12y agoHa yeah, good point. I meant something else in my head and it got lost when translated to the keyboard.
- Pxtl 12y agoHoly crap - I'm not normally one that gets super nostalgic over chiptunes, but the compositions in Tyrian were brilliant. Definitely getting that.
- mikepurvis 12y agoThanks for the heads up! Really geeking out on Tyrian and JJ3.
- Eiriksmal 12y agoAh, thanks for this. I've had Jazz Jackrabbit 3's ImpulseTrackers for ages, but never knew/bothered to find out who the composer was. I had no idea he'd worked up an official album for it.
- jenscow 12y agohttps://github.com/sulix/keen-dreams-sdl2 https://github.com/sulix/keen-dreams-sdl2 The Linux port
- _pferreir_ 12y agoThat was fast!
- smegel 12y agoThis is awesome! Commander Keen was my very first PC game on my very first PC (a 386DX with 2MB ram and a 80MB hard drive). And it was a great game!
- k-mcgrady 12y agoSame here! No idea what the PC specs were (someone built it for me) but I'll never forget booting up, seeing DOS, and typing keen.exe to begin hours of fun.
- guidedlight 12y agoSame for me. My PC was a 8086 running at 4.77Mhz, with 640Kb memory, 20Mb HDD and EGA graphics. Surprisely Keen Dreams ran perfectly well on that very slow hardware...a testament to the software engineering back then.
- clarry 12y ago> a testament to the software engineering back then. Oh, don't worry. Hardware acceleration is coming, soon all the web apps will run just fine on your i7. But you might have to buy a new GPU and more RAM, because in five years, anyone would be crazy to have less than 32GB. Gaming might be a long way off still... ;-) And then you'll have to wait for your GPU drivers to mature if you're not on the mainstream OS.
- hartror 12y agoOn your marks. Get set. Compile to JS using LLVM in 3...2...
- ahomescu1 12y agohttps://github.com/keendreams/keen/blob/master/id_us_a.asm#L65 https://github.com/keendreams/keen/blob/master/id_us_a.asm#L... > baseRndArray dw 1,1,2,3,5,8,13,21,54,75,129,204 Hah he got the Fibonacci series wrong (it's supposed to be ...13, 21, 34, 55, 89, 144, unless he did this on purpose).
- sillysaurus3 12y agoCarmack got many things wrong. The interesting thing is, none of his mistakes mattered, otherwise he would have fixed them. So you wind up with emergent behavior and bugs become features, like bunnyhopping or rocket jumping. In this case, 204/129 ~= 1.581, which is pretty close to the golden ratio 1.618. In fact, let's just list all the ratios: 1/1 = 1 2/1 = 2 3/2 = 1.5 5/3 = 1.667 8/5 = 1.6 13/8 = 1.625 21/13 = 1.615 54/21 = 2.571 75/54 = 1.389 129/75 = 1.72 204/129 = 1.581 And for the regular series: 1/1 = 1 2/1 = 2 3/2 = 1.5 5/3 = 1.667 8/5 = 1.6 13/8 = 1.625 21/13 = 1.615 34/21 = 1.619 55/34 = 1.618 89/55 = 1.618 144/89 = 1.618 Here's a plot of the ratios (regular series in blue, Carmack's in red...ish): http://i.imgur.com/WA7ipZA.png http://i.imgur.com/WA7ipZA.png In this case, we end up with some lovely oscillations in the second half of Carmack's series. But does it look good for graphics, or behave well for gameplay purposes? No idea! Someone should find out what it's used for. It's an interesting little bit of historical excavation.
- ahomescu1 12y agoIt looks like the sequence was meant for a RNG, so getting it wrong probably had no impact on anything (it might have made the RNG weaker, but that's about it). EDIT: I think that sequence isn't even used anywhere (I couldn't find any reference to it).
- Chinjut 12y agoWhat's the relevance of these ratios to Carmack's purpose in extrapolating the series? At any rate, the limiting ratio of successive terms in the altered Fibonacci series 21,54,75,129,204,..., is the same as for the ordinary Fibonacci series, even if the convergence is slower (the difference between this altered Fibonacci series and the original Fibonacci series is just another version of the Fibonacci series, shifted over and multiplied by 20).
- jacquesm 12y agoDid anybody manage to build it?
- cmapes 12y agoI suddenly had a flashback to selecting soundblaster as my audio device..
- craigds 12y agoAre there instructions for compiling this somewhere? I don't see a makefile or configure.
- rpeden 12y agoThe readme in the repository give instructions on how to compile it using Borland C++.
- cnvogel 12y agoThe ".prj" file is the configuration/project file for the integrated development environment. https://www.google.de/search?q=borland+c&tbm=isch https://www.google.de/search?q=borland+c&tbm=isch
- ck2 12y agoApparently they sold 2-6 until recently - people were buying 1991 software? http://www.3drealms.com/keenhistory/keenhistory4.html http://www.3drealms.com/keenhistory/keenhistory4.html Keens 2, 3, 5, & the full version of 6 are commercial software, and it is not legal to download them from anywhere.
- ak217 12y agohttp://store.steampowered.com/app/9180/ http://store.steampowered.com/app/9180/ Actually, I think I'm going to go buy it now... it's been too long since I've played Keen.
- pp19dd 12y agoI bought the bundle a few months ago. The steam start process made the game wonky, so instead of going through the steam client, I made this batch file (for the 4th game): @echo off cd C:\Program Files (x86)\Steam\SteamApps\common\Commander Keen\base4 dosbox keen4e.exe -conf keen4.conf -exit exit The configuration file in question was modified, and these are the changes from the default that you might find useful, in the following sections: [sdl] output=ddraw And this one: [render] scaler=normal3x
- jason_slack 12y agoI remember this game but I still did a Google Image search to remind me: https://www.google.com/search?site=&tbm=isch&source=hp&biw=1360&bih=569&q=commander+keen+1&oq=commander+keen+1&gs_l=img.3..0j0i24l9.3919.6645.0.7416.16.15.0.1.1.0.116.1233.13j2.15.0....0...1ac.1.53.img..0.16.1236.d4kYfL6v96I https://www.google.com/search?site=&tbm=isch&source=hp&biw=1...
- mseepgood 12y agoThe source code is Keen Dreams (episode "3.5"), not episode 1.
- mr_sturd 12y agoCarmack's piracy protection was bleeding-edge stuff, back then! https://github.com/keendreams/keen/blob/master/kd_main.c#L397-L413 https://github.com/keendreams/keen/blob/master/kd_main.c#L39...
- cpayne 12y agoI'm not sure what that means. Is that a good thing?
- readerrrr 12y agoI wonder what that actually did. For the confused. The piracy.h and those two lines were removed.
- _wmd 12y agoLooks like piracy.h just contained a reference to a static blob (PIRACY) describing an 80x25x16 text mode screen. movedata copies it directly to the VGA screen base address (0xb800). Since VGA text mode used one byte to select the character (from a font of 256 entries), and one byte to describe the character's attributes (16 colors aka 4 bits, bold, strikeout, reverse), the resulting buffer for an 80x25 display was 80x25x2 bytes, aka. 4000 When that's done, it waits for the user to acknowledge the anti-piracy message by pressing enter. This is basically the early 90s equivalent of the "you wouldn't download a car" advert
- jason_slack 12y agoI thought that #if 0 doesn't get compiled and therefore definitely not executed. Can you explain more about your comment? I'm confused. Edit: Corrected "not"
- deleted 12y ago[deleted]
- jason_slack 12y agoright, so what was "bleeding-edge" as the poster stated above?
- endgame 12y agoI think the most interesting part of this (socially) is this: > This release was made possible by a crowdfunding effort. https://www.indiegogo.com/projects/let-s-get-keen-dreams-re-released-legally https://www.indiegogo.com/projects/let-s-get-keen-dreams-re-... Looks like they got most of the way, then someone must've paid the rest outside of indiegogo. What other classic games could be saved this way?
- abraxasz 12y agoOnly slightly related but I read "masters of doom" recently and I can't recommend it highly enough. It is a very entertaining read even if you are not crazy over video games. It tells the story of the two Johns, and mention Commander Keen among other things. Great read
- techtalsky 12y agoI have to say I saw every single pixel of every Keen game and I MUCH preferred the pure side view games over the isometric side view games of Episodes 4-6 and Keen Dreams. Episodes 1-3 had such an amazing, precise pixel design and a great sense of movement. The leaping just FELT right, with a slight pause while you pumped off the balls of your feet. The later games, although much more detailed, with a larger character, had a weird floaty feeling to the controls that I never quite enjoyed playing as much. That said, I loved all the games and it was an amazing sense of discovery. I remember the moment the shareware model finally took hold of me and I realized that I wanted the next episodes enough to pay for them.
- tripzilch 12y agoI totally get what you mean. Even though I think the graphics in 4-6 are simply gorgeous, and 5 is probably my favourite of the whole series (hard to say why, I wanted to say because it's in space, but then realized they're all in space, maybe it was the big red robot). However, there is something that just feels right in 1-3.
- RunningWild 12y agoOf note to anyone mentioning "Masters of Doom" are the following two items : - Apogee Catalog from this time period : http://www.scribd.com/doc/134559074/Apogee-Catalog http://www.scribd.com/doc/134559074/Apogee-Catalog and - The Book of id (from the Id Anthology) : http://www.scribd.com/doc/137817173/Book-of-id http://www.scribd.com/doc/137817173/Book-of-id Bask in the nostalgia.
- jamesk_au 12y agoI love some of the descriptions from the Apogee catalog: Crystal Caves - "Stunning cinematic sequences" Spear of Destiny - "Breathtaking soundtrack ... for AdLib, Sound Blaster or compatible" Commander Keen 6 - "Over 2.5 megabytes of graphics created especially for this episode"
- jiggy2011 12y agoSomeone should port this to a language that isn't C, not that I'm volunteering.
- bob_george33 12y agoThere is already someone porting Keen5 to C https://github.com/sulix/omnispeak https://github.com/sulix/omnispeak
- jiggy2011 12y agoI meant porting it away from C, the repo in the OP is in C.
- speeder 12y agoWhy is that? Unless you mean port from C90 to C99 or the most recent C... That game is perfect for C, why on earth port it to something that is not just better or more modern C?
- q3k 12y agoBecause C isn't web-scale.
- zenojevski 12y agoThe game renderer is also too coupled to the game backend. They should be separate pieces which only communicate via a RESTful API. Except the first frame should be rendered server-side to save time.
- grrowl 12y agoWhy? I could understand wanting to port it to platform x, but the language choice isn't the biggest barrier to modification/extension here.
- fl0wenol 12y ago
- yohanatan 12y ago8-space tabs? Yuk!
- mseepgood 12y agoA tab does not have spaces. It's a tab, one character. How it is displayed is the choice of the HTML spec / your browser.
- deleted 12y ago[deleted]
- yohanatan 12y agoYes, I know. But I figured that the author was not so misguided as to use actual tabs. Turns out it is Github's CSS that is to blame.
- ahoge 12y agoThat's GitHub's CSS. They could set `tab-size` to 4, but they just left it at the default of 8.
- mnutt 12y agoYou can change it by appending ?ts=4 to the URL.
- clarry 12y agoIf anyone's keen into doom, check out Doom 2 the Way id Did. In particular, look for the secret level (which also has the entrance to the other secret level).
- justin66 12y agoI'm fairly sure my ancient copy of Teach Yourself C in 21 Days came with a CD including the book text and Borland C++ 3.1, which is mentioned on github as working. UPC code 0672310694, or: http://www.amazon.com/Teach-Yourself-21-Days-Sams/dp/0672310694/ref=sr_1_1?ie=UTF8&qid=1410927432&sr=8-1&keywords=0672310694 http://www.amazon.com/Teach-Yourself-21-Days-Sams/dp/0672310... You can get yourself into trouble trying to use a newer version of the Borland compilers. 3.1 was the last to support native 16-bit code, or something like that, I believe. However, I'd take a crack at making the Turbo C in the Embarcadero Museum work: http://edn.embarcadero.com/article/20841 http://edn.embarcadero.com/article/20841 I honestly don't remember what the difference between "Borland C" and "Turbo C" is (the former includes more) so I don't know if that will work. But the museum download is free...
- segmondy 12y agoonly ~33k lines of code for everything in C/asm. yet today, it feels so strange that an equivalent game in our "much advanced languages" will probably end up about the same or larger. Are we really progressing?
- TheZenPsycho 12y ago33k sounds like a lot. I should think a game like this today would be more like 3k, or maybe 10k at most + engine code + content. Nowadays you see, it's wasteful to write an engine from scratch for a game like this. It was needed then, but it's a solved problem now. If you wrote 33k for a commander keen clone I'd wonder what you were doing.
- jenscow 12y agoIn this case, the 33k loc includes the engine. I think that is the point.
- TheZenPsycho 12y agoThis is a philosophical problem. What is the difference really between: 1. a prewritten engine, and 2. some hypothetical language each where you write commander keen with 3k loc. Where the hypothetical language has all the same stuff as the engine, it's just locked away behind a level of abstraction. if you could write commander keen in 3k of javascript (with the aid of all the stuff that's in a browser) How is that different from writing 3k of C with nothing but this entire commander keen engine already written and ready to go? What's are we calling an "advance", exactly?
- jenscow 12y agoI do see your point. The advancement is: You don't need to make/test your engine, and we have a lot more graphics cards and platforms, too.
- ahoge 12y agoThe imperative game logic stuff would be about the same. If this happens, print this and that. If this key is pressed to these 5 things. You can't abstract those steps away. However, video, audio, input handling, and loading resources would be a lot simpler. E.g. take a look at the input manager: https://github.com/keendreams/keen/blob/master/id_in.c https://github.com/keendreams/keen/blob/master/id_in.c You also wouldn't have anything like this: https://github.com/keendreams/keen/blob/master/id_ca.c https://github.com/keendreams/keen/blob/master/id_ca.c You'd put some resources in a list and that's all the caching you'd do. You should be able to do a game like this in less than 10k lines of Dart/TS/JS (2D Canvas, Web Audio, Gamepad API). Without using any external libraries or engines, that is. It also would be a lot easier to write, because all of the low level parts are gone.
- albertzeyer 12y agoVery nice! Unfortunately only Keen Dreams, but at least! I was waiting for this quite some time. I'm not sure if the other Keen versions will eventually follow. I think the project Commander Genius (http://clonekeenplus.sourceforge.net/ http://clonekeenplus.sourceforge.net/) should also be mentioned here. (Disclaimer: I was a developer of CG.) Keen 1-6 should be fully playable. Keen Dreams not yet, so this Open Source release might be helpful.
- 72deluxe 12y agoThis is brilliant. I played Keen Dreams for hours and even completed it. This will make very interesting reading.
- x3ro 12y agoI tried to compile this from within DosBox, but I couldn't find a `makeobj` binary to build the stuff in the static directory. Does anyone know where that would come from?
- mzs 12y agoYou have to build makeobj first: https://github.com/keendreams/keen/blob/master/static/makeobj.c https://github.com/keendreams/keen/blob/master/static/makeob...
- drzaiusapelord 12y ago"There is not enough memory available to play the game reliably. You can play anyway, but an out of memory condition will eventually pop up." Wow, I can't imagine a modern game giving this warning and still atempting gameplay. Guess a lot of people with low RAM machines had to take their chances back then.