An all-level-connecting Stairway

Talk about anything Legend of Grimrock 1 related here.
User avatar
Drax
Posts: 249
Joined: Fri Apr 13, 2012 2:27 am

Re: An all-level-connecting Stairway

Post by Drax »

UncleSporky wrote: Perhaps in a new dungeon of your own creation, but I highly doubt it'd be possible with the existing dungeon. Where would you put them? The maps seem limited to 32x32 and most spaces are occupied on one floor or another, and the fact that not all floors are fully connected with themselves makes it hardly useful. Half the time you'd be connecting to pits from the floor above and not the main floor area.

For example, you could say you're going to put the stairs in the lower right hand corner of all maps. That would connect to...
SpoilerShow
A random room a third of the way through floor 1, the skeleton ambush room on floor 2, a spider room on floor 3, halfway through Trails of Thought on floor 4, the pits under Trails of Thought on floor 5, some small rooms you warp to on floor 6...and then you'd break right into the middle of existing rooms on floor 7. Tunnels on 8, take a chunk out of the Pillared Hallway on 9, a chunk out of tunnels on 10, the middle of the Fighter's Challenge on 11...Prison and Cemetary would be fine, though. :P
They'd go in different places on different levels (the winding stairs). You don't need a lot of space, roughly 5 tiles per map which, even on the busiest map (4, I think), has plenty of places. I'm presuming the levels are situated on an empty plane (which is why it's easy to put in another part of it not connected to the whole). So if you noclipped through, you'd be in empty space. If they are, after that it's just adding in tiles & connecting it all up. The ability to connect floors is already in game, you use it every time you go up/down stairs.

This, again, is all working under the presumption the mod tools will have a decent amount of depth.
User avatar
Minax
Posts: 36
Joined: Wed Apr 11, 2012 11:35 am
Location: Austria

Re: An all-level-connecting Stairway

Post by Minax »

Since I like going back through areas I've already been to I probably wouldn't use the stairs much, but I can see how they can be useful to people who'd rather not run through 6 floors of the dungeon again just because they forgot to pick up an item at the entrance. :P

A possibility to circumvent the dungeon layout issue when using the staircase idea would be to use a teleporter room instead. A central room with teleporters to every level, teleporters locked behind doors. Just need to add a key and a teleporter on every floor that leads to the "central teleporter room".
"Oh what secrets we could tell if you'd listen and be still
Rid the stink and the noise from our skirts
But you haven't got the clue and perhaps you never will
Mute we stand on the cold plains of Wiltshire "
UncleSporky
Posts: 17
Joined: Fri Apr 13, 2012 2:28 am

Re: An all-level-connecting Stairway

Post by UncleSporky »

Drax wrote:They'd go in different places on different levels (the winding stairs). You don't need a lot of space, roughly 5 tiles per map which, even on the busiest map (4, I think), has plenty of places. I'm presuming the levels are situated on an empty plane (which is why it's easy to put in another part of it not connected to the whole). So if you noclipped through, you'd be in empty space. If they are, after that it's just adding in tiles & connecting it all up. The ability to connect floors is already in game, you use it every time you go up/down stairs.

This, again, is all working under the presumption the mod tools will have a decent amount of depth.
Hmm, my assumption was that all stairs had to lead directly to the same location on the floor below, but perhaps they don't have to.

And actually, we know teleporters work between floors...that would be even easier.

At the start of every floor, a teleporter that leads to a big room with teleporters to the start of every other floor. All gated at first, but gradually opened as you proceed. Then there's no walking up and down stairs to get to where you want to go.
User avatar
Drax
Posts: 249
Joined: Fri Apr 13, 2012 2:27 am

Re: An all-level-connecting Stairway

Post by Drax »

Minax wrote:
A possibility to circumvent the dungeon layout issue when using the staircase idea would be to use a teleporter room instead. A central room with teleporters to every level, teleporters locked behind doors. Just need to add a key and a teleporter on every floor that leads to the "central teleporter room".
I'd already considered that. Let's pretend levels 1, level 2 and level 3. You need a door and stairs on 1 that connect to 2. You need a door and two stairs on 2, connecting to 1 and 3.

Now to stop you just cheating and using the stairs to bypass end of levels (straight from 2 to 3 for example), I'd have the stairs from 2 to 3 only opening when you gain access to 3 naturally. And the door on level 3 (with the stairs connecting 2 and 4) only opening when you pull a lever on 3 (so you physically have to have been there to use the shortcut back).

There's some other considerations to take into account like (spoilers):
SpoilerShow
When you get trapped on 6 for awhile
but that's the basic gist.

As for a teleporter room. Doable just as easily. I just don't like it in concept though might include it as an option if I were making the mod public
User avatar
takis76
Posts: 78
Joined: Wed Apr 04, 2012 4:01 pm
Location: Athens - Greece

Re: An all-level-connecting Stairway

Post by takis76 »

A nice idea could be teleporter room and you can register destinations in the teleport (Like checkpoints) and then you can transport to a level you have register or activated in the teleporter (Like teleport device on the wall , hmmm nice idea for my own Eye of the Beholder) Dungeon master have some special pads you could able to teleport.

Also some spiral staircase which occupies only 9 squares and you can access all levels , but you have to have a special level key to unclock the level door , because if the doors are open you will able to go to the final level fast.
User avatar
Drax
Posts: 249
Joined: Fri Apr 13, 2012 2:27 am

Re: An all-level-connecting Stairway

Post by Drax »

takis76 wrote:A nice idea could be teleporter room and you can register destinations in the teleport (Like checkpoints) and then you can transport to a level you have register or activated in the teleporter (Like teleport device on the wall , hmmm nice idea for my own Eye of the Beholder) Dungeon master have some special pads you could able to teleport.
I obviously haven't had a chance to look at the coding behind floor to floor movement, but I have a feeling floors can't makes changes on other floors within the game. So any teleportation would need to be written statically as a mod (rather than dynamically ingame).
hapro
Posts: 34
Joined: Tue Mar 27, 2012 6:24 pm

Re: An all-level-connecting Stairway

Post by hapro »

Well, the obvious fix would be allowing teleportation between crystals that you have touched.
cardman
Posts: 25
Joined: Wed Apr 11, 2012 2:44 am

Re: An all-level-connecting Stairway

Post by cardman »

best thing i reckon would be a couple of teleporters

Find a scroll or something to activate them where u want them (say 2 max)
and that way u could drop one next to a reliable food source and another on the later levels to get u back and forth.
User avatar
takis76
Posts: 78
Joined: Wed Apr 04, 2012 4:01 pm
Location: Athens - Greece

Re: An all-level-connecting Stairway

Post by takis76 »

I obviously haven't had a chance to look at the coding behind floor to floor movement, but I have a feeling floors can't makes changes on other floors within the game. So any teleportation would need to be written statically as a mod (rather than dynamically ingame).
Yes this could be a change to the engine.
If you look in the blog , somewhere in old posts , if you go back to september of 2011 blog entry to "Building the dungeon part 1 and 2" , Petri explains how the dungeons was created and use LUA Script library in the engine , so with LUA you can write any kind of script and you can create your own mechanics. (If will accepted by engine).

In programming the coding behind floor to floor movement is a 4 dimentional array in c++ and initialized like this (The Idea of my engine)

Code: Select all

char *floors[13][32][32][4];
In my game I initialize my floors with PureBasic with this floor the code is similar to c++

Code: Select all

 Dim levels[50][32][32][4] as string
This means 50 are the tolal floors , 32 are the horizontal squares , 32 are the vertical squares , 4 are the sides of each wall.

If I want to make a stairs mechanism I am creating one struct with name stairs.

The c++ struct code is like this in my engine

Code: Select all

struct {

   int x;
   int y;
   int direction;
   int destination_direction;
   int destination_level;
   int destination_x;
   int destination_y;

} my_stairs[50][100];
If you have a staircase in the level 1 at position x=6 and y=7 and you need to go to level 2 at position 3.3 you write this kind of code for my engine might will be similar to dungeon crawler engine.

Code: Select all

//setting one stair at position 6,7 on level 1 and goes to level 2 at position 3,3
my_stairs[1][1].x=6;
my_stairs[1][1].y=7;
my_stairs[1][1].destination_direction=1;
my_stairs[1][1].destination_level=2;
my_stairs[1][1].destination_x=3;
my_stairs[1][1].destination_y=3;
The array in my_stairs[50][100] means , my dungeons are deep 50 floors and each floor I can put 100 stairs.
So the first stairs on the level 1 , have potition 6,7 on the level 1 and the destination is level 2 at potion 3,3 on the map and faces to the north when you exit the stair.

The players are a structure as party in my engine

Code: Select all

struct {
   int x;
   int y;
   int direction;
   int level;
} party;
And check if the party is entering in my stairs.

Code: Select all

if (party.x==stairs[party.level][1].x && party.y==stairs[party.level][1].y)
{
//changing level and position on the map
party.x=stairs[party.level][1].destination_x;
party.y=stairs[party.level][1].destination_y;
party.level=stairs[party.level][1].destination_level;
party.direction=stairs[party.level][1].destination_direction;
}
The above code check in the party entered in the stair number 1 only for any level.
Very technical but the mechanism works similar to this , behind the scenes when you are entering in some stair. (For my engine)
Sabin Stargem
Posts: 4
Joined: Sun Apr 15, 2012 3:54 am

Re: An all-level-connecting Stairway

Post by Sabin Stargem »

It would be nice if you could use a Magic Map on a crystal to warp to other crystals you have encountered in the past. That would certainly save a bit on the backtracking.
Post Reply