QUESTION: Doors in Keen:Vorticons

Request patches for Keens 1-3.
Post Reply
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

QUESTION: Doors in Keen:Vorticons

Post by XkyRauh »

As I've mentioned a few times, my friend CheesyDave is working on a few mods on and off in his spare time--recently he showed me some of the progress he'd made on one of them, and it was very impressive. However, there was a small problem.

You see, Dave had increased the size of the Keen sprite a bit, and now the detection with doors is squirrelly. Currently his Keen sprite is about 20 pixels side-to-side. If Keen approaches a door from the left, heading toward the right, and he does not have the key, it's entirely possible to jump, pogo, and otherwise grind against the door and have Keen clip through it, popping quite far out on the other side.

I saw this problem and figured "Oh, his hit detection box must be too small, or changing in size, so that when the engine goes to push him back, his detection box is still in the wall" ... no such luck. We tried making Keen's collision box many different sizes--from 24 pixels wide down to 14 pixels wide. Sometimes we could get the door thing to be very difficult to do, but it was always possible.

And besides, if we made his collision box wider than 16 pixels, Keen would no longer be able to fit down one-block gaps in levels!

So my question is this: How exactly does the hit detection and pushing back with locked doors work? Pushing Keen off to the right seems considerably easier than keeping him from coming through the left.

Perhaps a simple patch to change the number of pixels Keen is bumped back?

--Xky
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Ah, I really wait to see the work of the mysterious Dave. :)
Dunno, probably it's just a matter of one number.
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

That's a toughie, as collisions with doors seem to be handled very differently to collisions with other blocks (you never bounce off other blocks, do you?).

I think the issue is that they are handling doors in a unique way. When I made the (as yet unfinished) "doors on map" patch, I changed the bit where it's looking at the tile's properties, and, if it was a door and you didn't have the key, then it would return the properties as if it were a solid tile. Something like this might be applicable for the ordinary doors.
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

re: solid doors

Post by XkyRauh »

Sure! That sounds wonderful. If you can get that implemented, Dave'd be much obliged. :-)

I wonder ~why~ the doors are handled so differently, though? Surely the If-Then solution Andy proposed would have been easy enough? :-\ Don't tell me there's some dark secrets to be found in the Keen:Vorticons coding..? *chuckles*

--Xky
Post Reply