Keen 4 Bounder Bug

Here, you can get help with anything or just chat about the original Commander Keen games.
Post Reply
User avatar
Frenkel
Vortininja
Posts: 33
Joined: Sat Jan 01, 2022 11:25

Keen 4 Bounder Bug

Post by Frenkel »

Commander Keen 4 can be started with the command line argument NOPAN. This causes the game to use less memory at the expense of smooth horizontal scrolling. It also won't let you walk off a Bounder.
User avatar
Frenkel
Vortininja
Posts: 33
Joined: Sat Jan 01, 2022 11:25

Re: Keen 4 Bounder Bug

Post by Frenkel »

It's nice to see Omnispeak already added this "feature".
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Re: Keen 4 Bounder Bug

Post by Nisaba »

Frenkel wrote: Sat Jan 01, 2022 11:56 Commander Keen 4 can be started with the command line argument NOPAN. This causes the game to use less memory at the expense of smooth horizontal scrolling. It also won't let you walk off a Bounder.
Whew... I'm wondering, why one would want to use such switch command. This non smooth scrolling effect feels like encouraging epilepsy...
:dead

Anyways, nice find. How come you've noticed this feature?
out now (link) : Image
User avatar
Frenkel
Vortininja
Posts: 33
Joined: Sat Jan 01, 2022 11:25

Re: Keen 4 Bounder Bug

Post by Frenkel »

The NOPAN feature? I guess by looking in the executable years ago.
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Re: Keen 4 Bounder Bug

Post by NY00123 »

Interesting find! I suppose that NOPAN was originally used for debugging. It works kind of like the CGA executables, which don't support panning at all; The main difference is the the screen and sprites scroll 8 pixels at a time with EGA graphics, compared to 4 pixels at a time with CGA graphics.

Reason is that for the EGA, graphics are generally stored as multiple 1-bit planes. 4 planes are used for most graphics: Red, green, blue and intensity. Masked graphics also use an additional 1-bit plane for transparency. As a consequence, each on-screen pixel in the level is represented by 1 bit (per plane), thus ending with 8 pixels per byte.

For the CGA, just a single plane is used (ignoring transparency for masked graphics), and each pixel is represented by two bits which are stored sequentially. This leads to 4 pixels per byte.

Regarding the bounder bug, it can easily be assumed that /NOPAN impacts just the rendering, but this isn't the case. keensource456 should tell why. Skipping the terminator sequence with the scrolling words as done in the CGA versions in one example. The terminator can actually be seen as a demonstration of EGA panning.

What impacts riding on bounders is more general code which handles Keen's ability to be carried by platforms. This code is also a bit different in the CGA builds. The obvious reason is making Keen not appear jerky in-game while standing on a horizontally moving platform.
User avatar
Frenkel
Vortininja
Posts: 33
Joined: Sat Jan 01, 2022 11:25

Re: Keen 4 Bounder Bug

Post by Frenkel »

Another strange NOPAN picture:
Image
Post Reply