Sometimes, rarely, and seemingly at random, Keen will appear visible in front of tiles that are supposed to obstruct him from view. This is a fairly well-known bug, and has been for some time. It was documented on KeenWiki in 2009 after it was brought to the attention of this forum by Deltamatic. I remember I accidentally ran into this years ago, before I'd seen the article on KeenWiki, and I've run into it recently. It is most known for occurring in this pole section in Regulation Control Center from Keen 5 (which seems to be the place where it most easily happens, and where I first observed it), but it can happen in several locations and levels, including in mods.From https://keenwiki.shikadi.net/wiki/Keen_ ... foreground
Keen appears in front of foreground
If Keen grabs onto the pole section behind green foreground tiles located in the upper leftmost corner of Regulation Control Center while jumping or pogoing, he occasionally appears in front of them.
Keen appears in front of the green foreground tiles.
This was discussed in a dedicated forum thread, with many people sharing that they had witnessed the bug. As far as glitches go, it seems to occur relatively frequently. Levellass noted that "it happens when Keen's foreground property is increased by 1 (To 2) instead of being SET to 1," but no one has provided an explanation for precisely what event that actually occurs in the game will cause this glitch to happen.
Until now!
...It's the goplats.
Here I was, starting a casual run of Battle of the Brains (as I often do), so I could have something to hold my attention span together so I could chat with a friend. Making my way through the first level, when I pulled myself up from grabbing the ledge by the elevator area one of the moving platforms happened to be pass by me. When it did, I noticed that Keen's climbing-up animation seemed to be cut short, instantly moving him to the top of the solid ground. "Ooh!" I said, thinking, "What have we here? A speedrunning technique, perhaps? "
So I spent several minutes messing around with this quirk and figuring out how to time the climbing up with the platform passing. Eventually I began to wander around the level and realized "oh, that foreground rendering glitch is happening again."
It was my friend that said "Is the platform pushing you on the Z-axis?" Excitedly I opened another DOSBox to see if I could get it to happen again. I went through the first level and once again performed the platform snapping glitch, and, sure enough, pulling up from the ledge-grab while the moving platform was nearby moved Keen in the third dimension!
I can't tell you how ecstatic I was from this discovery. Next I had to find what it was that ended the glitch and returned Keen to normal. Tried a few random actions such as collecting points which had no effect. I found that, perhaps unsurprisingly, completing the ledge-grabbing animation while no platforms were in the way reset Keen's rendering.
I recorded a quick video of the discoveries in action. See for yourself!
https://youtu.be/uKawC3xdk_4
Notably the glitch does not occur if the moving platform instead bounces you off the ledge, which can happen if it is too low compared to the player (and incidentally this is why I usually avoided pulling up while a platform was nearby and so did not notice this sooner). In the scenario shown in this video this is likely because by the time the platform is far enough out of the way that it stops preventing the animation, it's too far away to collide with any of Keen's climbing frames.
Obviously the next thing to do was to intentionally cause the pole rendering error in Regulation Control Center. At first glance, there doesn't seem to be anything near the infamous pipe that can trigger the bug. But upon closer inspection I realized that there is a single moving platform near the beginning of the level, which happens to pass near a solid ledge that can be grabbed onto...
And so, may I present, a video demonstration of exactly how to create this glitched state!
https://youtu.be/J9ZQBZGpbaA
Cheats used, of course, to keep the visual explanation short, sweet, and succinct. Even without cheats, this works every time! (As long as the maneuver is timed correctly.)
Despite how this bug may seem to appear, it really has nothing to do with poles or pogoing, contrary to the leading theories in Deltamatic's thread. It is simply easy to observe the effect around this pole. Interestingly, here it is also difficult to observe the cause. The platform which will trigger the glitch barely comes within reach of the ledge, making the animation snapping that occurs when Keen climbs the ledge while the platform is nearby barely noticeable.
Think about the odds of everything that would have to occur in order to stumble upon this bug in the wild. It would require you to, first of all, perform a ledge grab at this one specific spot, and then to pull yourself up when the moving platform just so happens to be passing by. Then you'd have to survive past the segment with the Slicestars. Once you've made it up, you'd have to choose to go down this short pole shaft into this small bonus area, which is obviously a dead end with little reward. If you pass it by, you won't see the effect of the glitch because it will go away after you go through the upcoming door. If you do go down, at that point it's unlikely you remember that you bumped into the moving platform, if you even noticed in the first place. Despite this area being perhaps the easiest place to accidentally find the bug, it may also be one of the hardest to correlate to the cause.
Armed with the knowledge of the behaviour of the glitch, I set out to find every location in Keen 5 where this can occur, which is anywhere that there is a moving platform next to a solid flat terrain edge. Abiathar made this easy.
Security Center.
Defense Tunnel Vlook.
Regulation Control Center, of course.
Even good old Neutrino Burst Injector has a spot.
Korath III Base. If you miss this train of platforms you don't get a second chance.
At this point I had only paid attention to areas near the moving platforms that run on a set 2D path and not the ones that simply move back and forth linearly. After reading a post from forum user Shilor in which they shared that they had witnessed this bug in the first level, I tested pulling up near the linear platform here (as there are no set-path platforms near solid terrain in this level) and in fact it worked.
Thus, this can bug can also be triggered in Ion Ventilation System.
As far as I can tell, this should be all the locations where the glitch can be triggered in vanilla gameplay (without using cheats, which would allow it to be possible in more places).
A moving platform is able to trigger the glitch if it can pass within 3 tiles above a solid edge, as seen in these screenshots taken from Abiathar. Shown are Ion Ventilation System and Regulation Control Center (again, just barely within reach of the platform).
If the platform is passing up or down the side as seen in the first level in Battle of the Brains, it has to come within 2 tiles of the solid corner.
Further observations:
You may notice in these screenshots that Keen is always facing to the left while ledge-grabbing. I noticed, and wondered why this was. In most cases it is simply because that coincidentally happens to be the way the reachable ledge is facing. Initially I thought that the platforms had to be moving in a certain direction for the glitch to work (in order to not collide with Keen in a way that simply pushes him off). But I had to wonder if Keen facing left had anything to do with the glitch.
So I ran some experiments, using cheats to access an unwelcoming playground that happened to be the most convenient place to test...
https://youtu.be/boV78_1dUgw
As you can see, it seems that, strangely, the bug does not occur if Keen is facing to the right.
Before I thought to test the collision of the linearly-moving platforms, I tested if being pushed by a Little Ampton during the climbing animation would trigger the bug (in an effort to try to find what Shilor had seen). It did not in fact cause any foreground errors, though it did interrupt the climbing animation.
I tried to cause this bug in Keen 4 and 6 as well. Notably, forum user The Keen Commander alleges that the foreground bug has been seen in Keen 4, specifically in Isle of Tar, but I couldn't find any areas in Keen 4 with the combination of platforms near an edge that matched the required criteria that I know about. I wonder if there are other ways to trigger the bug or if it could be done here with extreme precision. That may be an expedition for another day.
In Keen 6 I was able to find some areas with a ledge near a goplat. I found that the platforms here will still collide with the player and cause the climbing animation to skip, but afterward there was no effect on the foreground rendering.
One final piece of trivia. When the climbing animation is cut short it usually makes a small noise of Keen hitting the floor. I can't tell why this is but I wonder if the platform pushes Keen's 2D position around slightly.
In summation!
The player will be pushed above the foreground rendering layer if a moving platform collides with the player while in the ledge climbing animation. It only works if Keen is facing to the left. Keen returns to normal rendering when completing the ledge climbing animation without being pushed by a moving platform, or after going through a door.