Trapdoors, Linked Portals and Grabbing Tentacles
A couple of months ago I had tried to add trapdoors that would move the player (or other victim) to a lower level. I didn't think that trapdoors should just drop you onto a random cell, I wanted them to take you to a consistent location, so that if you went through a trapdoor multiple times, you knew just where you would end up. Another thing I was concerned about was that a trapdoor should not place the player in a room behind a locked door, where they might be permanently trapped. A trapdoor should only take you to a generally accessible area.
So I added a variable to the portal struct to identify the number of the portal on the destination side where it was linked. However, this was still not enough to resolve the issue, since portals were being added to connect to other levels that had not yet been generated, so there was nothing to link them to. To solve this, I created a separate linking method. When a level is generated and portals are first added, those portals are considered to be "unlinked". Later, when the player travels from one level to another, the game checks both levels for any unlinked portals and then matches them up. In this way, I can now have 1, 2, 3, 7 or as many staircases I want going between levels. This system still depends on the number of connections between levels being planned out ahead of level generation so that each level generates the right number of up staircases and down staircases.
Still, I didn't want to have to preplan how many trapdoors a level had before the level was generated. To do this, I decided that when each level is generated, it should determine and save 4 portals as potential trapdoor destinations (making 4 the maximum number of trapdoors that can appear on one level). When two levels are linked, the trapdoors will match up with these trapdoor destinations, but if there aren't enough trapdoors, then they just aren't used.
Now I have lots of avenues to travel between levels, running up and down stairs and falling through trapdoors. But I still haven't resolved the issue of monsters falling through trapdoors, who at this time just hover in midair when a trapdoor opens beneath them. When a player moves from one level to another through a trapdoor, the destination level is either generated or loaded from memory, but I don't want to do either one every time a monster goes through a trapdoor. What I plan is to make a separate monster holding facility, where monsters are copied when they pass through portals to levels that aren't currently in memory. Once the player travels to that destination level, the monster can then be placed.
Anyway, once I had my portals figured out, I decided to add a scary new monster for funsies. I wanted something that was immobile, but could grab players with its tentacles and pull them close to bite 'em. Then I realized there was already a monster just like this from D&D called "the roper", so I've got ropers now. They also inherited an ability I had previously developed for rock lizards, allowing them to appear just like columns of stone before they attack.
Oh yeah, and I think I finally settled on a font I like to represent this ascii game, thanks to a post someone put up on this subreddit a couple of weeks ago.
Files
Get Sunlorn
Sunlorn
Open world and cave exploration game.
Status | In development |
Author | Tesselation9000 |
Genre | Adventure |
Tags | Roguelike |
More posts
- Ripping out Brains, Madness and Fear1 day ago
- New Nations, Rumours and Maps13 days ago
- Sewers, Force Fields and Freezing Vapour13 days ago
- Mud, Artillery and Ruined Cities68 days ago
- Raising the Tile Ceiling, Ice Walls and Magic Fountains68 days ago
- Robbers, Mazes and PortcullisesJan 03, 2025
- Illusions, Camouflage and Monster RelationsDec 27, 2024
- Monsters Using Items, Scrolls and DebuggingDec 27, 2024
- Monster Camouflage and Divination SpellsDec 27, 2024
Leave a comment
Log in with itch.io to leave a comment.