Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: Zelda World Generator Project  (Read 7228 times)

Shoku

  • Bay Watcher
    • View Profile
Zelda World Generator Project
« on: April 27, 2011, 04:35:15 pm »

Old school and 2d because it's easier to screw up connectivity in 3 dimensions.

So basically this is me talking about how I plan to put the logic for this together. You probably don't have any reason to read it if you don't know a little bit about or have any interest in random map generators.

My concern:

I tend to realize I left something big out midway through these things but I don't think that will cut it here. I need to have the scope laid out up front.

First Analysis:

So in these games you can't just do a plain maze generation, except that you almost can. While a lot of the paths loops back on each other you've rarely got more than one real path you can go down to progress to the next boss. I can basically set it up like the Gaussian noise landscapes that make decent terrain. The maze is the lowest resolution step.

The games I remember so fondly would frequently have some tool or event open up a shorter path to go from where you were back to town so actually trying to place more detailed features literally on top of a simple maze won't work, I would have to contort the whole thing to get paths to cross over each other (or have it be 3d but that's just going to be a mess.)
No, it needs to be a middle layer on top of the abstract path of first dungeon, second dungeon, third...

The other failing of using basic maze generation is that the areas are rarely shaped like winding tunnels but rather have more of a hub and arm layout. The levels from the middle of the game onward are a strong mix of both (LttP's Ice Temple was my Water Temple before gamers griped about Water Temples- getting from point a to b without the puzzle's required conditions really does just throw you back to an earlier state demanding you navigate your way through it once again.)

So basically every junction in the game is a lock and key barrier, other than the linear path you're presented. Except that it isn't linear. The dungeons especially have junctions where you're given a choice of which door to unlock with those universal yet single use keys. This brings the danger of a choice where all of the player's keys have been used but the paths to the remaining keys all remain locked off. The cheap solution to this is to place a key behind every door but that isn't satisfying as the structure becomes too predictable.

The Actual way to do it:

The better way to do guarantee that things are solvable is to work backwards so that you're always placing the key to a door somewhere in front of it. Any time there is a new obstruction to that key the obstruction will have a key available somewhere reachable. You can't have an unlimited number of paths using the same key type all on the same hub like this but having more than six paths on a hub usually feels like bad design anyway. The largest rooms all have barriers down the middle that require solving some multistep puzzle to open up. This method also allows for safe generation of one way paths into new areas.

For the purpose of setting up the map all of the tools are just a multi-use key with a specific (or not so specific) lock they fit into. In the case of puzzles you couldn't have reached until you have the tool needed for them they really don't need any puzzle logic- they just fill up space so the player progresses through them much the same way as they would through an empty hallway. The problems with a series of empty hallways are that they present poor pacing, don't offer any mental reward, and don't continue to make the old tools feel valuable enough to keep carrying around.

So working backwards from the end to place every required object before the lock it opens gives the lowest component. Filling in space between these junctions with locks the player already has the keys for (old tool puzzles, mazes, or puzzles requiring no tool, or just fights with generic monsters,) and winding the path back to familiar locations so that it doesn't take too horribly long to get somewhere once all the doors are open provides the middle component.

The last layer to this random map generator is all of the one shot puzzles that fill the nooks and crannies with money or life fragments. These are all optional and don't consume exhaustible resources so they can go anywhere in any order.

Closing Thoughts:

I think this pretty much does it for the overall map. It will leave empty spaces at the "end" for the tools the player got at an earlier point in the game so at this point the npcs and enemy encounters can all just be blank boxes like that. Stages where the player actually has to deal with a specific npc to open some gate don't require any more fleshing out than that because it's not this has the mechanisms for exhaustible keys or any of those tools yet- it really just needs to place the rooms and their locked doors onto a grid.

Some of the more complex dungeon rooms and wilderness screens are really several "rooms" in the way I've been using that word so having a "screen" be a 5x5 area on the grid should make these kinds of things easy enough to put together without tangling up the logic to much. It would work about the same way as crossing the paths so that players go back to a town area after most dungeons except that the paths would remain distinct.

With all of this in place though it shouldn't be too unmanageable to fill it in. Games like Diablo just stitched together prefab set pieces so it shouldn't really be new ground to tread. Lot of work obviously but if I'm really not up to it I could hand the generator off to other people.

So I think that's everything it would take to get the structure of the world put together. This is fairly grandiose compared to the random level generators people usually make for games but can anyone see any particular roadblocks that would get in the way? Or anything important I've left out?
« Last Edit: April 27, 2011, 04:47:54 pm by Shoku »
Logged
Please get involved with my making worlds thread.

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: Zelda World Generator Project
« Reply #1 on: April 27, 2011, 04:37:48 pm »

Huge post, HUGE POST! Attention span insufficient! xP
Logged

Shoku

  • Bay Watcher
    • View Profile
Re: Zelda World Generator Project
« Reply #2 on: April 27, 2011, 04:41:55 pm »

Huge post, HUGE POST! Attention span insufficient! xP

Yeah ok, I guess I'll throw some headers into that so you can skim over things you know you don't care about.

Edit: Any better? I know I'm pretty long winded but that should help spare your delicate attention spans... maybe.
« Last Edit: April 27, 2011, 04:49:28 pm by Shoku »
Logged
Please get involved with my making worlds thread.

Enzo

  • Bay Watcher
    • View Profile
Re: Zelda World Generator Project
« Reply #3 on: April 27, 2011, 05:03:42 pm »

So, you're planning to make a procedurally generated Zelda-like?

I think I just peed a little.
Logged

Lord Dullard

  • Bay Watcher
  • Indubitably.
    • View Profile
    • Cult: Awakening of the Old Ones
Re: Zelda World Generator Project
« Reply #4 on: April 27, 2011, 05:06:08 pm »

This would indeed be quite cool. How do you plan on handling the overworld?
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: Zelda World Generator Project
« Reply #5 on: April 27, 2011, 05:11:33 pm »

Doing it backwards seems like a good way to go.  (Although it still sounds pretty hard).

I am imagining this:

1) Win Game
2) Defeat Final Boss
3) Get Key A(final dungeon) to open Boss Chamber
4) Get Key B(final dungeon) to get Key A(final dungeon)
5) Enter final dungeon
6) Use Magic trumpet access (final dungeon).
7) Get Magic trumpet from NPC A(After beating Boss A)
8) Defeat Boss A
9) IT JUST KEEPS GOING LIKE THIS.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

Shoku

  • Bay Watcher
    • View Profile
Re: Zelda World Generator Project
« Reply #6 on: April 27, 2011, 06:13:51 pm »

Well yeah, that's the general pattern. For OoT it was
Win
Defeat Final Boss
run out of collapsing tower (couple of forced fights and that I won't bother listing)
Defeat penultimate boss
Enter and climb central tower
Optional: Go to final great fairy pool for upgrade.
Unlock central tower via past dungeon themed paths (also get those gauntlets.)
Unlock final dungeon via rainbow bridge from having cleared all the world dungeons.
etc.

It would be really nice to be able to say beforehand if you wanted around five dungeons or more like fifteen littered about the overworld and some various parameters for how big they should generally be. If I got the whole thing put together in a really slick package you could play through one and say "I think this jungle themed dungeon should have been fire themed instead" and maybe make similar decisions to change particular rooms and so on then post the seeds and some kind of edit-list file for the touchups then post things to a forum.

-

The overworld is one large dungeon with a generally low threat level and instead of generic keys the gates are most often flat money charges in some form or other. You tend to have either larger rooms or more open ones frequently having entirely open edges. This is really why I bothered talking about maze generation at all; the overworld is where you see one way doors (like jumping down a ledge) that send you back to some significantly earlier location meaning a lot of backtracking if you leaped without looking.

I think the hardest thing to do in the overworld, procedurally, is having the townsfolk change as you trigger events at certain points in the progression. You could make sure they all had some "panic and run around" state for when you come back from a particular dungeon because "the great _____ is waking up, it is a disaster! We will all be killed by the ____ it was holding back!" or that sort of thing but there are a lot of different varieties of situations to try and decide before they happen. Oppressive situations require them to start out acting weakened and then probably celebrate after ("The well is working again!" "We got our food back from the bandits!" "The guards aren't beating us up anymore!") but I don't think a generic "celebrate" quite covers all of that, and it seems like every big shift in the townsfolk is going to be like this.

Actually thinking about making the dialouge work in so many situations seems even harder.


So overall I think the overworld might need to have a very limited list of scenarios to go through, though still having some mix and match where it's more manageable. Of course these games usually only had one or two events like that. You can tie just about any lock opening up to them though (the lumberjacks in LttP sawing through that tree after you clear a dungeon always stuck in my mind but there better examples in the kinds of doors and platforms that became available to you after doing this task or that in Majora's Mask.)

Things like the trading sequences shouldn't be too much of a problem. The thing that really stands out about them in every game is that the people you're trading with are either really weird to give you these items so unrelated to anything else or they have have something you've known you wanted for quite awhile but they're had some problem they can't find a solution for... until you come along with some strange item they wouldn't have expected you to have.

Whichever aspect of the overworld you were talking about was probably in there somewhere :3

-

I should probably mention I'm working on a boring contracted thing right now so I'm not going to be able to be able to push this project along that swiftly. Also no idea what I'd do for the music and art assets. Randomizing those would be too much and I don't know how you'd make them procedural in any sense of the word.

Edit: I would like more questions guys~
That kind of external stuff helps me flesh these things out a lot more thoroughly.
« Last Edit: April 27, 2011, 10:11:50 pm by Shoku »
Logged
Please get involved with my making worlds thread.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Zelda World Generator Project
« Reply #7 on: April 28, 2011, 09:39:50 am »

How about side-paths? Working back-to-front works for your main quest, but there might be a locked side-room containing optional monsters, a key (to make up for the one you lost) and some extra cash yay or something.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: Zelda World Generator Project
« Reply #8 on: April 28, 2011, 10:04:57 am »

You have a full inventory and have to put stuff there to progress. Or regress, as it might be the case.
Logged

Shoku

  • Bay Watcher
    • View Profile
Re: Zelda World Generator Project
« Reply #9 on: April 28, 2011, 11:36:24 am »

Actually I didn't think the games ever had those kinds of treasure rooms that you could end up stuck out of. There was always some other key out in the dungeon to find and the safeguard to that was just making it harder to get into the room so you'd probably use the key in more obvious rooms.

Even so this was very rare as you'd usually just bomb your way into those rooms.

E: though with seeds and replayability I guess there could be incomplete solutions and that so that you had to do a lot of things right to get a "good ending." I'd probably prefer to have some time themed dungeon where all the keys and doors reset when you left it or did some other trigger action.
« Last Edit: April 28, 2011, 03:53:04 pm by Shoku »
Logged
Please get involved with my making worlds thread.

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Zelda World Generator Project
« Reply #10 on: April 29, 2011, 02:24:38 am »

In Link's Awakening, there is one point where you have a single key and four locked doors. Behind three of them is a simple puzzle for a replacement key (one of which also contains a hint and thing to toggle the popup blocks). The other route leads to the rest of the level, but there is a spare key so that if you pick that path first, you can go back through the others.


Also, though this would apply more to a game like Metroid, what about sequence breaking? An alternate path through the levels that would require a re-usable "key" that represents knowledge of some technique (wall jumps, bomb arrows, etc.) rather than a physical collectible (though such an alternate path wouldn't work nearly as well in a game with limited-use keys...), designed for advanced players looking for a challenge...
Logged
Eh?
Eh!

Shoku

  • Bay Watcher
    • View Profile
Re: Zelda World Generator Project
« Reply #11 on: April 29, 2011, 04:29:44 am »

Well yeah, in practice you don't want to have many locked doors the player isn't required to unlock for normal progression. In cases where there are several of these optional doors it would awful to have a large number of keys all out in the central hub letting the player open up a huge portion of the important areas without having done any of the work.

Now, there is a very simple way to cheat through this: move the keys to wherever the player needs them. In most cases the contents of all of the currently accessible treasure chests in a dungeon could be shuffled without players catching on. This would mean handing out just enough keys to open all of the doors in the dungeon and handing out more bonus loot (such as those chests with 10 arrows in them) as paths with more chests were unlocked.

...I am not a fan of doing this sort of thing for the dungeons. It does seem acceptable as a smaller scale sort of puzzle though, such as in that particular scenario where the player is presented with 4 doors to unlock. If map and compass wouldn't conflict the very rooms themselves could be moved around to send the player through them in a set order, making the decision between doors a false decision. That is really at the heart of why I don't approve of that on a large scale but these games toy with the player like this in small scale fairly often, like all of those lost woods type puzzles where even Euclidean geometry sometimes breaks down.

-

I was watching the OoT speed run stream a few weeks (months?) back and he sequence broke like mad. He cleared the bosses all out of order and glitched the hell out of the maps to get to places along unintended routes.
...I can't say I can think of a good way to build sequence breaking into the generator. It will be hard enough to really get these things to fit together in the normal sequence but intentionally placing some kind of shortcut through it seems like it would take an entirely separate process and it would be harder still to place these kinds of points without them being so obvious. To steer novice players away from these special obstacles is probably not something I could make a generator do.

Letting these things be a bit more predictable the thing could just throw certain filler pieces with some exploitable feature into the world at random and then players could try and find alternate paths through the game but I don't know if random would be good enough for this.
Logged
Please get involved with my making worlds thread.

Neonivek

  • Bay Watcher
    • View Profile
Re: Zelda World Generator Project
« Reply #12 on: April 29, 2011, 11:24:30 am »

Guys incase you forgot the ACTUAL section divider of Zelda games were Items.

Specifically items required to access certain parts of the game.
Logged

Shoku

  • Bay Watcher
    • View Profile
Re: Zelda World Generator Project
« Reply #13 on: April 29, 2011, 01:25:35 pm »

I don't blame you for not reading but in the first part I called the items multi use keys. It's still important to make sure they are in front of all the locks puzzles that you can't get through without them. It wouldn't do to have the bow behind a small key door and have the only small key available require you to shoot one of those eyes on the wall with an arrow.
Logged
Please get involved with my making worlds thread.

Neonivek

  • Bay Watcher
    • View Profile
Re: Zelda World Generator Project
« Reply #14 on: April 29, 2011, 01:30:18 pm »

Yes but people keep seperating things by keys.

Very few things in Zelda were kept locked by keys outside the dungeon you needed the item to get into. (or rather, instead of keys you get inside the dungeon being relevant for that very dungeon)

The seperating sections of the Zelda world were item based not key based.

Actually... how many sections in Zelda were opened with a litteral key?
« Last Edit: April 29, 2011, 01:37:42 pm by Neonivek »
Logged
Pages: [1] 2 3