Warp zone in Well of Wishes

Here, you can get help with anything or just chat about the original Commander Keen games.
Post Reply
User avatar
proYorp
Vorticon Elite
Posts: 472
Joined: Fri Mar 03, 2017 1:56
Location: Orbit
Contact:

Warp zone in Well of Wishes

Post by proYorp »

So I go into the Well of Wishes real quick just to take a look at where the level spawn is, and I want to check how close it is to the edge of the level so I noclip my way into the left wall. As I get to the edge of the level boundary, I notice that the Schoolfish, instead of following me up against the left wall, turns around and starts pressing against the right wall instead. And I think, "Well that's odd. Does going outside the level boundary teleport me to the other side of the level?" So I turn on the DOSBox recorder....

Look at this:
https://youtu.be/xR_Y4c1IEqY

In this clip about 30 seconds in I decide to see how far I can push this, so I turn on God Mode and start holding down the left arrow to go as far outside the level as I can.

Sure enough... after a minute the camera flies across the whole level and I come out on the other side! Though I have to keep holding left for a while before I actually come out of the wall.



But there's more! :O I wanted to see what would happen if I tried to go back the way I came. After some more messing around I restarted the level and recorded a new video:
https://youtu.be/jaZKeSR-aUk

Once I got through to the right side of the level again, I brought a Schoolfish up to the wall to see how it would behave from this side. Strangely, it didn't turn around when I went outside the level from here (except for when it maneuvered around a block in its way).

Also, why am I collecting points out there? Where am I?! Is it random memory data out there? Are there points in that?

Finally, I reached the point of teleportation and confirmed that the warp works both ways.



This can't be the first time someone has found this, but it doesn't seem to be documented anywhere. A quick search on here doesn't turn up anything and it's not on KeenWiki's list of bugs. It seems similar to the warp in the sky of Lifewater Oasis (which seems like it could have been intended to be used to actually reach the lifewater), and I guess that's what made me suspect teleportation here.

People who reverse-engineered the source code, what is this? An unused feature? An overflow error?
"Friendly. Very friendly. Too friendly." Image
User avatar
The Shifted One
Grunt
Posts: 28
Joined: Wed Jul 22, 2009 21:25
Location: Kingdom Come

Re: Warp zone in Well of Wishes

Post by The Shifted One »

This sounds like an old fashioned screen wrap to me.
The coordinates that store Keens location probably reset when/before overflowing.
The same thing happens on the world map of Keen 6 which as a kid I thought was done on purpose so the planet would feel round/spherical... :crazy

The point collecting is interesting though.
I don't know if that's (garbage) memory being read or the screen not properly drawing Keens position.
Someone better educated on the subject can probably explain that.
Existence is futile!
User avatar
Soul Monster
Vortininja
Posts: 223
Joined: Mon Jun 14, 2021 2:47
Location: An Arctic Hellscape

Re: Warp zone in Well of Wishes

Post by Soul Monster »

Just watched the videos you uploaded a few days ago, and I never even knew about this until you mentioned it.

I'm not sure how I could replicate this and unfortunately I didn't get it on video, but I just played through the Well of Wishes and I came across a similar glitch where a Dopefish was being warped to other parts of the level in a similar way, only it was passing through walls and being dropped off at another part of the level where it could fit.

(By the way, I really enjoy your channel, Proyorp. I like your gameplay videos and how you keep the commentary text-based like it used to be on Youtube.)
Last edited by Soul Monster on Tue Oct 19, 2021 4:24, edited 1 time in total.
User avatar
Quillax
Vorticon Elite
Posts: 554
Joined: Sat Mar 14, 2015 14:41
Location: Quillax Ship
Contact:

Re: Warp zone in Well of Wishes

Post by Quillax »

Wow, that is weird! My guess as to what's going on is that you went through a land of garbage data. In other words, the levels are actually a lot bigger than they are but the actual level is in the top-left. That would explain why the Schoolfish went right when you exited to the left, and why it didn't go left when you exited to the right. Everything out of the real level are randomly generated tiles (probably from non-level-related data) to fill in the blanks in case that zone is ever needed, and some of them happen to be point tiles. Who knows, maybe if you turn off God Mode you'll run into a hazard tile.

Keep in mind that this all just a theory, but I think it's quite credible. In Crystalus you can peek below the level and see garbage data, through a glitch. I'd like to see what K1n9_Duk3 or another DOS expert what has to say about this, though.
Quillax Ship - Where you can download all of my cool, keen mods and super-marvelous fangames!
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:

Re: Warp zone in Well of Wishes

Post by Multimania »

So, I tried this out under Omnispeak, and the same thing happens there.

Basically, this is indeed just wrapping:

The reason this happens in Well of Wishes, but no other level is that Well of Wishes uses the "world map camera", not the "normal in-level camera". The function which moves the camera in normal levels (called CK_NormalCamera() in Omnispeak, ScrollScreen() in Keen) also checks to see if Keen has left the side of the map, and marks the level complete if so. In Well of Wishes, however, a different function (CK_MapCamera() in Omnispeak, WorldScrollScreen() in Keen) handles the camera, and has no such check. So there's nothing stopping Keen from exiting the side of the screen.

The schoolfish turn around because as soon as you're beyond the left edge of the screen, Keen's x-coordinate goes negative. And because it's an "unsigned" number, this actually makes it a very large positive number (-1 tiles is equal to +ve 255 tiles, though the game stores it as 16ths of a pixel). The Schoolfish code just checks the x-coordinates of Keen and itself, and uses that to decide what direction to move.

Since the level is less than 256 tiles wide, there's 156 tiles of garbage before you emerge out the other side of the level, making the screen scroll. But: the garbage data is not actually garbage in most cases, it's just another part of the level data (usually the next tile or two down). It's actually other, non-level data above and below the level. Omnispeak does "fake" this garbage data in order to make glitches like this work, as most modern operating systems would crash your program if you tried to access invalid data.
User avatar
Quillax
Vorticon Elite
Posts: 554
Joined: Sat Mar 14, 2015 14:41
Location: Quillax Ship
Contact:

Re: Warp zone in Well of Wishes

Post by Quillax »

Ah, that makes sense, Multimania! Thanks for the explanation! (Interesting how explain is a word but not explaination. :confused )

So I assume what's beyond the level's right side is a slightly moved down duplicate of the same level, right? I tested the warping myself and I was able to get a jawbreaker and gum stick right around where they would be in the original level vertical-wise. Can't tell if it's exact, though. For some reason, I ran into a cluster of points in the garbage area. Not sure what they are but it gave me 800 points total. Looking at the level map, the only clusters I see are jawbreakers and Shikadi Soda, and those are definitely not what I got. Also, I got a couple jawbreakers at positions that aren't even close to the jawbreakers in the main level.

I tried saving and loading within the garbage part to see if it would show me what's inside, but it just shows the main level. It seems that if Keen is slightly close to left side of the main level (or close to the far right side of the garbage I should say), saving and reloading will make the camera set at the right side of the main level only to zip back to the left side. As Keen gets closer to the right side of the main level, saving and reloading sets the camera at that side, even if the camera was originally set at the left side. At one point when I saved and reloaded, about a quarter or halfway through the garbage part from the right I say, the camera set itself at the left side of the main level.

This is so weird! :dopefish
Quillax Ship - Where you can download all of my cool, keen mods and super-marvelous fangames!
User avatar
proYorp
Vorticon Elite
Posts: 472
Joined: Fri Mar 03, 2017 1:56
Location: Orbit
Contact:

Re: Warp zone in Well of Wishes

Post by proYorp »

need to write a more in-depth reply here but for now:

Thanks for the explanation Multimania! (Also yes English is weird. :dopekeen) A friend of mine with a lot of knowledge about technical stuff like this theorized about the outer data being an offset duplicate of the level. Strange thing is that in one of my videos (the 2nd one I think) I collected four consecutive point items out there, and I don't think the actual level has 4 point items that are right next to each other like that.
"Friendly. Very friendly. Too friendly." Image
User avatar
proYorp
Vorticon Elite
Posts: 472
Joined: Fri Mar 03, 2017 1:56
Location: Orbit
Contact:

Re: Warp zone in Well of Wishes

Post by proYorp »

The Shifted One wrote: Mon Aug 23, 2021 9:29 This sounds like an old fashioned screen wrap to me.
:D You know, when I first saw this I was immediately reminded of the screen-wrap warps in Pac-Man, and wondered how easy this effect would be to modify into something like that (more instant, so it would feel less like a glitch). I almost wondered if iD Software had planned to do something like that and this was just a remnant, like the weird teleporting in Lifewater Oasis. It could be used for levels where you have to teleport between the sides of the screen to access different areas. Could make some interesting puzzles out of that....


Soul Monster wrote: Sat Aug 28, 2021 19:01 I'm not sure how I could replicate this and unfortunately I didn't get it on video, but I just played through the Well of Wishes and I came across a similar glitch where a Dopefish was being warped to other parts of the level in a similar way, only it was passing through walls and being dropped off at another part of the level where it could fit.
Sounds like a hitbox or clipping error maybe? :confused Was it rapidly flipping back and forth? I think I may have seen them do that.... Do you remember what part of the level this was at?
(By the way, I really enjoy your channel, Proyorp. I like you gameplayy videos and how you keep the commentary text-based like it used to be on Youtube.)
Oh gosh, this took me by complete surprise. :o Thank you so much, I had no idea anyone was paying attention to my random videos. Funny that you mention the text, as I was planning to experiment with using a text-to-speech generator thing, though I wouldn't want to use a super robotic sounding one. Google's got some fancy AI ones that might actually have more tone than my actual voice lol. It should be an interesting experiment at any rate, probably too much effort to regularly use, but I digress....


Quillax wrote: Tue Oct 05, 2021 5:29 Who knows, maybe if you turn off God Mode you'll run into a hazard tile.
Concern of this happening was why I turned God Mode on in the first place, heh. But wandering around out there a bit without God Mode, it actually seems to be safe... I guess there's no hazard tiles in Well of Wishes. Further evidence that it's not totally random out there I guess.


Quillax wrote: Fri Oct 08, 2021 3:53 For some reason, I ran into a cluster of points in the garbage area. Not sure what they are but it gave me 800 points total.
I think this may be the same thing I was talking about. There is a cluster of four 200 point items (Three-Tooth Gum) somewhere out in the void (demonstrated at 1:23 in my second video). It seems to be constant because I got the same cluster in probably the same place when I was messing around before I recorded that video (it's lucky I could find it again). It's strange because this cluster does not exist in the actual level. The Three-Tooth Gum items are pretty distant from each other. Maybe the level is a little scrambled out there still? :confused It would be nice if we could see it....
Anybody have an explanation for this one?
"Friendly. Very friendly. Too friendly." Image
User avatar
Soul Monster
Vortininja
Posts: 223
Joined: Mon Jun 14, 2021 2:47
Location: An Arctic Hellscape

Re: Warp zone in Well of Wishes

Post by Soul Monster »

proYorp wrote: Mon Oct 18, 2021 7:16 Sounds like a hitbox or clipping error maybe? :confused Was it rapidly flipping back and forth? I think I may have seen them do that.... Do you remember what part of the level this was at?
It's been a few months since it happened, but as I remember it wasn't spinning back and forth like it normally would, it faced the same direction the whole time. I think it was when you encounter the second or third dopefish in the level.
Oh gosh, this took me by complete surprise. :o Thank you so much, I had no idea anyone was paying attention to my random videos. Funny that you mention the text, as I was planning to experiment with using a text-to-speech generator thing, though I wouldn't want to use a super robotic sounding one. Google's got some fancy AI ones that might actually have more tone than my actual voice lol. It should be an interesting experiment at any rate, probably too much effort to regularly use, but I digress....
Yeah man, I've watched your videos from time to time since you uploaded your first attempts at Suburb Shenanigans. Over the years I've been watching youtube videos made by members of this forum to see gameplay of new mods, and for that reason, there's a lot I downloaded because of them.

The text-to-speech style could work, but I also feel that there was a charm to the text-based commentary you've done in the past. It seemed like a good compromise where the player can add in some comments while keeping the viewer immersed in the game. But hey, it's worth a try, right?
User avatar
Quillax
Vorticon Elite
Posts: 554
Joined: Sat Mar 14, 2015 14:41
Location: Quillax Ship
Contact:

Re: Warp zone in Well of Wishes

Post by Quillax »

I'd be interested if someone was able to show us what the garbage part of Well of Wishes looked like. Too bad you couldn't see it in-game by saving and loading within that part -- The Well of What the Garg! :garg

Also, proYorp, I've seen some of your videos and they're neat. I also like the text-based commentary. Kind of brings back some memories. :)
Soul Monster wrote: Sat Aug 28, 2021 19:01 I'm not sure how I could replicate this and unfortunately I didn't get it on video, but I just played through the Well of Wishes and I came across a similar glitch where a Dopefish was being warped to other parts of the level in a similar way, only it was passing through walls and being dropped off at another part of the level where it could fit.
Okay, that is just bizarre! :dopefish I've never heard of nor seen that glitch all in my life! Just to verify, were you running the original Keen 4? Not a modified version? It just seems so weird -- I would think something like that should be documented in KeenWiki by now. (Although we did discover a couple other glitches that haven't been documented, including the subject here, so...) The only explanation I can possibly think of is that the Dopefish has different hitbox sizes for different sprites. (That's what causes the Vortikids to sometimes move through solid blocks as if they're ghosts.) But when I looked at the extracted Keen 4 sprite list, the Dopefish seems to have a consistent hitbox size. The burping sprites have a slightly different size, but I would think that shouldn't matter because it doesn't check for solid tiles while doing that! :dopefish
Quillax Ship - Where you can download all of my cool, keen mods and super-marvelous fangames!
User avatar
Soul Monster
Vortininja
Posts: 223
Joined: Mon Jun 14, 2021 2:47
Location: An Arctic Hellscape

Re: Warp zone in Well of Wishes

Post by Soul Monster »

Quillax wrote: Wed Oct 20, 2021 3:03 Okay, that is just bizarre! :dopefish I've never heard of nor seen that glitch all in my life! Just to verify, were you running the original Keen 4? Not a modified version? It just seems so weird -- I would think something like that should be documented in KeenWiki by now. (Although we did discover a couple other glitches that haven't been documented, including the subject here, so...) The only explanation I can possibly think of is that the Dopefish has different hitbox sizes for different sprites. (That's what causes the Vortikids to sometimes move through solid blocks as if they're ghosts.) But when I looked at the extracted Keen 4 sprite list, the Dopefish seems to have a consistent hitbox size. The burping sprites have a slightly different size, but I would think that shouldn't matter because it doesn't check for solid tiles while doing that! :dopefish
Yes, this was the original, unaltered Keen 4 (Version 1.4). I'm still not entirely sure what caused it either, but if I had to guess, based on when it happened, it's possible something glitched in the save file I had. I'm not sure if I have that save game anymore, I didn't realize that it would be such a big deal at the time, but I remember what happened pretty vividly, so at least I can describe what happened.
Post Reply