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

Author Topic: Zelda 1 Map Generator  (Read 1144 times)

gzip

  • RHDN Patreon Supporter!
  • Jr. Member
  • *****
  • Posts: 49
    • View Profile
Zelda 1 Map Generator
« on: October 03, 2020, 10:42:41 pm »
During the development of Zelda A New Light I needed a way to explore the column combos that are used to build screens. There's not a lot of information available about this part of the game, but there's just enough to get started (see 1, 2, 3, 4). Even then, there's no easy way to tell what combos are used in what screens and where the game code needs to be edited once you find what you're looking for. I originally wrote this as a command line tool to fill the gap and thought it would be interesting to integrate a GUI to make it more interesting. It is a browser based tool written in Javascript and HTML so it's easily hackable. This is primarily a development tool but it can also be used by players to generate a map of their favorite Zelda 1 hack.

Download it. Here are a few screenshots:






« Last Edit: November 16, 2020, 10:24:08 pm by gzip »

ActionGamer

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Zelda 1 Map Generator
« Reply #1 on: October 04, 2020, 10:37:55 am »
How did you screenshot the PPU viewer for this application to work?

gzip

  • RHDN Patreon Supporter!
  • Jr. Member
  • *****
  • Posts: 49
    • View Profile
Re: Zelda 1 Map Generator
« Reply #2 on: October 04, 2020, 10:55:42 am »
How did you screenshot the PPU viewer for this application to work?

Just manually in fceux. It would be cool to generate the tile data automatically by reading it directly, but for now it's a manual step for any hack with custom graphics.

ActionGamer

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Zelda 1 Map Generator
« Reply #3 on: October 07, 2020, 10:22:10 am »
Just manually in fceux. It would be cool to generate the tile data automatically by reading it directly, but for now it's a manual step for any hack with custom graphics.

Did you use any software? If so which one?

gzip

  • RHDN Patreon Supporter!
  • Jr. Member
  • *****
  • Posts: 49
    • View Profile
Re: Zelda 1 Map Generator
« Reply #4 on: October 08, 2020, 11:10:09 pm »
Here's the latest map generator, with the changelog:

  • Handle flute secrets
  • Handle lost woods/hills paths
  • Integrate armos secrets
  • Implement screen tags
  • Display shop items

And an example map of the original LOZ:


October 08, 2020, 11:10:29 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Did you use any software? If so which one?

I used Photoshop but not everybody has that luxury. Here's a tutorial I created using Microsoft Paint since everyone with Windows should have that. You should be able to adapt accordingly with your graphic editing software of choice (something like Photoshop or The Gimp, which have layers, makes this much less cumbersome since you can crop and resize all the palettes at once).

Saving new Tilesets for Zelda Map Generator Using Microsoft Paint
« Last Edit: November 16, 2020, 10:24:16 pm by gzip »

gzip

  • RHDN Patreon Supporter!
  • Jr. Member
  • *****
  • Posts: 49
    • View Profile
Re: Zelda 1 Map Generator
« Reply #5 on: October 20, 2020, 10:34:51 pm »
Updated again. Here's the latest, with changelog:

  • Add more tilesets
  • Add example maps
  • Handle empty shop items (outlands)
  • Fix bug with screen colors and secrets on reused screens
  • Reset lost woods/hills data between maps
  • Minor performance change

Here's the list of example maps that are now included:

  • Zelda A New Light
  • Zelda Ganon's Curse
  • Zelda Hyrule's Doom
  • Zelda Link's Shadow
  • Zelda Outlands
  • Zelda Onyx
  • Zelda Perils of Darkness
  • Zelda Trial of Courage
  • Zelda Triforce Power
  • Zelda Wrath of Ganon

I'll probably submit this to the utilities section soon.
« Last Edit: November 16, 2020, 10:24:24 pm by gzip »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1539
    • View Profile
Re: Zelda 1 Map Generator
« Reply #6 on: November 09, 2020, 09:43:48 pm »
This app looks absolutely phenomenal, gzip!
Great work on this app, will give it a look for sure. :)

I wanted to ask, does this allow us to create new column entries for Zelda 1?
Or we can only see them?

I ask because I want to be able to edit certain places for Zelda 1 so they don't look as blocky.
For example, the two islands in the middle of Hyrule, where both the 1st and 4th Dungeon are located, look extremely blocky for my taste, and I'd like to add some custom columns to add some of the diagonal rock tiles, kinda like how the screens are in the Fairy ponds, but I know those don't have any water tiles in their outer sides.

Something like this:

                           Original                          /                            Mockup


I want to do the same for other screens that look too blocky, and spice them up a bit so the look a little bit more "ragged". I want to do the same for the following screens based on this map for the locations:
https://www.supersoluce.com/sites/default/files/node/53892/solution-zelda-1-nes-carte-du-monde-worldmap.jpg

B-3, B-4, B-5 (make them like the graveyard A-3, A-4, A-5 parts), C-3, D-4, and finally islands F-5, H-4, P-1, P-2 and P-3.
That's why I'm asking, I wanted to improve some of the screens in Zelda 1, and I believe I will need creating a handful of new columns for this.

gzip

  • RHDN Patreon Supporter!
  • Jr. Member
  • *****
  • Posts: 49
    • View Profile
Re: Zelda 1 Map Generator
« Reply #7 on: November 09, 2020, 10:35:31 pm »
This app looks absolutely phenomenal, gzip!
Great work on this app, will give it a look for sure. :)

Thanks for taking a look!

Quote
I wanted to ask, does this allow us to create new column entries for Zelda 1?
Or we can only see them?

You cannot create new columns in the tool but it will locate the column entries in the ROM so that you can edit them by hand. This isn't too difficult if you take the time to understand the format but there are of course caveats to editing columns. The main caveat is that column entries are compressed and can overlap each other to share tiles. Editing a column incorrectly can break everything if you're not careful. The tool can help identify the overlap scenario and identify columns that are the proper length, as well as columns that are less used (which have better potential to be replaced).

There are only 3 unused columns by default in stock Zelda, which may or may not be useable depending on the length you need. So if you need more than that then you have to free them up by replacing less used columns. I did quite a bit of analysis to identify such columns which I can share if needed. In fact you can look at the spoiler map for A New Light in the package and compare it to stock to get a good idea of what screens were changed to free up columns.

It looks like many of the screens you listed can be at least partially edited in ZeldaTech using the columns found in J-4 (the fairy pond as you mentioned). That would get you most of the way there. I made similar changes here and there but not as extensive.

The graveyard will need new columns but they'll be low count since they only have one corner each. And D-4 if you want to change the bottom right corner. I'm not sure the outer corners of the island like in your mockup will be worth it, up to you once you dig in.

November 09, 2020, 10:57:42 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
One more caveat. Several of the screens you listed have a different inner and outer palette, so when you add the corner tiles they're a different color. You'd either have to "squeeze" the screens in to get the corners within the inner palette or just change the two palettes to the same one in each of those screens (e.g. C-3, D-4, F-5, P-2).

November 16, 2020, 10:22:17 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Updated. Get the latest.

Changelog

  • Make column data location more flexible (supports changes in redux)
  • Add renderColumnGroups function
  • Fix bug with normal blocks displaying as special
« Last Edit: November 16, 2020, 10:22:17 pm by gzip »