PATCH (beta): Doors in the map level

Completed patches for Keen1.
Post Reply
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

PATCH (beta): Doors in the map level

Post by adurdin »

Here's an initial beta for having "door" tiles on the map. If a tile on the map is set (in the tileinfo) to be solid on all sides, and it's set as one of the four door behaviours, then Keen will be able to walk through it if he's got the appropriate keycard. (If it's not set as solid one any side, Keen will be able to walk through that side without a keycard -- so you can make a door which he can only enter with a keycard, but can exit anytime).

In this beta, the door does not disappear, nor does it "take away" his keycard (as a door in the level will). But I could make it do one of these instead if it was desirable, or if it would make level design easier. I could also change it so that it checked the "goal items" instead of keycards, if that was preferable.

I've combined this with the teleport-within-level patch, as it left plenty of spare code room, and I thought they could work well together. But if this is very undesirable, I might be able to find 39 code bytes elsewhere...

Code: Select all

%ext ck1
%version 1.31

# Change the teleporter so it works within the level
%patch $8919                           $89 $F0 $F7 $2E $08 $6C $01
   $F8 $D1 $E0 $C4 $1E $4C $6C $01 $C3 $26 $8B $17 $B1 $04 $31 $C0
   $A3 $DE $6E $A3 $E0 $6E $A3 $E2 $6E $A3 $E4 $6E $88 $F0 $98 $01
   $F0 $D3 $E0 $A3 $E3 $6E $88 $D0 $98 $01 $F8 $D3 $E0 $A3 $DF $6E
   $8B $16 $DE $6E $A1 $E0 $6E $81 $C2 $00 $70 $15 $FF $FF $89 $16
   $D0 $6E $A3 $D2 $6E $8B $16 $E2 $6E $A1 $E4 $6E $81 $C2 $00 $B0
   $15 $FF $FF $89 $16 $D4 $6E $A3 $D6 $6E $C3
%patch $4572  $E8 $A4 $43 $EB $13 $90

# Our map-door-checking function
%patch $897B                                   $3D $00 $00 $9F $88
   $E0 $8B $9F $6E $05 $83 $EB $02 $7C $0F $83 $FB $03 $7F $0A $D1
   $E3 $83 $BF $9E $AA $01 $9F $08 $C4 $9E $74 $05 $58 $05 $1A $00
   $50 $C3

# Call the map-door-checking function from appropriate spots
%patch $A71B  $8B $87 $34 $0A $E8 $59 $E2
%patch $A808  $8B $87 $C0 $13 $E8 $6C $E1
%patch $A933  $8B $87 $86 $18 $E8 $41 $E0
%patch $AA20  $8B $87 $FA $0E $E8 $54 $DF

%end
If you try it out, please give me feedback on how it works, and how you'd like it to work.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Wow, soon iD starts to think you have managed to get their Keen source code somehow. :P
I bet Spleen will be excited.
Yowza
Posts: 153
Joined: Tue Sep 02, 2003 11:21 am

Post by Yowza »

*Drool*

It would be nice to see the doors opening from goal items though... Would help alot in CKCM1, where we need to have goal items to pass the slugs..
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

It would be nice to see the doors opening from goal items though... Would help alot in CKCM1, where we need to have goal items to pass the slugs..
Agree.. But this is pretty big step in to future of Keen modding.
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Dialithic!!

Post by CommanderSpleen »

I bet Spleen will be excited.
You have no idea! My initial verbal response just now was something to the effect of 'Holy f**k yes!'

This is going to absolutely insanely rock!

This is worthy of a new word...

Dialithic adj. Really cool, comparible in proportion to Andrew Durdin's enduring Keen patch efforts; or if in reference to aforementioned efforts, comparible to the immense non-lathargia-inducement of a sudden release of Keen 7+

This is so dialithic!

Your efforts will be put to very, very, very, very insanely non-halfulous use!
It would be nice to see the doors opening from goal items though... Would help alot in CKCM1, where we need to have goal items to pass the slugs..
I have so gotta mop this floor up later if I plan to party here on the weekend. Might have to cancel said party due to 'Uncontrollable Keen-patch-madness-induced drool'.

This gives us so much more freedom. Especially with the Community Mod, as Yowza says.
In this beta, the door does not disappear, nor does it "take away" his keycard (as a door in the level will). But I could make it do one of these instead if it was desirable, or if it would make level design easier. I could also change it so that it checked the "goal items" instead of keycards, if that was preferable.
I'm not sure which way would be best here... it would be good to see doors that require a keycard, but it would also be good to have doors that simply require Keen to have found a particular item that he needs to pass the game before passing... though the second one eliminates 'bonus' map areas (ie. areas that are only accessible through an item not crucial to the completionof the game)... unless a gateway level is used with a door inside it...

Unless both can be done, I say go with the goal items plan. The original patch will still be available anyway, requiring a keycard, so we still have flexibility.

As for removing the keycard after Keen goes through, I say implement--then many doors can be created on the map requiring only one keycard. Otherwise, we're limited to four.

On another note...
I could possibly make patches to support 8 keycards, and 8 items to collect (see: Key cards)
In combination with this, map-level-only cards (though usable within levels) can be worked in. Among many other benefits. (Perhaps I should post a short article proposing various ideas using this, if the patch comes into existence.)

I can see it now... four keys for use within the level, and four varying items designed for use in passing various obstacles on the map itself.

Man... it's amazing what can happen in just over a month... when I rocked up we were still speculating changing Keen's shot height, and much seemed off limits... now, we've pushed the envelope further and further and we're on the verge of recreating the Keen4 atmosphere and functionality within Keen1! Wow.

This is truly a great time to be alive!

>Commander Spleen[/i]
Yowza
Posts: 153
Joined: Tue Sep 02, 2003 11:21 am

Post by Yowza »

Hmm... Yes... Dialithic :D


For the CKCM, it's probably good that the door doesn't disappear (since we don't really want the bridge disappearing when Keen goes over it...), although I'm sure some people would need it to disappear for their mod..

So, if you made a door that opens when you have a certain goal item.. Would that create a new type of door tile? Or would it have to write over one of the already existing four door tile types (which would leave you with only three doors to use).
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

It'd be another tile, but set with the same type ("Door 1" etc) in TileInfo. So you'd have four door tiles (actually pairs of tiles) for use in the level, and another four for use on the map.

There is a very big complication in having the door disappear: the status of every door on the map must somehow be saved when the user saves, then continues a game. This would only be possible if the number of doors on the map were limited to about four, and even then it is significantly more complicated.
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Conflict...

Post by CommanderSpleen »

I'm planning to use the teleporter that sends Keen back to position three on the map, but I'm also planning to use the map doors patch. And the two combined (ie. map doors without in-level teleporters) cause the game to completely hang when Keen jumps into the in-level teleporter. Is there anything that can be done to fix it?

If I can't work in a solution before 3:33am (about six hours away, when I plan to wind up development), I'll sacrifice one of the ideas for the CK:MB demo.

What I'm trying to do is make a bonus level that Keen can keep coming back to in order to earn a new life or two without having to complete the level itself. I may just give Keen a number of options as to which way he wants to die in order to exit the level... or I could go without the map doors, but I really want to include them in this release.

So if the patch can't be fixed, I'll work something out.

>Commander Spleen
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

Six hours? Well, I'm afraid there's not much chance of that. However, I'll see what I can do when I've knocked over some other things I need to do this evening. I wouldn't hope for it for the demo, though.
You know the status screen patch? That will leave enough room for me to fit the map doors patch in. Otherwise, I don't know where it could go...
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen »

No problem if it can't be done for the time being. It's just an idea I've been messing with to give players a chance to cool down after some particularly gruesome defeats.

The fact it can be done is enough for the moment... at least I can include the properly constructed bonus level(s) in the full release.

>Commander Spleen[/i]
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

re: Patching via patch

Post by XkyRauh »

*Grins* Oh sure, just include the Status.ck1 patch, freeing up some bytes at a new address... and then use those free bytes to call in data from another newer file, called MapTele.ck1 or something... Heck, just outsource the entire game to original.ck1! *Laughs* The possibilities are endless.

Or not--I suspect that the ol' conventional memory limit will kill us eventually (happened to some people with the Wowbagger mod).

--Xky
Ilsoap
Posts: 197
Joined: Tue Sep 02, 2003 4:04 am
Location: Canada
Contact:

Post by Ilsoap »

That's just cause Britney Spears was gigantic in that mod... and it wasn't really necessary in the first place.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Well, I can't run even xtra's 3rd mod.. :(
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Do what I did, edit the sprite and shrink it a bit. (Looks slightly funny, but thats still britney.)
Post Reply