Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

Project Concept - Impossible Labyrinth

Recommended Posts

( cross-posted from ZDoom forums, also should be noted that this likely takes a development version of ZDoom to function )

Something I started on a while back but then burnt out pretty quickly.

The core concept is that you're given a random set of maps that represent a part of a larger map, each with a possible north, east, west, and south exit. Of course, how these maps connect is also randomly generated, creating a highly random map composed of set pieces.

I ran into two main problems:

  1. I couldn't figure out what sort of victory condition there should be.
  2. Even for maps that are just very small areas, making a bunch of unique places to fill up a 5x5 square and not have too many repeats between sessions is a bit ... much for a single person who's not much of a mapper.
Right now, the enemy generation is really, really basic and there's no such thing as item generation. Additionally, since there's only two maps, they repeat very often as well as the fact that they don't demonstrate that rooms are meant to save their state when you leave them ( since if they did, things would break within one or two transitions ). Overall, there's not much to look at.

But here's where I ask: who all has interest in this concept? Something like this is better the more content that's put into it, so I figured since the requirements for contributing isn't even an entire map ( although I'd certainly prefer that the example maps not actually be used as an example ) it really wouldn't be too much to see who all would be willing to chip-in. Maps aren't the only thing I'm interested in, either; discussion on ways to better handle the actor generation and what the overall goal of the player is is certainly more than welcome.

This is a concept I really like, and I hope it's the same for some others, too.

Share this post

Link to post

I would be interested in contributing to this. I would have to get a couple other things done first before I could start working on a map for this. What's the coding you use for the random map transitioning? I might be able to fix a few of the problems you mentioned.

Share this post

Link to post

Actually, the only problem with map transitions is because the maps aren't set to be in a hub. Once they are, they'll save their state. The issue with that currently, though, is since the labyrinth is composed of a bunch of the same maps, saving the state isn't exactly a smart idea because then exits won't changes, monsters won't be regenerated, etc..

So, yeah, it's an issue that's only because of the lack of content preventing me from enabling what would fix it.

Share this post

Link to post

Again, that's simply due to the lack of content. There's a false-deck system that's in the code but commented out that, when I tested displaying strictly the map numbers, worked perfectly fine. Of course, actually enabling it would not allow messing around with the current prototype state due to the lack of areas, so it'll have to wait should this actually get off the ground.

Share this post

Link to post

That's a bit of a vague question.

The basics are in the post and can be seen in the prototype: each map has four exits ( preferably walkthrough, and as a fade-to-absolute-darkness so it's extra clear it's an area transition ) in the cardinal directions, which get sealed depending on whether or not the labyrinth generated with that map having that exit.

The two maps you can see in the prototype have pretty clear indications of an exit being sealed, but thinking about it, it probably shouldn't be like that. Instead, the passage - either directly to the exit or to the section of the map containing the area - should probably be sealed in a way that it doesn't look suspicious at all. Instead of a door that doesn't open, it just looks like a normal wall.

Also, the two maps have a specific starting in case the map you're sent to is the first map of the labyrinth, but I'm not sure if I'm sticking to that style or not.

Actors should also be placed through the provided spawners ( doomednums 10000 - 10003 ) but right now only the standard monster spawner works and even then it's kind of really cruddy and unintelligent. You -can- directly place certain actors on the map, but that's not preferred as a map could be the safe starting room, the next room after, or deep within the labyrinth where the spawners are spawning monsters and items inappropriate to the group of zombiemen you just placed.

Style-wise, go nuts. Going from a city "room" to a hell room to a starbase room to an abstract room to back to a city "room" should be entirely possible, as it's not supposed to make any coherent sense. That said, intentionally shitty maps aren't what I'm aiming for, as it's supposed to be incoherent in a way that seems like reality was turned into a patchwork quilt.

Also, I use the term room and area interchangeability as the maps should really be designed in the sense that they're not entire maps, but just one area of a much larger one. That said, a single room really wouldn't be an appropriate submission, as the player shouldn't walk five feet and immediately find an exit because that's just kind of silly. Perhaps a good size for reference would be some of the shorter IWAD maps, where they're certainly not long in any sense of the word but it's still not a non-issue to make your way to the exit.

Format should probably be ZDoom in UDMF, ZDoom in Hexen is possible but there's seriously no reason to use that since the project requires advanced features anyway.

I can go into more detail about the specifics and how to use certain resources available to you, but I'd much rather gauge interest more, especially since a lot of those hooks for map developers just flat-out aren't there yet. With interest from others, though, I'd certainly try to implement them, especially if we can get some discussion on how the gameplay really should end up.

Share this post

Link to post

OKAY so I was very productive today and there are results. Notably, there's now an automapping minimap to help keep track of the labyrinth! And spawners actually exist and make some semblance of sense!

It's now capable of being mapped for, although the actual everything code-wise is hardly final. There's still no sort of victory condition, and there's no spawner for health, armor, or powerups, as I'm not sure if that should be spawned or not. Either way, here's a quick mapping reference:


#include "zcommon.acs"

global int 2:LabY;
global int 4:LabExit[];

global int 11:PlayerX;
global int 12:PlayerY;

script 1 OPEN
    int pos = (PlayerX * LabY) + PlayerY;

    if(!(LabExit[pos] & 1))
        Floor_MoveToValue(1, 1280, 128, FALSE);
    if(!(LabExit[pos] & 2))
        Floor_MoveToValue(2, 1280, 128, FALSE);
    if(!(LabExit[pos] & 4))
        Floor_MoveToValue(3, 1280, 128, FALSE);
    if(!(LabExit[pos] & 8))
        Floor_MoveToValue(4, 1280, 128, FALSE);
This is essentially the base amount of ACS you want in your map. All you should alter are the Floor_MoveToValue lines; you can replace them with whatever, but the explain what's going on:

Effectively, script 1 handles sealing unneeded exits. It checks first east ( 1 ), north ( 2 ), west ( 4 ), and then finally south ( 8 ) and does an action if that specific exit can't be accessed. Now, what action ( or actions ) occur when an exit is sealed is entirely up to you; just make sure the player can't reach an exit that shouldn't be access. Exits can't change after the labyrinth is generated, so don't worry about that.

Speaking of exits, to actually make them you just need a line with ACS_Execute that activates script 300 and has a first argument of 1 for east exit, 2 for north exit, 3 for west exit, and 4 for south exit. Then, you should place player starts for each exit, with a first argument of the exit the player would be entering from; thus, 1 for west exit, 2 for south exit, 3 for east exit, and 4 for north exit.

Also, each map should have a player start without any arguments; this is for when the player starts the labyrinth in that map.

Now, to actually clutter the map, you can use actor numbers 10000 - 10012 for monster spawn spots, 10020 for weapon spawn spots, and 10021 for ammo spawn spots. Each different monster spawn spot has different limitations for what monsters it can spawn, which are:
10000 - Spawns anything with a ranged attack Cacodemon size or smaller.
10001 - Spawns anything with a ranged attack Archvile size or smaller.
10002 - Spawns anything with a ranged attack Arachnotron size or smaller.
10003 - Spawns anything with a ranged attack.
10004 - Spawns anything with a melee attack.
10005 - Spawns monsters for ambushing, but not large ones.
10006 - Spawns monsters for ambushing.
10007 - Spawns monsters for long-range attacks, but not large ones.
10008 - Spawns monsters for long-range attacks.
10009 - Spawns boss monsters.
10010 - Spawns monsters with flight.
10011 - Spawns zombies that drop ammo.
10012 - Spawns weaker enemies.

A key part of the spawn spots is that their fifth argument is for marking them for groups. Monsters and weapons + ammo have separate groups; monster groups will try to spawn the same monster as the first monster spawned in the group, and weapon + ammo groups will try to spawn either the ammo of the weapon of the group, or spawn the same type of ammo if there's no weapon in the group. You can use these for hordes of the same enemy or to keep ammo consistent around a weapon.

Finally, here are some global variables not included in that ACS snippet above that can still be useful:

global int 5:LabDanger[]; - an array containing the "danger levels" of the labyrinth's rooms, effectively the same as the distance from the starting point
global int 6:LabStartX; - the X coordinate of the labyrinth's starting point
global int 7:LabStartY; - the Y coordinate of the labyrinth's starting point

There's still a lot of discussion I want to have with those interested, but if you just want to try making a map for this you can go ahead and use that to see how it goes.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this