Chocolate Keen (a "port" of Commander Keen 1-3)

Here is where to post about the latest Commander Keen fangame or modification you've finished, a new website you've made, or another Keen-related creation.
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 »

Snortimer wrote:Seems quite nice.

It froze when I tried to click on "previews" in the title screen (it went to the "previews" page but the content was all black and I couldn't escape it).
Thanks!
The previews are an example of something that is not fully implemented at the moment. I've thought that after a little while you should see the menu again, though?
Snortimer wrote:Also, my sound seems to be coming from the speakers rather than directly from the computer. Is this because newer computers can no longer make those beeps? (or because I'm using Windows 7?)
Just like Commander Genius and DOSBox, the sound in Chocolate Keen comes off a dedicated sound card, an integrated audio chip or similar. This is a more cross-platform way of outputting sounds, even among PCs since many of them don't come with internal speakers these days, indeed.
Dr. Kylstein wrote:In 200-line modes, two of the color signals are shut off so as not to interfere with CGA monitors. The mode set might map them to corresponding 6-bit colors for upward compatibility with high-res modes, but the extra data is lost on its way to the monitor. Custom colors in mods are only possible on VGA cards, and only through VGA-specific registers.

Edit: The 4th signal is redefined as "brightness" in keeping with the CGA standard. Also, dark yellow was hardwired to brown in CGA monitors, so any emulation of them (including VGA cards or EGA monitors using these modes) will show the same.
All of that seems to nail it! Thanks! :)

What this means is that the current behavior in Chocolate Keen1, where the "Secondary Green" bit is treated as "Intensity" and the other "Secondary" bits are ignored, won't be altered. The overscan color should be selected in a similar way, though (which isn't done in the current version).
User avatar
_mr_m_
Vortimaestro
Posts: 431
Joined: Mon May 11, 2009 23:14
Location: Quetzalacatenango

Post by _mr_m_ »

For whatever reason, the virus protection on my work computer (we use Sophos here... bleh) picks up 'chocolate_keen1.exe' as a virus.

Just letting you know about a false positive.

Otherwise, the game runs really well -- apart from the already mentioned ammo bug
Last edited by _mr_m_ on Tue Oct 30, 2012 22:21, edited 1 time in total.
"I just drew this stupid little fish." -- Tom Hall
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

I'm pretty sure there are some arrays of 17-bytes in the the IDA disassembly that correpsond to the partially faded palettes.
Possibly you mean these: http://www.shikadi.net/keenwiki/Patch:Palette#Palettes
What you really need, not what you think you ought to want.
User avatar
Flaose
Vorticon Elder
Posts: 568
Joined: Sat Oct 27, 2007 20:30
Location: The Frozen Hell
Contact:

Post by Flaose »

NY00123 wrote:
Flaose wrote:I did run into a serious bug though (unless you're going for a peaceful run), Raygun charges aren't stacking! Makes the game super intense!
I wonder what are you referring to here. At least I think I can use the raygun just like in DOSBox. I need to press once for every shot.
I mean that picking up additional rayguns never gives me more than five shots. That is, picking one up will set the ammo count at five, instead of increasing it by five.
Cerebral Cortex 314 - For All of your Commander Keen Needs.
Eat at Joe's
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 »

_mr_m_ wrote:For whatever reason, the virus protection on my work computer (we use Sophos here... bleh) picks up 'chocolate_keen1.exe' as a virus.

Just letting you know about a false positive.

Otherwise, the game runs really well -- apart from the already mentioned ammo bug
Yikes! The most I can assure you that I've compiled this on my own...
There are two unusual things about the EXE which are VERY rough guesses one could have:
- 16-bit sized variables are VERY commonly used. This is still a game from the beginning of the 90's, after all.
- There is a great resource of possible memory corruptions that I've spotted. It is the allocation of a quite large structure (think of the memory the vanilla app needs...sort of) - on the stack. An undetected stack overflow could be the cause of "fun"...

The latter point should be fixed here.
Flaose wrote:I mean that picking up additional rayguns never gives me more than five shots. That is, picking one up will set the ammo count at five, instead of increasing it by five.
Ah :o One of these little misses... fixed now!
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 »

And here is an update. It has taken somewhat longer than I have hoped...should have been expected, though. Now assume for real it's the last update of mine for awhile!

*** See the first post in this thread in order to find download links for the last release.

Changelog

October 31th, 2012 (v0.4.0): A secondary release.
- Three numbers are used now for the version numbering; Although, I can't think of that many (theoretical) future changes right now...
- OpenGL support has been implemented. It can be disabled at compile time.
- Hopefully fixed a serious potential cause of several memory corruptions, even though these do not always occur, or they occur on very specific setups. Basically, the allocation of a quite LARGE object on the STACK, in contrary to (not-too-many) smaller ones, is a pretty BAD idea!!! Of course, it may be possible to increase the stack size, but it seems more portable to avoid this.
- A good reminder has come that, by default, SDL redirects text output to stdout.txt and stderr.txt on Windows. Most importantly, this means that the list of command line arguments is not seen if the game is loaded from a command prompt. So, now the arguments are simply given in the README.TXT file.
- Changes have been done to the command line arguments and how they're used. A few arguments are replacements of others, while the rest are actual additions.
- Fullscreen is now the default, along with a scale (zoom) level of 2.
- OpenGL is used as a default. If Chocolate Keen1 is compiled without OpenGL support, then Overlay is the default.
- The desktop resolution is chosen for the display dimensions by default. That role does not apply if a software surface is used for output, though.
- As a result of changes regarding the video mode (like fullscreen by default), the chocolate_keen1_full_overlay.bat and chocolate_keen1_full_overlay.sh scripts are not bundled anymore.
- Fixed the Keen death sequence in the case Keen falls to a pit (below the level's bottom).
- The correct overscan border color should now be used during gameplay. At least, it is probably the case with the vanilla unpatched Keen behaviors.
- When a raygun is collected, 5 additional charges are added to the current arsenal, rather than replacing it.
- Fixed a few more cases of potential memory corruptions. While on vanilla Keen such corruptions are found, we simply cannot accept it here. It has seemed to resulted in a few "mysterious" crashes with OpenGL and video mode resets (fullscreen versus windowed).
- A few more minor technical changes, here and there...
Last edited by NY00123 on Fri Jul 05, 2013 21:01, edited 2 times in total.
User avatar
Flaose
Vorticon Elder
Posts: 568
Joined: Sat Oct 27, 2007 20:30
Location: The Frozen Hell
Contact:

Post by Flaose »

Beautiful! I love it! It's just like it was playing it 20 years ago (and now I feel really old)! I especially love the overscan border and sounds (though my first PC speaker was lacking in the bass department)! Also, exclamation marks!
Cerebral Cortex 314 - For All of your Commander Keen Needs.
Eat at Joe's
User avatar
troublesomekeen
Vorticon Elite
Posts: 1245
Joined: Fri Feb 03, 2012 8:01
Location: Three-Tooth Lake
Contact:

Post by troublesomekeen »

The sound reminds me of.....an aluminum darth vader?
Great stuff!
Image
Commander Keen in... Canteloupe Quest!
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 »

Thanks for the comments!

I should have really mentioned the following before, though:
The way the sounds are played (like on an actual PC with DOS and an internal speaker) is already implemented in a current beta of Commander Genius.

It may also be the time to tell there are a couple of relevant unofficial patches for DOSBox, too. I am not aware of a proper overscan border patch, though. (There is one old patch where a transparent border covering a little of the DOSBox window contents is used.)
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

Pressing ctrl or alt doesn't clear the status box. Also, does anyone else have problems with charging gargs not jumping?
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 »

Levellass wrote:Pressing ctrl or alt doesn't clear the status box.
If I understand correctly what you're talking about (the box activated using the space key?) then I think this is the vanilla way. At least, that is what I experience on vanilla Keen1 while being run within DOSBox.
However, it is true that the space key may not act as expected, when you try to use in order to remove the box from the screen. Two keyboard properties known as "repeat delay" and "repeat rate" should be simulated in order to act more like vanilla Keen. The thing is, these are two values which are often configurable from pure DOS, so maybe a specific choice of such values should be used.
Levellass wrote:Also, does anyone else have problems with charging gargs not jumping?
Guess what? Seems you're right! Looks like another minor miss I've done (probably not related to your bug report, though), along with something that, initially, I didn't understand why it's there in the code (which is relevant for your report).

This results in a minor release with no much testing this time... let's hope it is actually working...

*** See the first post in this thread in order to find download links for the last release.

Changelog

November 3rd, 2012 (v0.4.1):
- Fixed a couple of bugs in regards to the garg, mainly with the jumps.
- The "chocolate_keen1_full_overlay" scripts are actually removed from the
source tarball now.
Last edited by NY00123 on Fri Jul 05, 2013 21:01, edited 1 time in total.
gerstrong
Vorticon Elite
Posts: 1244
Joined: Wed Dec 31, 2008 14:44
Location: Frankfurt - Germany
Contact:

Post by gerstrong »

I've tested your latest version and really like it.

Good work on the Port!! Keep it going! :)
Having fun developing stuff...
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 »

gerstrong wrote:I've tested your latest version and really like it.

Good work on the Port!! Keep it going! :)
Thanks to the Commander Genius project leader! Or I should say, thanks for the above comment, as well as the Commander Genius project itself of course... oh and a few uncompression routines "borrowed" from CG and used in Chocolate Keen1 at the moment... ;)

To add some more info, guess what? There is another update! A few more things missing beforehand are now implemented. The most important one, though, is probably the Keen 1 finale sequence!

*** See the first post in this thread in order to find download links for the last release.

Changelog

November 11th, 2012 (v0.4.7):
- Scrolling text functionality is now fully implemented. The help text is still not there, though.
- The ability to show an image from a file is also implemented! This includes the Keen 2 and 3 previews within Keen 1.
- It has happened after all... The Keen 1 finale can now be watched!
- As a consequence, a minor bug in the image loading routine has been spotted while originally implemented. Upon fixing it, though, it has resulted in a crash... Why? Well, on vanilla Keen the image is temporarily loaded to the map data (!!), but the fix wants to update the screen. This includes an update to the on-screen map tiles. So, as a workaround/fix, no bogus tile update is done at all now.
- Switches for lights, bridges and tantalus rays are now implemented. While out of all absolutely unmodified Keens these are found on Keen 2 only, relevant code is also found on Keen 1. The light switches can easily be tested by modifying a level. For the two other switches, tile types need to be adjusted. Note that while the Tantalus Ray switch appears to show the sequence with the screen shaking as expected, it does not result in a "game over" like on Keen 2. Rather, it returns to the world map with a black screen, being the result of a "fade out" without a following "fade in". It is the case in the original DOS version of Keen 1 with minor modifications to the tile properties, though.
- An ice cube shot from a cannon is now split into four smaller cubettes when it hits something (i.e. the original behavior), instead of two.
- An unpacked KEEN1.EXE file can actually be used now.
- A workaround for OpenGL border glitches which may appear on window/fullscreen mode switching within X11 is now in effect. At least, it works locally on Linux with X11. On Windows it may not occur since SDL resets the OpenGL context upon video mode switching, while it is not done on Linux with X11 (apparently).
- A few more minor fixes/changes.

*** Known issue: The timing may be less true to the real thing (if not to the DOSBox way), especially in the finale sequence.

P.S. I've just spotted a couple of typos in the changelog *after* uploading the archives... great. This is one of the few cases where a spell checking within the text editor could be handful. At least I have that here on the forums!
Last edited by NY00123 on Fri Jul 05, 2013 21:01, edited 1 time in total.
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 »

A new version is available. There is very little which is missing now.

*** See the first post in this thread in order to find download links for the last release.

Changelog

November 14th, 2012 (v0.4.12):
- Dependency on SDL_mixer has been removed, and SDL is used for audio directly in this version.
- More shortcut keys are implemented! These consist of F1 for the help text, F2 for sound toggling and F3 for reconfiguring keyboard assignments.
It is a good time to note that the -nosound argument still works, although it makes a few things shorter since they usually wait for a sound playback to complete. The level completion sequence is an example.
- The "clear keys" functionality hasn't done a vital part of its job, hence toggling off the scorebox with the "Space" key hasn't worked as expected (basically displaying another one immediately). That is fixed now.
- Another keyboard related change:
The keyboard's "repeat rate" and "repeat delay" are now emulated, with specific values chosen for these. Hold a key for about half a second, and then multiple presses of the same key are going to be simulated (but not releases of it).
- Settings like keyboard assignments and sound toggling are now actually saved on quit! Truly, the bug was irrelevant before since none of these could be changed up to the current revision...
- Alright, Looks like the time measurement is more accurate now. Or at least, when displaying two instances of the finale sequence side by side: One by Chocolate Keen1 and the other from a captured DOSBox video, they actually tend to stay in sync way more than beforehand!
The fix? Well, it has already occurred before with the general game timer, and now again for the simulation of VGA vertical retrace: Force the usage of 64-bit values for calculations due to (relatively) large numbers involved...
A bit more info: The simulation needs to know the refresh rate the game should "think" it has. Online specs tell that, at least on a VGA card, 70.086Hz is the refresh rate for the 200-line EGA graphics mode used by Keen 1, while VLC reports a frame rate of 70.086304fps for the captured video from DOSBox.
For now the rate of 70.086Hz is simulated.
- On a relevant note, while it is easy to think the graphics mode on EGA and VGA cards looks identical on both, there are in fact a few differences. One of them is the refresh rate. It can now be selected using the -ega argument, picking a rate of 59.92Hz (rather than the default of 70.086Hz).
- There are a few additional minor fixes again.
Last edited by NY00123 on Fri Jul 05, 2013 21:02, edited 1 time in total.
User avatar
Roobar
Vorticon Elite
Posts: 3267
Joined: Tue Jan 08, 2008 16:12
Contact:

Post by Roobar »

How can I stretch the screen in 16:9 aspect ratio?
Post Reply