News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Infinite Hyrule - Legend of Zelda Overworld Randomizer [Released!]  (Read 4341 times)

ifightdragons

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #20 on: October 06, 2020, 04:25:55 pm »
No need to restrain yourself. Contact me here or here, we'll discuss how make more than 256 columns.

As a big Zelda fan, I'm grateful you've been participating in the Zelda threads lately. The more skillful people working on these projects, the better.

gzip

  • RHDN Patreon Supporter!
  • Jr. Member
  • *****
  • Posts: 49
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #21 on: October 06, 2020, 06:21:16 pm »
This is looking pretty cool! Here are a few suggestions after trying it out:

  • Make the result compatible with ZeldaTech. Currently the resulting file is just a garbled mess when opening it there. I would highly encourage you to consider this when trying to solve your column dilemma as well. This tool is of limited use if we can't leverage it alongside other well established tools. Don't relegate it to novelty use.
  • Make the icons in the upper left corner of each screen bigger. It's hard to make out what a lot of them are.
  • In the full map view, allow the user to exchange any given column for a different column. Also allow an option to replace all columns of this type (which could help to manually resolve column issues).
  • In the columns view allow the user to click a column and then open up the map view with that column highlighted.
  • For level locations make the levels progressively farther from the start screen.

May I suggest that you look at this tool as a starting point for any given Zelda hack which would then be further modified with other tools and/or by hand. Maybe give the user more options to resolve column problems themselves (like 3 and 4 above). It would be a first if the user could even edit the column combos themselves.

I guess my biggest question is it really necessary to create all new combos or can you achieve something similar by using the existing columns (maybe changing a few critical columns if necessary)?

October 06, 2020, 06:26:58 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I could make it so that dungeons can't appear on screens with lakes, or disallow lakes from appearing in Graveyard. Other thing I could do would be to make it so the center screen of lakes can only exit west and east, positioning armos statues so that theyre not in the same column as ladders/blank edges, and forcing both Fairy lakes to use the same environment. I think these are the types of things I'll have to focus on.

These all sound reasonable. Part of the joy of hacking is working within the established limitations!
« Last Edit: October 06, 2020, 06:26:58 pm by gzip »

Garmy

  • Jr. Member
  • **
  • Posts: 14
  • Filthy gemini
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #22 on: October 09, 2020, 02:06:16 pm »
Progress Update

I only have one new screenshot to show, but it's a very cool one.




So what's happening here?

I made a Junkyard Biome. All it does is fill the screen with random tiles from a collection of 32 tiles, and then carves out a vertical and horizontal path through the middle.

In my last post, I was commenting about how I ran into an issue with only having 256 unique columns. This screenshot shows a lot more! Each column is a series of 10 tiles, each randomly selected from a pool of 32 tiles. This means that each column has 1,125,899,906,842,624 possible configurations. Likely, every single column shown in this screenshot is unique, and the game still works.

How tho!


Not all heroes wear green tunics

After my last post, Cyneprepou4uk commented that there was no need to restrict myself and so I reached out to him. After some discussion back and forth, he came up with a great idea to make each column on each screen unique, and then wrote the ASM to make it work. It's a really solid implementation that makes writing to the rom much easier in my application and makes it a lot less bug-prone.

The technical stuff (or: Skip this if you don't care)
He expanded the rom, adding 8 banks. Then with some ASM magic got rid of the column groups, column definitions, pointers, and basically re-architected the entire method the game figures out what tiles to place on the screen.

With 8 extra banks, four go unused, but in the other four, each bank is set up to define 32 screen layouts. Instead of having a layout reference 16 columns in another table by their group and id, each layout directly contains the 176 tiles for that layout.



The way that this is set up, I dont have to worry about setting Start Column bits, or Double Tile bits, or collecting columns into groups, redefining pointers to those groups, or encoding all the column data in the rom's funky format. But most importantly, I dont have to worry about space limitations!

So HUGE thanks to Cyneprepou4uk for making this possible!

Moving Forward

With constraints out of the way, I am free to get more creative with Biome generation. Previously, I had no plans to make a Desert Biome because of the extra columns it would make, but now I can include them. I also have an idea to make a Wetlands Biome that will have a lot of 3x3 to 4x4 tile-sized lakes throughout it with rivers connecting them and bridges crossing over them.

Here's a little mockup of the Wetlands Biome:



I also want to design a bunch more Decor screens for each Biome and a handful of new Dungeon Entrance screen layouts.


I'm also open to ideas for Biomes or even layouts of Dungeon Entrance screens. A pretty easy way to make mockups would be to use Pyxel Edit and use the template I created.
« Last Edit: November 10, 2020, 10:11:55 pm by Garmy »

ActionGamer

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #23 on: October 09, 2020, 02:13:10 pm »
Coolio cant wait to see it all done

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 530
  • I am the baldest romhacker
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #24 on: October 09, 2020, 04:44:47 pm »
@Garmy  :woot!:



Part of the joy of hacking is working within the established limitations!

 :laugh:
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

ultimaweapon

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #25 on: October 09, 2020, 08:29:47 pm »
It's good to hear that everything is shaping up nicely.
Trust in the Heart of the Cards

DannyPlaysSomeGames

  • Full Member
  • ***
  • Posts: 103
  • Wait, this isn't Burger King
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #26 on: October 10, 2020, 12:59:35 am »
Wow, that's pretty impressive! It's pretty clear that a lot of hard work is going into this project, and I'm glad with how it's turning out so far.

So considering that your overhaul leaves you with 4 extra banks of space, would you consider doing a dungeon randomizer as well? I'm really curious at how you'd approach something like that.

I'm also curious about making the screen overhaul its own standalone thing; I think it'd be a pretty great addition in allowing ROM hackers to be more creative with their overworld design (though compatibility with the standard tools might be an issue, I still think it'd be brilliant).
Hey there

Vanya

  • Hero Member
  • *****
  • Posts: 1821
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #27 on: October 10, 2020, 03:39:08 am »
I love everything I've seen here so far.
All the ideas going into this tool are interesting.
However, if you really want to impress me, turn the vertically oriented bridge tiles 90 degree so it doesn't  look like Hyrule has some strange building code concerning bridge construction. :P ;D :3

Garmy

  • Jr. Member
  • **
  • Posts: 14
  • Filthy gemini
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #28 on: November 10, 2020, 11:19:47 pm »
It's been a while since I've posted an update, but boy have I been busy!

First thing first, let's see some maps:



You probably noticed some new Biomes!


The River Biome



This Biome starts at the top of the map and winds its way down, generating bridges along the way. Zora swim in these waters, so beware!

The Desert Biome



The desert heats bakes your back as you navigate boulders and rocky outcrops, dodging Leevers and Peahats.

But if you're lucky, you might find some relief at an Oasis



Deserts also hide secrets



Changes to the Mountain Range and Start Zone

After some careful thought, I realized that mountains just dont work that well anywhere except the top rows. The ladders are supposed to make you feel like youre climbing up, but when it's positioned anywhere else on the map, that illusion is broken. So that's where they're placed now. They also take up less screens horizontally than the original map to make room for more biome diversity. Finally, the algorithm for creating these screens has been vastly improved.

Since the Mountains now appear at the top of the map, the Start Zone area now appears only on the edges of the map and below the bottom half. As an aside, the Start Zone region has been reduced to 3x2, down from 4x2.

Changes to the Tunnel Regions

The Tunnel Regions used to just copy the Mountain Range region algorith, but have now been given a new one. They appear a little more craggy and will be filled with Tektites.



Just for Fun: Palettes!

You can now select a palette. Here are the options:



(My favorite is the Vintage one)

Other Changes

  • Caves have been more evenly distributed around the map, and (for the most part) don't clump up together. You shouldn't find two Shop A's on adjacent screens anymore
  • Dungeons have also been more evenly distributed and are ordered by the travel distance from the screen where Link starts his adventure
  • Caves of all types now have the screen's exit X/Y locations set properly
  • New Decor screens have been added for many Biomes and have been tweaked to look nicer
  • The Debug Map now shows which Armos have stairs and where the Power Bracelet is
  • A TON of bug fixes, adjustments, and refactoring

Remaining Tasks

  • Need a beta testing round to find edge cases and ensure each map is completable (See below!)
  • Placement of Enemies
  • More Dungeon/Island/Decor ideas and implemented
  • Compatibility with the Existing Randomizer
  • Credits Tab
  • Allowing the Map to be hidden in the editor, and shown only if the user accepts. When a seed is generated with the map visible, it will generate a different map than the hidden one.

Ready for Beta Testing

If you're interested in helping out, I'm looking for issues in the map generation.

  • Compatibility on Mac/Linux through the use of Windows Emulators
  • All Caves work as intended (they lead to the right cave, they exit properly, and can be reached)
  • All screen edges line up
  • All screens can be accessed
  • General janky and goofy looking layouts
  • Are the maps fun to navigate?
  • Is there anything blocking a 100% completion?

[Download the current build]

ActionGamer

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Legend of Zelda Overworld Randomizer [Beta Testers Requested]
« Reply #29 on: November 11, 2020, 02:51:19 pm »
It works great so far, however when I try to patch a randomized map rom with the Zelda 1 Redux hack, the game just crashes when you get passed the name select screen. Which is weird because if I do it the other way around, the game works but none of the redux features show up. Also sometimes with a randomized map when I move up a screen there is a wall tile blocking the way forcing me to go back down. It's not a huge problem, just something that can be addressed. Another thing you can do is figure out how we can be able to edit the randomized map because ZeldaTech doesn't work right with it.


Garmy

  • Jr. Member
  • **
  • Posts: 14
  • Filthy gemini
    • View Profile
Re: Legend of Zelda Overworld Randomizer [Beta Testers Requested]
« Reply #30 on: November 11, 2020, 07:49:21 pm »
It works great so far, however when I try to patch a randomized map rom with the Zelda 1 Redux hack, the game just crashes when you get passed the name select screen. Which is weird because if I do it the other way around, the game works but none of the redux features show up. Also sometimes with a randomized map when I move up a screen there is a wall tile blocking the way forcing me to go back down. It's not a huge problem, just something that can be addressed. Another thing you can do is figure out how we can be able to edit the randomized map because ZeldaTech doesn't work right with it.

Unfortunately, I don't think I'll be able to get this to work with Zelda Redux. This Randomizer expands the rom and writes to the extra banks, which ZR also does. There's overlapping code between the two patches that would make it really difficult to make them work together.

When you find bugs like edges not lining up, please send me the seed number so I can investigate.


As far as existing map editors go, none of them will work with the roms output by this randomizer. The whole format of how screens are built in the code is different. This is something that I'm fine with because when Version 1.0 releases, it won't show a preview of the map anymore. Having a level editor that can read the rom would make it easy for cheating.




Also, side note.. I did some testing and it looks like Fred Coughlin's randomizer works with this, as long as you run your rom through his randomizer first.

I'm pretty excited about this!

lexluthermiester

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 863
    • View Profile
Re: Legend of Zelda Overworld Randomizer [Beta Testers Requested]
« Reply #31 on: November 12, 2020, 12:23:18 am »
This looks cool! Is there a seeding function that can be used to replicate maps that have already been generated?

Garmy

  • Jr. Member
  • **
  • Posts: 14
  • Filthy gemini
    • View Profile
Re: Legend of Zelda Overworld Randomizer [Beta Testers Requested]
« Reply #32 on: November 12, 2020, 02:21:27 am »
Yea it uses seeds that generate the same map every time.

The seeds will be affected with updates though

Trax

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 571
    • View Profile
    • Trax ROM Hacking
Re: Legend of Zelda Overworld Randomizer [Beta Testers Requested]
« Reply #33 on: November 13, 2020, 01:15:27 am »
Impressive work, so far, Garmy. Maps look quite organic and there's very few glitches. Even if you get a few weird layouts, someone could use that as a starting point and tweak with their own touch afterwards. Here's an idea: being able to set a weight value for each biome, higher weight means higher probability for screens of that kind.

I tried to run the app with Wine on Mac, but the display is very glitchy. The map does generate, though. Color palettes don't work. Maybe with the latest update of Wine, I could get better results, but I'm usually quite hesitant to do that because I always fear it will break something else. What kind of framework do you use?

Some time ago, I tried to implement a more "free" system for Zelda 1 maps, where you can lay down each tile individually instead of having to work with columns. I thought about a simple compression system (RLE), and have the option to choose between horizontal draw or vertical draw, whichever run gives you the least number of bytes. The caveat is, obviously, that it still takes a lot of space, despite compression. It was put on ice, most likely because I was not skilled enough. Maybe I could give it another try, if I have time. Do you think that could make map generation more interesting?

Garmy

  • Jr. Member
  • **
  • Posts: 14
  • Filthy gemini
    • View Profile
Re: Legend of Zelda Overworld Randomizer [Beta Testers Requested]
« Reply #34 on: November 13, 2020, 02:42:17 am »
Thanks Trax! Your work gave me the initial motivation and starting information to work on this.


I have some weighting involved throughout the project, but it's not generated with an equation of any sort (like noise or whatever) . A lot of the generation is done by hand with RNG determining the variation. For example, the mountains always have a height of 3 screens and a width between 6 and 9 (iirc), then its placed on the top row somewhere. Rivers always start in the top row and randomly make their way down. After placing the mountain, the river, the desert, and the graveyard, I push in as many 3x3 forests as can fit, and then assign any remaining screens to adjacent biomes. It's probably a little too manual but I gave me a lot of control. Also it's hard to use an equation when the canvas size is effectively only 16x8.

I do want some new biomes eventually.. Things like swamps or maybe villages (if this expands enough to warrant new tiles). At that point I'd probably throw in more weighting to determine which biomes end up getting used in a seed.

Thanks for testing in Wine. If I understand right, you mean that palettes don't affect the preview map in the editor,correct? If so, that's expected. I don't read the graphic data from the rom. I just made a tile atlas as a bmp and use that when drawing the map. At some point, I'll update it so that the preview map shows the correct palette.

I'm curious what glitches you're seeing though. Would you be able to take a screenshot of it for me?

I use the WPF Framework for the UI and a styling plug in called Adonis. It's written in C#. I wasn't sure C# was the right choice but it's a lot easier than asm!

Cyneprepou4uk did some asm work on it and achieved what you were looking to do. He expanded the rom and banks 0x07, 0x08, 0x09, and 0x10 are used for layouts, with each tile being represented individually. If you open an output rom in an hex editor, you'll see the data beautifully formatted. It really did open the possibilities a lot.

Making map generation more interesting with the given tiles is a bit of an challenge though, even with no column limitations. I definitely do want more variety from screen to screen though.

A couple friends and I have made up a bunch of island and dungeon entrance layouts that I want to add to the pool of options, as well as some decor screens (basically unique looking screens that can be used as landmarks). I haven't implemented many of them yet.


After I squash some of these bugs, I'll make it open source. I think having more creative input on making biomes and stuff would be pretty awesome.

Rogles

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Legend of Zelda Overworld Randomizer
« Reply #35 on: November 21, 2020, 08:44:07 pm »
Progress Update


Here's a little mockup of the Wetlands Biome:



I also want to design a bunch more Decor screens for each Biome and a handful of new Dungeon Entrance screen layouts.



That Wetlands Biome looks great! I can't think of many other biome ideas except for maybe having a small area in the mountains with lots of waterfalls and single tile width streams or an area in the mountains that has more ladders and small pockets of traversable terrain (kinda maze-like).

Would it be possible to have a snow biome (white rocks and trees) or would that be too difficult? It would basically look like the graveyard but with the normal ground color instead of grey.

November 22, 2020, 07:36:56 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Here are a few mockups of biome and dungeon entrance ideas. They were made in ZQuest so some of them might not be 100% doable due to the extra tiles and flexibility it has. They should be close though.

Mountain Streams






Great Waterfall


Green Cave


Grave Mountain Top


Maze


Snow - I'm assuming this wouldn't be doable unless it replaced the grave area.





« Last Edit: November 22, 2020, 07:36:57 pm by Rogles »

Vanya

  • Hero Member
  • *****
  • Posts: 1821
    • View Profile
Re: Legend of Zelda Overworld Randomizer [Beta Testers Requested]
« Reply #36 on: November 23, 2020, 02:00:23 pm »
What about changing the snow palette so the ground is white, maybe have light grey rocks, and lighter blue waters to look a bit more icy. Any way to use the dead tree trunk entrance tiles to make little grey trees?

Garmy

  • Jr. Member
  • **
  • Posts: 14
  • Filthy gemini
    • View Profile
Re: Legend of Zelda Overworld Randomizer [Beta Testers Requested]
« Reply #37 on: November 24, 2020, 10:24:49 am »
Some of those mockups look pretty awesome. I especially like the grave mountain top. I also like the mountain streams but they're hard to make a biome out of through procedural generation. I bookmarked the post tho so I can return to it.

Unfortunately i can't do the snowy ones. They're mixing palettes. The four colors come as a set and can't be changed around without changing them for every screen and modifying the graveyard palette.