Author Topic: how best to map LAYERS?  (Read 30897 times)

0 Members and 1 Guest are viewing this topic.

Offline GHS

  • Jr. Member
  • **
  • Posts: 94
how best to map LAYERS?
« on: May 31, 2013, 06:48:17 am »
Games with a lot of parallax scrolling layers are a bit of a problem to map because some payers are bigger than others and they don't aline properly as well as some just completely cover other layer so you cant see them at all so...
Whats the best way to deal with them?
Keep the layers separate? Crop and adjust them to fit so they look like how it is when you play the game? a little of both?
How would you handle it?

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2326
Re: how best to map LAYERS?
« Reply #1 on: June 01, 2013, 04:34:29 pm »
Sorry for not answering earlier, I saw your post yesterday but didn't have the time to reply.

Your question is very interesting but to answer correctly, I'd need a lot more information. Parallax scrolling layers can move in a lot of different ways even within the same game, and each area might need a unique solution.

Is there a specific game and area/stage you're thinking of? I could take a look and then tell you how I'd handle it and why and we could keep going from there. There are just too many variables to give an all-encompassing answer.
« Last Edit: June 01, 2013, 04:35:13 pm by TerraEsperZ »
Current project:
Mega Man: Powered Up (PSP)

Offline GHS

  • Jr. Member
  • **
  • Posts: 94
Re: how best to map LAYERS?
« Reply #2 on: June 01, 2013, 05:28:13 pm »
horizontal scrollers like E-swat(stage5) and super Contra(stage3) for starters. As well as other games of that nature.
I wanted to get into this topic for some time but for get to do so.
« Last Edit: June 01, 2013, 05:29:52 pm by GHS »

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2326
Re: how best to map LAYERS?
« Reply #3 on: June 01, 2013, 06:43:03 pm »
Are you referring to the arcade version of those games? Because the console versions don't feature any parallax scrolling for the stages you just mentioned.

And if yes, I'm afraid there are no easy ways to fully capture a background layer. I know MAME doesn't allow you to disable layers since there are a huge number of different arcade hardware in existence and thus, no universal hardware layer system. You'll either have to reconstruct the background layer by taking a lot of screenshots and hoping there are no parts that are always obscured or, if using MAME, see if you can use the GFX/TileMap viewer with F4 to obtain the current tilemap and use those graphics to help you reconstruct the graphics.

Or, if I'm completely off base with my assumption, feel free to tell me and we'll see if we can't help you in another way.
Current project:
Mega Man: Powered Up (PSP)

Offline GHS

  • Jr. Member
  • **
  • Posts: 94
Re: how best to map LAYERS?
« Reply #4 on: June 02, 2013, 07:12:52 am »
I use mame and pres F4 to view the layers. I have constructed the levels layers but have not put them (overlapped them) together to form the full map.

The question is how would you overlap the layers that are of different sizes to form a map from beginning to end?

I know that the main foreground is the sprites interactive layer that defines the size of the map and you have to assemble it correctly but the other layers are mostly to give the effect of depth.

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2326
Re: how best to map LAYERS?
« Reply #5 on: June 02, 2013, 09:12:18 am »
I can't imagine it being that difficult since the background layer should repeat at some point, or else you might need to do a bit of editing. Can you attach the layers you've assembled to your post? I'm really more of a visual person and I'd have an easier time showing you than telling you.
Current project:
Mega Man: Powered Up (PSP)

Offline GHS

  • Jr. Member
  • **
  • Posts: 94
Re: how best to map LAYERS?
« Reply #6 on: June 02, 2013, 06:40:38 pm »
yes its easy to edit repeating pattern background layers but when the hole layer is one big picture, what then?

but for something like this its bet to edit it, yes?
« Last Edit: June 02, 2013, 06:42:33 pm by GHS »

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2326
Re: how best to map LAYERS?
« Reply #7 on: June 04, 2013, 07:20:12 pm »
Okay, so I spent about an hour and a half coming up with the following mock-up. It's far from perfect but it will illustrate my thought process regarding how I handle layers like these.

Quick note: I always use pure magenta (#FF00FF) as the "see-through" colour so when putting the layers together, you have to make sure that this magenta is removed. Also, I was lazy here and simply used black to mask off the parts of the map that are never visible. Normally, I'd use some other colour but as I said, this is a quick mock-up.

Quick note 2: I didn't take care to check all that much here, but know that almost all 2D games up until more recent and much more powerful systems will use tiles that are multiples of 8 pixels in length and height. This means that ideally, you should make sure that each layer has an height and length that are multiples of 8 pixels. I tried to ensure this here but again, quick mock-up!

First off, the middle layer, which here is the actual stage where you and the enemies are located, is the main one so all the other layers have to be adjusted to fit it. At a quick glance (because I didn't make any calculation), the background layer seems to move at half the speed of the middle one, and the foreground one seems to move twice as fast. These ratios are important when editing a layer to make it fit another. Here, I assume the middle layer is complete and correct so I didn't touch it apart from very approximately outline the visible area with black.

Second, the background layer. Since it moves at half the speed of the middle one, even if you managed to capture it in its entirety, you'd still have to nearly double its length to make it fit. When editing or extending a layer, try to use specific points where the layer itself changes as an anchor point, and in this case, I've decided to use the spot where water stops and is then replaced by grass. I then aligned this part horizontally with the spot in the middle layer where the water stops, and then extended the background in both direction. I also had to move the part with more foliage on top and extend that part too in order to fit the section of the stage where you can go upward on the dead tree. I extended the top canopy to the left since that part appeared on screen already this high, but when extending on the right, I kept the part at the end where the foliage goes down since it's obvious that part was supposed to be seen (the graphics don't just cut off like on the left).

Third, the foreground layer. I'd say beforehand that foreground layers tend to make maps more difficult to understand as they hide parts of it, so don't be afraid to exclude it from your map if it makes it less readable. Since this one moved twice as fast as the middle layer, you basically have to cut it in half to make it fit. Again, use specific points where changes occur to decide how to make your edits. In this case, the trees stop appearing once you reach the swamp and the dead tree, and then they reappear along with the jungle trees until near the end. The easiest way to edit in this case is to take both tree portions and try to cut down their sizes in half. The first one you can simply omit the first half and align it so the trees stops a bit before the swamp. The second tree portion is harder since it has both a beginning and an ending, so when editing try to remove repeating portions or, like I did, start cutting at points where you can see small tears in graphics where tiles don't connect naturally to one another (check out the vines). I basically removed a bit less than half of it and then aligned that portion with the second jungle part.

And that's it for the most part. I hope I'm making myself understandable but it there are points where I'm not being clear enough, feel free to say so.
Current project:
Mega Man: Powered Up (PSP)

Offline GHS

  • Jr. Member
  • **
  • Posts: 94
Re: how best to map LAYERS?
« Reply #8 on: June 05, 2013, 12:43:06 pm »
how is this?

Offline GHS

  • Jr. Member
  • **
  • Posts: 94
Re: how best to map LAYERS?
« Reply #9 on: July 16, 2013, 07:55:31 am »
I'm having trouble mapping some BG layers in Metamorphic Force(arcade). stages 3,4,5,6 have BG layers that scale & stretch and MAME will not show them when I press F4.
Anyone know how I can extract those layers?