PDA

View Full Version : DMAPs and Maps question



Darkechibi
01-11-2007, 12:52 PM
Ok, I am starting, I think, to get a handle on this. still lots to figure out but so far so good. one of the things I am missing is the DMAP and MAP system. I have read many tutorials at this point and reviewed the in editor documentation but still...
IF i understand correctly from the docs a MAP, can have multiple DMAPS. is this correct.

"maps are just 16x8 (+4) collections of rooms. the limit is 255 rooms to a quest but you can have more than one dmap per map."

SO what I want to do is when you enter a new screen it loads into a diffrent DMAP with a different pallete. I believe this is the point but I cannot figure out how to make the individual screen (or multiple screens) have a dif. DMAP designation. Any Advice?

DC

bluedeath
01-11-2007, 02:28 PM
Which version are you using?

Joe123
01-11-2007, 03:37 PM
What you need to do is set two different DMaps (from Quest-->DMaps) to both use that same map. Set one of them to use the first pallete, and one to use the second. From the first room you are in, set a side warp on the side from which you want to enter the new room to the coordinates of that room, in the new DMap (if that all makes sense). Should solve your problem.

Darkechibi
01-11-2007, 09:32 PM
Blue, I am using 2.11 b16b, sorry I really should have mentioned that. Thanks if I could get your take on this as well so that I could get a consensus as to diffrent ways of doing things. Joe's is good, but I would like more data so that I can be sure I understand and gather any additional data. Thanks for the help. back to figuring out warps!

DC

The_Amaster
01-11-2007, 10:13 PM
Here....
Two screens, screen X and screen Y on map Z. Two DMaps, called, for the sake of demonstration, DMap X and Y, but BOTH SET TO REAL MAP Z!
DMaps X and Y have two different pallets. Now, go to Screen X, go to Data->Side Warp-> Select the side between them, and then set it to screen Y AND DMAP Y. Thus the pallete changes with it.

C-Dawg
01-11-2007, 10:48 PM
C'mon folks, lets supply a useful answer here.

To understand what a DMAP is, you need to understand how the original Legend of Zelda organized its data.

As I understand it, the original Legend of Zelda had only three or four "maps" worth of data. This data tells the game what sprites (here called combos) to draw where, what enemies appear on each screen, etc. One map was the Overworld. The other maps were the Dungeons. If you look carefully, you'll notice that the Dungeons in LoZ "fit" with each other pretty well; one dungeon fits into the negative space of another. They're all on the same map, you see. And, more importantly, all of them are built from the same sprites, or combos.

But remember how the colors of those sprites were different? One level was green, one was white, etc? That was accomplished by making sure the game knew what DMAP, in addition to what MAP, the player was on.

So essentially, it works like this.

MAP = A map is just a way of organizing screens. Think of it as a data structure. You draw screens on a map, and the engine takes care of walking between them. This is just storing the combos, enemies, secrets, scripts, all of the stuff as you create it in the editor.

DMAP = This is a variable that tells the game HOW TO TREAT the data you've plugged into the maps in the form of screens. That is, you don't have to tell ZScript what palette to display for each screen. Instead, you draw a bunch of screens in a given palette (press 0 - 9 to switch between them and see how your screen will look) and then you plug in the palette you want into a DMAP. DMAPS handle things that you want to assign to a whole group of screens on a map, like the music to play, the palette to use, what level the player is on, whether the whistle summons the whirlwind, and many other things.

The DMAP has other important features, too. If you want to set up a warp (like a dungeon entrance) then you need to direct the game what DMAP to send the player too, not what MAP.

One big thing to watch out for is that DMAPS usually contain fewer screens than a whole map. A DMAP designates a certain PART of the MAP. Overworld DMAPS will use the entire MAP, and you don't have to worry about any problems. However, dungeon and cave DMAPS only use a 7x7 square of the data on the MAP you choose. If the player tries to walk out of this 7x7 square, he will be blocked. So when you initially set up your DMAP, pay attention to what part of the MAP you have draw the screens on, and make sure your DMAP is centered on those screens. (You can adjust it.)

The other consequence of DMAPS being smaller than MAPS is that, when you set a warp to a particular screen of a DMAP, you need to refer to it by its coordinates within the DMAP, not on the MAP. So, for instance, warping to screen 3,0 on MAP 2 depends on what DMAP you've set up there. If your DMAP is shifted over by 2 screens, your actual warp coordinates will be 1,0.

That should get you started.

Tesko
01-12-2007, 05:13 PM
I have a question concerning the issue of maps and dmaps;
Does an overworld have to use the whole map and dmap? I ask this because I want custom music for the different regions, and that has to be assigned to dmaps, correct?

Joe123
01-13-2007, 05:25 AM
No, not at all, there is no need for the whole map or Dmap to be used - and yes, different music must be assigned to a different Dmap. If you're making an overworld that you want to have different musics, however, it would be much easier to make your overworld all on one map (unless it takes up more than 16x8 screens) and use the effect I described earier in this thread for applying a different palette to two different screens, but instead change the music in the Dmap options.

C-Dawg
01-13-2007, 10:27 PM
Generally, music should be assigned to Dmaps. In recent betas, however, you can assign music to a particular SCREEN. This should be limited to use in boss rooms though.