Multi-stop Elevator with Single Exit

Discuss map ideas, techniques, and give help.
Post Reply
User avatar
Chocolateer
Born on Board
Posts: 34
Joined: Jul 4th '11, 20:28
Contact:

After some experimentation I came up with the following example for a multi-stop elevator (3 levels in this case, but could be extended for more). What makes this map unique is it only has a single exit, which works by having the polygon immediately outside the elevator move up and down via Lua to match the elevator's height. The elevator also has 3 switches inside, so the player can go directly to any floor.

The effect should be pretty transparent to the player (I even change the floor/ceiling textures to enhance the illusion), but it will only work for a solo map.

Note that I have doors isolating the elevator area on each level, and when the player opens the door it changes the height of the polygon outside the elevator to match the level the player is currently at. Also, polygon 37 doesn't have to be adjacent to the elevator; I'm just using it to add a brief delay before the elevator activates (I was originally going to use it to stop the elevator, like in a traditional multi-stop, but ended up doing this in the Lua code instead).

I left my debug messages enabled to help show what's going on behind the scenes using Lua. If you don't like it then comment out line 50 of the embedded lua script.

This is my first map embedded with a lua script. It ended up being more complicated than I was expecting, mostly because I cannot change the min/max heights of platforms with lua and ended up having to micro-manage the elevator doors as a result. The one thing I would change is the outside door to the elevator doesn't always close all the way because it is moving really fast when the player can't see it (I might look at fixing this later -- it could be fixed by reducing the speed to close it the rest of the way).

If anyone has comments or suggestions, let me know
Attachments
Multi_stop_Lua_v1.0.zip
(13.66 KiB) Downloaded 321 times
Except the inevitable
User avatar
thermoplyae
Mjolnir Mark IV
Posts: 735
Joined: Sep 10th '06, 17:35
Contact:

Very nice!

Could you explain why it doesn't play nicely with multiplayer? I skimmed the code briefly, but I don't see what's stopping you --- unless you mean something could go wrong if two players tried to call the elevator to different floors simultaneously.
dude, seriously. dude.
User avatar
Hopper
Mjolnir Mark IV
Posts: 585
Joined: May 10th '09, 17:02
Contact:

Neat; it's like an updated (and much, much prettier) version of Jason Harper's fake elevator. I love seeing creative ways to push the engine's boundaries. Terrific work!

Thermo: you don't want one player in the hub while another activates the elevator, or opens a hub door on a different level. It could probably work if you forced everyone into the elevator at once. Even in solo, the automap gives it away a bit, and corpses in the hub would ruin the illusion.
Aleph One:  Download 1.2.1         Plugins:  Vasara  ·  more
User avatar
thermoplyae
Mjolnir Mark IV
Posts: 735
Joined: Sep 10th '06, 17:35
Contact:

Oh, I see. I wasn't paying attention to the hub --- or to the annotations on the automap, or to the debug messages as I moved around in the outside world. "Polygon immediately outside the elevator" to me meant the thing the script calls the inner door. :)

Again, very cool!
dude, seriously. dude.
User avatar
brilliant
Mjolnir Mark IV
Posts: 371
Joined: Mar 10th '10, 20:06
Contact:

That was great! I would like to see that in a solo level or a net level so much!
"My advise: V" - g pack
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Chocolateer wrote:I cannot change the min/max heights of platforms with lua
Weird, I thought I had added this. Apparently not.
User avatar
Chocolateer
Born on Board
Posts: 34
Joined: Jul 4th '11, 20:28
Contact:

Treellama wrote:Weird, I thought I had added this. Apparently not.
I suppose it would have been more accurate for me to say I assume I cannot change the min/max heights of a platform with lua since it is not in the documentation [MTongue] . Just now I tried reading the value of .min, .minimum, .min_height, and .minimum_height of a platform, and they all came back nil, so I'd say it is a pretty good assumption that it currently is not possible.


One other technical hurdle I encountered that I probably should mention is that one of the walls on the hub was not solid during my initial testing. I originally had the hub starting with a floor height of 0 (lowest level), and when the hub was moved up to the second or third level the player could walk through the line connecting to the lowest level even though the floor/ceiling was different and the wall was textured (obviously the engine wasn't designed to handle dynamically changing polygon floor/ceiling heights). The simple solution was to start with the hub lower than the other levels and have it moved up to the correct level when the player opens an access door. This seemed to fix the problem. The consequence of this is that the player's starting position can't be in the hub. You might be able to get away with changing the height of the hub in the init trigger, but I haven't tested it.
Except the inevitable
User avatar
quartz
Cyborg
Posts: 283
Joined: May 19th '11, 10:21
Contact:

rather than messing with manipulating poly heights, why don't you just use lua to reposition the player(s) to another poly directly? you can basically copy/paste the xyz coords, so as long as the rooms look the same and are stacked vertically you can't tell.
User avatar
Chocolateer
Born on Board
Posts: 34
Joined: Jul 4th '11, 20:28
Contact:

quartz wrote:rather than messing with manipulating poly heights, why don't you just use lua to reposition the player(s) to another poly directly? you can basically copy/paste the xyz coords, so as long as the rooms look the same and are stacked vertically you can't tell.
I take it you haven't actually looked at the example map I posted then? My elevator is not an enclosed box that the player enters at one level and leaves on another, but has a window overlooking an area below to show that the player actually is in an elevator that moves up and down. With what you are proposing, you'd also need to duplicate those outside polys for each level the elevator stops at. Any aliens/corpses in the outside area would ruin the effect.

Another thing I don't like about your proposed reposition trick is that the complexity increases for every level you add to the elevator, whereas in my example it is almost trivial to add extra levels with a slight change to the lua code. You'd just have to find a way to get extra switches inside the elevator and break the hub up into multiple polygons.

I haven't tried what you are proposing, but I suspect it may sound odd having 3 (or more) platforms overlapping each other in 5-D space activating and deactivating at the same time. I suppose you could get around this by making all but one of the platforms silent.

The biggest problem with my example is (as Hopper pointed out) corpses in the hub, which would be visible at every level. Your proposed solution instead makes corpses in the elevator a problem. At least in my example the problem is a bit more subtle, where the elevator door conceals the corpses, and when it opens again on a different level an observant player might notice they are the same. Your approach, however, would have the corpses vanish/reappear right before the player's eyes as they are repositioned into the alternate poly.


You did give me the idea that it could be interesting to try repositioning corpses between the hub and a separate poly not visible to the player depending on the level it's it. Looking at the lua documentation, I'm not sure if it is possible to reposition corpses. I don't know how corpses are handled, but unless they are a monster, scenery or effect then it probably isn't possible.
Except the inevitable
User avatar
Zott
Vidmaster
Posts: 1666
Joined: Jul 1st '06, 21:14
Location: Earth
Contact:

You could crush the corpses in the hub couldn't you to remove them? (Floor to Roof) You'd just have to make it clear to the player why the corpses are being crushed before they enter the hub and then the elevator.
Video Gamer Blog (With some articles by me!)

Look at Him Go, Weeee
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Chocolateer wrote:You did give me the idea that it could be interesting to try repositioning corpses between the hub and a separate poly not visible to the player depending on the level it's it. Looking at the lua documentation, I'm not sure if it is possible to reposition corpses. I don't know how corpses are handled, but unless they are a monster, scenery or effect then it probably isn't possible.
Corpses are "garbage"; Lua currently cannot manipulate them.
User avatar
Chocolateer
Born on Board
Posts: 34
Joined: Jul 4th '11, 20:28
Contact:

Zott wrote:You could crush the corpses in the hub couldn't you to remove them? (Floor to Roof) You'd just have to make it clear to the player why the corpses are being crushed before they enter the hub and then the elevator.
I may be misunderstanding what you are saying, but I don't think it works that way?

Treellama wrote:Corpses are "garbage"; Lua currently cannot manipulate them.
Thanks for the info. Not a big deal as I can certainly live without that functionality
Except the inevitable
User avatar
quartz
Cyborg
Posts: 283
Joined: May 19th '11, 10:21
Contact:

Chocolateer wrote:I take it you haven't actually looked at the example map I posted then?
no, I just thought I toss in my two cents.
Chocolateer wrote:My elevator is not an enclosed box that the player enters at one level and leaves on another, but has a window overlooking an area below to show that the player actually is in an elevator that moves up and down. With what you are proposing, you'd also need to duplicate those outside polys for each level the elevator stops at. Any aliens/corpses in the outside area would ruin the effect.
not really. not unless you're also trying for multiple windows on the same vertical wall.

- have the "floor" with the window be a real floor, let's say it's the 2nd floor. the elevator can go up and down from there.
- when it stops at a higher or lower floor, reposition the player to an identical looking room in 5d space.
- if they leave and come back, reposition them on-button-press back to the real platform, which then starts moving to the other floor.

Chocolateer wrote:Another thing I don't like about your proposed reposition trick is that the complexity increases for every level you add to the elevator
maybe? I'll be honest and say I didn't exactly flesh it out totally, but I'm imagining only one room that's actually a platform, and all the rest are just dumb normal polys connected to each floor. when you walk in and press the switch, lua just bips you to the corresponding poly and off you go (counting riding the elevator up and down of course).

Chocolateer wrote:I haven't tried what you are proposing, but I suspect it may sound odd having 3 (or more) platforms overlapping each other in 5-D space activating and deactivating at the same time. I suppose you could get around this by making all but one of the platforms silent.
well, there'd only be one platform. all the other rooms would be normal polys except for the top one *maybe* to make sure it's red on the map. and that platform doesn't ever have to move.
Chocolateer wrote:The biggest problem with my example is (as Hopper pointed out) corpses in the hub, which would be visible at every level. Your proposed solution instead makes corpses in the elevator a problem.
yes, but it's a lot easier to contain that. if you make a short hallway outside the door on each floor and have it be monster impassible then it's a lot harder to get aliens into the elevator in the first place. this becomes basically impossible if you also don't have any rocket launchers, but even then you can jut put a right angle or something in the hallway to stop them sliding in.
Chocolateer wrote:At least in my example the problem is a bit more subtle,
I think mis-positioned corpses are pretty obvious no matter what, unless you flood the whole place with enemies. especially when you're dealing with something like this multi elevator trick, people will be on the watch to figure out how you did it.
User avatar
Zott
Vidmaster
Posts: 1666
Joined: Jul 1st '06, 21:14
Location: Earth
Contact:

This shows what I meant by disappearing corpses. You could use this to remove the corpses on all levels of the platform that would show differences in body count. Of course since it is obvious, you'd have to make a reason why the place is being cleared. (Or just use non-corpse-leaving enemies)[attachment=4987:Marathon_Corpse.wmv]
Attachments

[The extension wmv has been deactivated and can no longer be displayed.]

Video Gamer Blog (With some articles by me!)

Look at Him Go, Weeee
User avatar
Chocolateer
Born on Board
Posts: 34
Joined: Jul 4th '11, 20:28
Contact:

quartz wrote:not really. not unless you're also trying for multiple windows on the same vertical wall.

- have the "floor" with the window be a real floor, let's say it's the 2nd floor. the elevator can go up and down from there.
- when it stops at a higher or lower floor, reposition the player to an identical looking room in 5d space.
- if they leave and come back, reposition them on-button-press back to the real platform, which then starts moving to the other floor.
No. That's not the effect I'm going for at all. Please actually look at the example I posted, as I cannot do it justice with text.
quartz wrote:...I'm imagining only one room that's actually a platform, and all the rest are just dumb normal polys connected to each floor... there'd only be one platform. all the other rooms would be normal polys except for the top one *maybe* to make sure it's red on the map. and that platform doesn't ever have to move.
If the elevator doesn't actually move up and down, then it really is no different from Jason Harper's fake elevator trick referenced by Hopper. Personally, I never found that to be very satisfying as it doesn't actually feel like being in an elevator. Granted, your method is a better way to implement that fake elevator.
quartz wrote:yes, but it's a lot easier to contain that. if you make a short hallway outside the door on each floor and have it be monster impassible then it's a lot harder to get aliens into the elevator in the first place. this becomes basically impossible if you also don't have any rocket launchers, but even then you can jut put a right angle or something in the hallway to stop them sliding in.
I personally wouldn't want to make the elevator monster impassible, but maybe that's just me.
Except the inevitable
User avatar
Chocolateer
Born on Board
Posts: 34
Joined: Jul 4th '11, 20:28
Contact:

Zott wrote:This shows what I meant by disappearing corpses. You could use this to remove the corpses on all levels of the platform that would show differences in body count. Of course since it is obvious, you'd have to make a reason why the place is being cleared. (Or just use non-corpse-leaving enemies)[attachment=4987:Marathon_Corpse.wmv]
Huh, so apparently it does work that way. I have to look into this further to see if the poly doing the crushing needs to be a platform or if it can be a normal poly with adjusted floor/ceiling height. If it has to be a platform it could make things complicated (especially without the ability to manipulate min/max heights via lua), but should be doable regardless.

I don't think explanations would be necessary for the clearing. The player isn't ever going to see the corpses getting crushed (in my example it would happen in the hub while the elevator is moving or when the player opens an access door). The corpses simply would have disappeared when the player returns to a given level, which most likely isn't going to be right away.

It just occurred to me that the corpses could also be hidden with the use of a liquid in the hub. Still, the liquid would need to be present at every level of the hub, which probably wouldn't fit in with the level design for most cases.
Except the inevitable
Post Reply