Zones and Zone Options

From NSMBW Modding Database
Jump to navigation Jump to search

Zones are (playable) sections within an Area. They can be created freely and various properties can be set, such as their size and position. There are also numerous Zone Options that can be changed via the respective dialog. Zones are very important when it comes to visual aspects (Zone Theme), camera configuration, music selection or the player's perception of a level, among other things.

Zones

As we have learned, zones are regions within areas. Their main purpose is to create level space that can be used by the designer for their creations. The size and position of a zone is crucial. This is due to the fact that both the player and the camera cannot leave the zone. So please keep that in mind.

Zones can have different themes, camera angles, zoom modes, and music. They can be connected to other zones via Entrances.

Position

Even though the entire height and width of the Area is available, it is recommended to start at the top-left of the canvas with your first zone.

Zones have quite a large loading region around them, therefore it is important to give individual zones enough room to breathe.

  • Zones can never overlap or touch other zones
  • Zones should be 256px (16 blocks) away from each other
  • Zones should be 256px (16 blocks) away from the canvas/area border
  • It is advised to paint zones on the same height (y-coordinate) in the area if possible. This is especially true for zones with (moving) liquids (lava, water, ...)

Here are a few typical zone arrangements:

Position Options

It is highly recommended to position your zones on the 16x16 or 8x8 grid. An existing zone can snap to those grids by pressing the respective button in the Zone Options dialog.

Size

Zone dimensions are one of the most important aspects when creating a level.
The dimensions will dictate camera behavior.

Let's look at the height and width of a typical zone:

Zone Height

If the camera is allowed to scroll up/down, the zone height must be greater than the (maximum) screen height. The height should be increased in increments of 16 pixels beyond the maximum screen height.
However, it is important to set the height to a reasonable value without making the zone unnecessarily tall.

The height of a zone can be adjusted according to the (maximum) Screen Height. This causes the camera to fill the entire height of the screen in static camera modes. With dynamic camera modes, height only fills up in multiplayer, and only when players are far apart. See Camera Modes.

The following table shows all (max) screen heights:
Dynamic Camera Modes
Max Height
(blocks)
Y-Size
(px)
19 304
20 320
24 384
28 448
Static Camera Modes
Height
(blocks)
Y-Size
(px)
7 112
10.5 168
14 224
17 272
19 304
20 320
24 384
28 448

Those work very well as zone heights.

Vertical levels such as towers are usually about half as tall as horizontal levels are wide, about 3000px to 5000px tall.

Zone Width

The length of a main section zone is usually around 6000px to 10,000px.
When having multiple smaller main sections, their width is typically around 2000 to 5000px. They add up to roughly the same total width as a main section from above.
Intro sections, entrances to other areas, goal sections, boss sections, midway flag rooms, or Ambush/Toad House levels are typically much shorter, where the width is often identical to the screen width.

Zone Size and Camera

The zone dimensions directly affect the camera movement. The following variations are possible:

  • The zone has the same height as is required by the screen height. This will cause the camera to be stationary across the Y axis, it cannot move up/down.

Example: The zone is 224px tall and screen height 14 is used. Since this screen height requires the same height (224px), the camera movement will be stationary.

  • The zone has the same width as is required by the screen height. This will cause the camera to be stationary across the X axis, it cannot move left/right.

Example: The zone is 640px wide and screen height 24 is used. Since this screen height requires the same width (640px), the camera movement will be stationary.

  • The zone has the same height and width as is required by the screen height. This will cause the camera to be stationary across the X and Y axis*, it can neither move up/down, nor left/right.

Example: The zone is 384px tall and 640px wide, and screen height 24 is used. Since this screen height requires the same height (384px) and width (640px), the camera movement will be completely stationary*.

*The last example doesn't properly work, it's just for demonstrational purposes. There will always be a slight screen scroll horizontally. That happens because the height of a zone never 100% matches the 16/9 or 5/3 rules to get the correct (observed) width. The only option to create a room where the camera can't scroll is to use the Y Tracking Only Camera Mode, see the hint there.

Zone Size Limits

Size Options

It's possible to select a Preset zone height and width. Select it from the list in Zone Options dialog.
The preset can be modified further, by keeping one of the values (height or width), and only adjusting the other.

Zone Boundaries

Zone boundaries (borders) represent the natural borders of a level. At no time will the camera be able to leave the zone borders. Special rules exist for the player and sprites, see below. Not to be confused with Bounds, which are a screen-scrolling mechanism!

The left and right zone borders are impenetrable by both the camera and the player. The border can't even be reached entirely, as the camera will stop a few blocks before the zone border. How soon the camera will stop depends on the Camera Mode and Screen Height, see Cutoff. Some camera modes have no cutoff.
Sprites and Entrances can only be placed max 1 block to the left/right of zone borders, else they will not load.
Most controllers can be placed at least 8 blocks on either side.

The bottom zone border is fatal for the player after crossing a buffer area that is located below the zone.

The size of the buffer area is always 64px, 4 blocks!

If the player touches the last pixel of this buffer area below the zone, they die.

Sprites and Entrances can be placed up to 8 blocks below zone borders. Actor Spawners and some other sprites can only be placed 1 block below the zone.

The top zone border is similar to the bottom zone border, but without the deadly part. It can be traversed by the player without dying.

  • The player can climb up to 8 blocks above the top zone border
  • They can interact with tiles and sprites up to 7 blocks above
  • It's not possible to climb up more than 8 blocks. If the player tries to pass that barrier, their y-position will be frozen at the last pixel of line 8, until their y-momentum is negative again and they fall back down.
  • Entrances can also be placed up to 8 blocks above the zone

Camera

Every zone can have individual camera settings. This is a very important factor when creating levels, as you can imagine.
The level camera depends on a combination of settings, which can all be modified at will.

Many of the settings were only recently discovered correctly by looking at the ASM and testing in-game. If your knowledge of cameras in NSMBW is from 2021 or earlier, it's probably worth reading this section.

Settings that influence the camera:

  • The dimensions of the zone in relation to the screen size, see Zone Size

Camera Modes

The newly discovered camera modes are the first decision when it comes to how the camera should behave in-game.

They can be grouped into dynamic and static camera mode. The main difference is that the camera will zoom in dynamic multiplayer modes.
Let's look at the existing camera modes:

Function Y/N
Dynamic
Static
Scroll X
Scroll Y
Expand X
Expand Y
Bottom of zone
Center of zone
Event controlled
This is the key to the table and not a camera mode

Dynamic: Size of camera can increase dynamically in MP modes. In SP uses always the same size.

Static: Size of camera always the same.

Scroll X: Can scroll horizontally.

Scroll Y: Can scroll vertically.

Expand X: Can expand the screen dynamically in the X direction (horizontally).

Expand Y: Can expand the screen dynamically in the Y direction (vertically). Largest screen size will only be used if a player is flying with a propeller suit or block.

Bottom of zone: Camera will stick to bottom of zone. This happens with X-Tracking camera modes.

Center of zone: Camera will stick to center of zone horizontally, and can only scroll vertically. Happens with Y-Tracking camera modes.

Event Controlled: Allows certain camera-related functions to be triggered by events.

Function Y/N
Dynamic
Static
Scroll X
Scroll Y
Expand X
Expand Y
Bottom of zone
Center of zone
Event controlled
How scrolling works in dynamic and static camera modes
How dynamic camera modes behave

The standard camera mode, appropriate for most situations. It is the one most often used by Nintendo for normal main sections. It behaves different for single and multi player modes.

The most frequent screen heights used by Nintendo with this mode are:
17, 20 blocks
17, 24 blocks
17, 20.5, 24 blocks


Multiplayer

In MP, the camera is dynamic. It automatically enlarges the screen size when needed. For this reason, different numbers are visible in the Screen Height selection to represent the different screen heights that are possible with this camera mode. For example "14, 19, 24".

The screen zooms out when 2 or more players are farther apart than a certain threshold of the current screen size.

The screen will shrink again when all players return to the center of the screen.

Please make absolutely sure the zone has the same height or is taller than the max screen height!

Singpleplayer

In SP, the camera uses the smallest value found in Screen Height and sticks to that for the entire time. The SP Normal mode is therefore comparable to the static camera mode.

An example, if the screen height is "17, 20", then "17" will be used in SP.

Function Y/N
Dynamic
Static
Scroll X
Scroll Y
Expand X
Expand Y
Bottom of zone
Center of zone
Event controlled
How scrolling works in dynamic and static camera modes
How dynamic camera modes behave

In this mode, the camera will never zoom out during multiplayer or singleplayer. It's quite easy to plan the zone size in this mode, because there is only one screen height.
The camera can move in all directions, and there are no other restrictions in this mode.

Nintendo uses this camera mode often for intro, secret and goal sections.
Typical screen heights used by Ninty are:
14 blocks
17 blocks
20 blocks

Function Y/N
Dynamic
Static
Scroll X
Scroll Y
Expand X
Expand Y
Bottom of zone
Center of zone
Event controlled
How scrolling works in dynamic and static camera modes
How dynamic camera modes behave

In this mode, the camera will not zoom out during multiplayer, and will be centered horizontally in the zone, only scrolling vertically. Everything that's not in this vertical lane where the camera can move will be cut out from the level.

This mode is used for all vertical level types like Towers.

But additionally, it is also used to create non-scrolling rooms, where the camera isn't allowed to move at all. That's because it is not possible to set the width of a zone to a value that will prevent horizontal scrolling. There will always be scrolling if done via the zone size only!
The only solution for a zone where the camera can't scroll, is to use this camera mode (or other Y Tracking Only modes), and set the height of the zone exactly identical to the screen height. The zone width should be slightly larger than what is needed. The left and right parts not inside the vertical lane will be cut, even if it's just a few pixels.

Be careful with horizontal levels. If you accidently set this camera mode, then only the middle screen of the horizontal level is playable area. If the entrance is at the beginning of the horizontal level, then the player will most likely die, because the entrance is too far away from the center of the zone.

Function Y/N
Dynamic
Static
Scroll X
Scroll Y
Expand X
Expand Y
Bottom of zone
Center of zone
Event controlled
How scrolling works in dynamic and static camera modes
How dynamic camera modes behave

In this mode, the camera will not zoom out during multiplayer, and will use event-controlled camera settings from the Camera Profiles dialog. It can be divided into before and after the triggering of a camera change event.

Before
The camera will behave just like the regular static camera mode during this time.

After
Any camera mode can be selected, after the event is triggered.

How to change the camera mode with events
  • Select this camera mode in Zone Options
  • Open the "Settings" menu and select the entry "Camera Profiles", or you can press Ctrl+ALT+C
  • In the camera profiles dialog, add one or more camera profiles
    • Set the triggering event ID
    • Set the camera mode and screen height you want to use
Function Y/N
Dynamic
Static
Scroll X
Scroll Y
Expand X
Expand Y
Bottom of zone
Center of zone
Event controlled
How scrolling works in dynamic and static camera modes
How dynamic camera modes behave

In this mode, the camera will only move horizontally. It will be aligned to the bottom edge of the zone. Everything that's not in this horizontal lane where the camera can move will be cut out from the level.

The dynamic camera is able to zoom out in multiplayer.

This camera mode can be used for horizontal levels, but using other camera modes plus making the zone as high as required works just as well, and is the preferred method by Nintendo for horizontal levels. This camera mode is almost never used.

Function Y/N
Dynamic
Static
Scroll X
Scroll Y
Expand X
Expand Y
Bottom of zone
Center of zone
Event controlled
How scrolling works in dynamic and static camera modes
How dynamic camera modes behave

In this mode, the camera will only zoom out during multiplayer if the players are far apart horizontally. Scrolling works in all directions.

This mode is almost never used by Nintendo.

Function Y/N
Dynamic
Static
Scroll X
Scroll Y
Expand X
Expand Y
Bottom of zone
Center of zone
Event controlled
How scrolling works in dynamic and static camera modes
How dynamic camera modes behave

In this mode, the camera will only move vertically. It will be centered horizontally in the zone. Everything that's not in this vertical lane where the camera can move will be cut out from the level.

The dynamic camera is able to zoom out in multiplayer, unlike the other "Static Zoom, Y Tracking Only" mode.

This mode is used for all vertical level types like Towers.

But additionally, it is also used to create non-scrolling rooms, where the camera isn't allowed to move at all. That's because it is not possible to set the width of a zone to a value that will prevent horizontal scrolling. There will always be scrolling if done via the zone size only!
The only solution for a zone where the camera can't scroll, is to use this camera mode (or other Y Tracking Only modes), and set the height of the zone exactly identical to the screen height. The zone width should be slightly larger than what is needed. The left and right parts not inside the vertical lane will be cut, even if it's just a few pixels.

Be careful with horizontal levels. If you accidently set this camera mode, then only the middle screen of the horizontal level is playable area. If the entrance is at the beginning of the horizontal level, then the player will most likely die, because the entrance is too far away from the center of the zone.

Function Y/N
Dynamic
Static
Scroll X
Scroll Y
Expand X
Expand Y
Bottom of zone
Center of zone
Event controlled
How scrolling works in dynamic and static camera modes
How dynamic camera modes behave

In this mode, the camera will zoom out during multiplayer if the players are far apart vertically. The largest screen size will only be used if a player is flying with a propeller suit or block. Scrolling works in all directions.

This mode is almost never used by Nintendo.

Screen Height

The screen height determines, how far the camera is zoomed in or out. This causes all objects on the screen to appear larger (zoomed in) or smaller (zoomed out).
The screen height (traditionally called zoom mode) of a zone can be configured in Zone Options. There are Dynamic Camera Zoom sprites that can change the screen height on-the-fly while traversing a zone.

The following diagram shows all screen heights and the resulting screen widths in blocks and px:

Screen Height Screen Width
Height
(blocks)
Height
(px)
Width Observed(a)
(px)
Width Rounded /4(b)
(px)
Width Calculated 16/9(c)
(px)
Width Calculated 5/3(d)
(px)
7 112 204.352005 204 199.111111 186.666667
10.5 168 306.528015 308 298.666667 280
14 224 408.70401 408 398.222222 373.333333
16 256 467.090332 468 455.111111 426.666667
17 272 496.283447 496 483.555556 453.333333
19 304 554.669678 556 540.444444 506.666667
20 320 583.862915 584 568.888889 533.333333
24 384 700.635437 700 682.666667 640
28 448 817.40802 816 796.444444 746.666667

(a): Observed with MemTool
(b): Observation rounded to the nearest multiple of 4 for Reggie screen/zone templates
(c): Width calculated using 16/9 aspect ratio
(d): Width calculated using 5/3 aspect ratio; those zone widths also used by Nintendo, even though they cause the screen to be bigger than the zone

The screen height does not influence the size of the buffer area that we can find below zone borders. It is always 64px (4 blocks) before the player dies below the zone.

Dynamic Screen Height

The camera can zoom out dynamically in Multiplayer (MP) modes if needed, but it cannot grow larger than the zone width or height.

The screen height is specified with 3 values if it is a dynamic camera mode. For example "17, 20.5, 24". Here the screen zooms out when players move away from each other. The height of the zone should be set to fit the maximum screen height, but it is also possible to set the zone height to fit only the medium screen height.

Cutoff

We've learned that screen heights are responsible for the cutoff that happens on the left and right side of a zone. Those cutoff sections are not accessible by the player, and even the camera won't move there.

Rules for cutoff:

  • No cutoff with static camera modes!
  • No cutoff with screen height 14 or below
  • All other normal (dynamic) camera modes cut off the zone on both sides, see table for values
  • Cutoff specified is valid for all screen heights, for example cutoff for screen height 19 is 72.98216, but also for screen height 14 while using "14, 19" dynamic mode
Screen Height
(Blocks)
Cutoff
(px)
Screen Height
(Blocks)
Cutoff
(px)
14 0 22 116.771456
15 14.596432 23 131.367888
16 29.193161 24
14, 19, 24
20, 24
17, 24
17, 20.5, 24
145.96432
17 43.789296 25 160.560752
18 58.385728 26 175.157184
19
14, 19
72.98216 27 189.753616
20
17, 20
87.578592 28
14, 19, 28
19, 24, 28
17, 24, 28
7, 11, 28
17, 20, 28
204.350048
21 102.175024

The picture below shows, how much of the zone is actually cut off, with respect to the selected screen height.

Calculating Screen Width from Screen Height

To calculate the screen width using the screen height, do it the following way:

5/3:
(Screen Height in Pixel) * 5 / 3
(Screen Height in Blocks) * 16 * 5 / 3

16/9:
(Screen Height in Pixel) * 16 / 9
(Screen Height in Blocks) * 16 * 16 / 9

5/3 = 1.666667
16/9 = 1.777778
Those are typical aspect ratios.

Examples:

Height 24 blocks * 16 * 5/3
= 640
Height 14 blocks * 16 * 5/3
= 373.333333
Height 10.5 blocks * 16 * 5/3
= 280
Height 21 blocks * 16 * 5/3
= 560

Zone Direction

Under Zone Options we can set the general direction of progression through a zone. This is mainly used in multiplayer mode to help the camera decide which player is "in front of" the others.

"Bias" sets the camera's preferred movement direction perpendicular to the main one. The default bias is downward or rightward. Upward bias causes more bottom-of-screen deaths and is not recommended.

Some zone directions have an additional unique effect:

Right Newly activated autoscroll sprites will start at the first path node (at or after the one specified by the spritedata) to the right of the camera's current position. With other direction values, they will always begin at the path node specified by the sprite data.
Right (upward bias)
Left
Left (upward bias)
Down SP only: The vertical zone bounds are losened slightly.
Normally, Mario is 2 blocks (32px) away from the center of the screen, keeping a bit more than 50% of approaching terrain visible. With this mode, 5 additional blocks are kept visible in front of Mario. This makes it easier for SP Mario to see the approaching terrain.*
Down (leftward bias)
Up MP only: The camera will immediately stop tracking dead players, instead of waiting for their death animation to finish first. This makes things a bit more fair for players near the bottom edge of the screen.
Up (leftward bias)

Detailed Explanation

The way the camera decides which direction to move in multiplayer mode is that it always picks one player to follow, and ignores all the others (apart from checking if it should switch to following them or not).

It picks the player based on which side of the screen they're attempting to move:

0 1 2 3 Value
0: Right: Yes Up: No Left: No Down: Yes (Priority) 0|3
1: Right: Yes Up: Yes (P) Left: No Down: No 0|1
2: Right: No Up: No Left: Yes Down: Yes (P) 2|3
3: Right: No Up: Yes (P) Left: Yes Down: No 2|1
4: Right: Yes Up: No Left: No Down: Yes (P) 3|0
5: Right: No Up: No Left: Yes Down: Yes (P) 3|2
6: Right: Yes Up: Yes (P) Left: No Down: No 1|0
7: Right: No Up: Yes (P) Left: Yes Down: No 1|2

For example, if you set zone direction to 1 (row "1" here), it'll prioritize a player moving upward at the top of the screen first. If there are none, it'll look for a player moving to the right at the right edge of the screen. If there are still none, then it'll pick someone moving left or down.

Nintendo's original idea probably was that this value would let you pick these primary and secondary directions (eight possibilities, since they're always perpendicular to each other -- also notice how half of the "value" column entries above are flipped versions of the other half). But in the final game, vertical movement is always prioritized over horizontal, so four of these settings behave nearly identically to the other four. Generally, prioritizing down instead of up is preferred (by Nintendo), because it reduces bottom-of-screen deaths. The exception is when progression actually is upward, like in towers.

Only Scroll Upwards If Flying

Prevents the screen from scrolling upwards unless the player uses a Propeller Suit (eg from 207: ? Block) or 393: Propeller Block.

This feature looks rather glitchy and is not recommended.

  • Only Scroll Upwards If Flying works in SP and MP with any Multiplayer Screen Size Adjust value except 15.
  • Screen can only scroll downwards, no matter which camera mode is selected. For X Tracking Only modes, it can only scroll horizontally.
  • Only the propeller trick can trigger upwards scrolling. That's why the zone size should match the final screen size (screen size plus additional bounds scroll size) to prevent any scrolling.

Multiplayer Screen Size Adjust

Increases the height of the screen during multiplayer mode by one block (16px) per value. Requires "Only Scroll Upwards If Flying" to be checked.

This causes very glitchy behavior if the zone is much taller than the adjusted screen height, if the screen becomes more than 28 tiles tall, or when the camera zooms in during the end-of-level celebration.

Maximum possible screen height is 28 + 14 = 42 blocks (672px). Enemies that are spawned regularly will disappear due to Sprite Appearing Behavior. Sprites spawned with the 88: Actor Spawner - Newer work somewhat better.

Bounds

Bounds are invisible locations that control camera scrolling upwards and downwards. The scrolling will automatically start, as soon as Mario enters one of those locations. In Reggie Next, the bounds locations can be made visible in Preferences. The game will try to clear Mario from the bounds locations by scrolling the screen.

The bounds feature is separated into upper bounds, which control the top scrolling location, and lower bounds.
A value of 16 alters the bounds by one full block. 8 is half a block, 1 is 1px.

The default values for bounds, which are 0 for both upper and lower bounds, work for all screen heights out-of-the-box, except for screen height 7.
Value 0 always creates bounds with the same size:

  • For upper bounds, it creates a top scrolling location with a height of 5 blocks
  • For lower bounds, it creates a bottom scrolling location with a height of 4.5 blocks

Uses

With bounds we can change the size of the scrolling locations. We can make them bigger or smaller, which in turn will trigger scrolling sooner or later. This is especially useful in vertical levels.

Please note that sideways scrolling is entirely automatic and cannot be controlled, except with the Zone Direction feature to some extend.

Bounds Values and Effect

Color Effect
Values that prevent the screen from scrolling in a certain vertical direction
This can be used as a feature, not recommended though
Has no negative effects
"Opposite" bounds should be from green group or disabled as well
Values that work, if "opposite" bounds are very small or very large
Not recommended in most cases
An absolute maximum is 2 tiles away from the opposite bounds
Good values
Using 2x values from this group is guaranteed to work properly
A good value from one type (up/down) can be extended beyond the screen center,
if the "opposite" bounds are reduced accordingly
Cause instant death upon jumping
More extreme values cause instant death upon scrolling (entering level)
Upper Bounds Values Effect Lower Bounds Values Effect
Values -177 to -32768 Prevent the screen from scrolling upwards at all Values 177 to 32767 Prevent the screen from scrolling downwards at all
Values -81 to -176 Screen scrolls only when Mario is above the screen Values 73 to 176 Screen scrolls only when Mario is below the screen
Value -80 Top edge of the screen Value 72 Bottom edge of the screen
Value -48 Good values range start (2 tiles away from top) Value 40 Good values range start (2 tiles away from bottom)
Value -24 Good values range end (vertical center of screen) Value 16 Good values range end (vertical center of screen)
Value 0 5 tiles away from the top edge of the screen Value 0 4.5 tiles away from the bottom edge of the screen
Value 32 Full screen covered with upper bounds Value -40 Full screen covered with lower bounds
Values 33 to 96 Cause instant death upon jumping Values -41 to -104 Cause instant death upon jumping
Values 97 to 32767 Cause instant death upon scrolling Values -105 to -32768 Cause instant death upon scrolling
Upper Bounds Values Effect Lower Bounds Values Effect
Values -177 to -32768 Prevent the screen from scrolling upwards at all Values 177 to 32767 Prevent the screen from scrolling downwards at all
Values -81 to -176 Screen scrolls only when Mario is above the screen Values 73 to 176 Screen scrolls only when Mario is below the screen
Value -80 Top edge of the screen Value 72 Bottom edge of the screen
Value -48 Good values range start (2 tiles away from top) Value 40 Good values range start (2 tiles away from bottom)
Value 0 Good values range end (vertical center of screen)
5 tiles away from the top edge of the screen
Value 0 4.5 tiles away from the bottom edge of the screen
Value -8 Good values range end (vertical center of screen)
5 tiles away from the bottom edge of the screen
Value 80 Full screen covered with upper bounds Value -88 Full screen covered with lower bounds
Values 81 to 144 Cause instant death upon jumping Values -89 to -152 Cause instant death upon jumping
Values 145 to 32767 Cause instant death upon scrolling Values -153 to -32768 Cause instant death upon scrolling
Upper Bounds Values Effect Lower Bounds Values Effect
Values -177 to -32768 Prevent the screen from scrolling upwards at all Values 177 to 32767 Prevent the screen from scrolling downwards at all
Values -81 to -176 Screen scrolls only when Mario is above the screen Values 73 to 176 Screen scrolls only when Mario is below the screen
Value -80 Top edge of the screen Value 72 Bottom edge of the screen
Value -48 Good values range start (2 tiles away from top) Value 40 Good values range start (2 tiles away from bottom)
Value 0 5 tiles away from the top edge of the screen Value 0 4.5 tiles away from the bottom edge of the screen
Value 32 Good values range end (vertical center of screen) Value -40 Good values range end (vertical center of screen)
Value 144 Full screen covered with upper bounds Value -152 Full screen covered with lower bounds
Values 145 to 208 Cause instant death upon jumping Values -153 to -216 Cause instant death upon jumping
Values 209 to 32767 Cause instant death upon scrolling Values -217 to -32768 Cause instant death upon scrolling
Upper Bounds Values Effect Lower Bounds Values Effect
Values -177 to -32768 Prevent the screen from scrolling upwards at all Values 177 to 32767 Prevent the screen from scrolling downwards at all
Values -81 to -176 Screen scrolls only when Mario is above the screen Values 73 to 176 Screen scrolls only when Mario is below the screen
Value -80 Top edge of the screen Value 72 Bottom edge of the screen
Value -48 Good values range start (2 tiles away from top) Value 40 Good values range start (2 tiles away from bottom)
Value 0 5 tiles away from the top edge of the screen Value 0 4.5 tiles away from the bottom edge of the screen
Value 48 Good values range end (vertical center of screen) Value -56 Good values range end (vertical center of screen)
Value 176 Full screen covered with upper bounds Value -184 Full screen covered with lower bounds
Values 177 to 240 Cause instant death upon jumping Values -185 to -248 Cause instant death upon jumping
Values 241 to 32767 Cause instant death upon scrolling Values -249 to -32768 Cause instant death upon scrolling
Upper Bounds Values Effect Lower Bounds Values Effect
Values -177 to -32768 Prevent the screen from scrolling upwards at all Values 177 to 32767 Prevent the screen from scrolling downwards at all
Values -81 to -176 Screen scrolls only when Mario is above the screen Values 73 to 176 Screen scrolls only when Mario is below the screen
Value -80 Top edge of the screen Value 72 Bottom edge of the screen
Value -48 Good values range start (2 tiles away from top) Value 40 Good values range start (2 tiles away from bottom)
Value 0 5 tiles away from the top edge of the screen Value 0 4.5 tiles away from the bottom edge of the screen
Value 56 Good values range end (vertical center of screen) Value -64 Good values range end (vertical center of screen)
Value 192 Full screen covered with upper bounds Value -200 Full screen covered with lower bounds
Values 193 to 256 Cause instant death upon jumping Values -201 to -264 Cause instant death upon jumping
Values 257 to 32767 Cause instant death upon scrolling Values -265 to -32768 Cause instant death upon scrolling
Upper Bounds Values Effect Lower Bounds Values Effect
Values -177 to -32768 Prevent the screen from scrolling upwards at all Values 177 to 32767 Prevent the screen from scrolling downwards at all
Values -81 to -176 Screen scrolls only when Mario is above the screen Values 73 to 176 Screen scrolls only when Mario is below the screen
Value -80 Top edge of the screen Value 72 Bottom edge of the screen
Value -48 Good values range start (2 tiles away from top) Value 40 Good values range start (2 tiles away from bottom)
Value 0 5 tiles away from the top edge of the screen Value 0 4.5 tiles away from the bottom edge of the screen
Value 72 Good values range end (vertical center of screen) Value -80 Good values range end (vertical center of screen)
Value 224 Full screen covered with upper bounds Value -232 Full screen covered with lower bounds
Values 225 to 288 Cause instant death upon jumping Values -233 to -296 Cause instant death upon jumping
Values 289 to 32767 Cause instant death upon scrolling Values -297 to -32768 Cause instant death upon scrolling
Upper Bounds Values Effect Lower Bounds Values Effect
Values -177 to -32768 Prevent the screen from scrolling upwards at all Values 177 to 32767 Prevent the screen from scrolling downwards at all
Values -81 to -176 Screen scrolls only when Mario is above the screen Values 73 to 176 Screen scrolls only when Mario is below the screen
Value -80 Top edge of the screen Value 72 Bottom edge of the screen
Value -48 Good values range start (2 tiles away from top) Value 40 Good values range start (2 tiles away from bottom)
Value 0 5 tiles away from the top edge of the screen Value 0 4.5 tiles away from the bottom edge of the screen
Value 80 Good values range end (vertical center of screen) Value -88 Good values range end (vertical center of screen)
Value 240 Full screen covered with upper bounds Value -248 Full screen covered with lower bounds
Values 241 to 304 Cause instant death upon jumping Values -249 to -312 Cause instant death upon jumping
Values 305 to 32767 Cause instant death upon scrolling Values -313 to -32768 Cause instant death upon scrolling
Upper Bounds Values Effect Lower Bounds Values Effect
Values -177 to -32768 Prevent the screen from scrolling upwards at all Values 177 to 32767 Prevent the screen from scrolling downwards at all
Values -81 to -176 Screen scrolls only when Mario is above the screen Values 73 to 176 Screen scrolls only when Mario is below the screen
Value -80 Top edge of the screen Value 72 Bottom edge of the screen
Value -48 Good values range start (2 tiles away from top) Value 40 Good values range start (2 tiles away from bottom)
Value 0 5 tiles away from the top edge of the screen Value 0 4.5 tiles away from the bottom edge of the screen
Value 112 Good values range end (vertical center of screen) Value -120 Good values range end (vertical center of screen)
Value 304 Full screen covered with upper bounds Value -312 Full screen covered with lower bounds
Values 305 to 368 Cause instant death upon jumping Values -313 to -376 Cause instant death upon jumping
Values 369 to 32767 Cause instant death upon scrolling Values -377 to -32768 Cause instant death upon scrolling
Upper Bounds Values Effect Lower Bounds Values Effect
Values -177 to -32768 Prevent the screen from scrolling upwards at all Values 177 to 32767 Prevent the screen from scrolling downwards at all
Values -81 to -176 Screen scrolls only when Mario is above the screen Values 73 to 176 Screen scrolls only when Mario is below the screen
Value -80 Top edge of the screen Value 72 Bottom edge of the screen
Value -48 Good values range start (2 tiles away from top) Value 40 Good values range start (2 tiles away from bottom)
Value 0 5 tiles away from the top edge of the screen Value 0 4.5 tiles away from the bottom edge of the screen
Value 144 Good values range end (vertical center of screen) Value -152 Good values range end (vertical center of screen)
Value 368 Full screen covered with upper bounds Value -376 Full screen covered with lower bounds
Values 369 to 432 Cause instant death upon jumping Values -377 to -440 Cause instant death upon jumping
Values 433 to 32767 Cause instant death upon scrolling Values -441 to -32768 Cause instant death upon scrolling

The effects for all values from the top of the table down to value 0 are the same for all screen heights. Meaning the yellow group always has the same values/effects, the first blue group, and the green group down to value 0. It's slightly different for screen height 7 and 10.5, though.

After that comes the center of the screen, which is already variable and depends on the screen height.

Setting both bounds to screen border
Value -80 up|72 down always creates a bounds location with a size of 0 blocks from top border|0 blocks from bottom border for any screen height. The game will only scroll, if Mario is touching the top or bottom screen border.

Setting both bounds to center of screen
32 up|-40 down (screen height 14), 56|-64 (screen height 17), 80|-88 (screen height 20), 112|-120 (screen height 24), and 144|-152 (screen height 28) force the camera to scroll at any time. The bounds locations both reach all the way to the vertical center of the screen. Check out the table above for the other screen heights.

It's also possible of course, to fill up the entire screen with bounds, but with a different distribution of upper and lower bounds (70% upper and 30% lower bounds for example).

Dynamic Camera Zoom

There are a few Dynamic Camera Zoom sprites that can be used in a level. Those sprites are:

  • 206: Zoom Controller
  • 149: Rotation Controller - Spinning

We'll also be looking at other ways the camera will zoom, for example the level intro animation.

Zoom Controller

This sprite can be used to temporarily alter the screen height.
Placing this sprite creates a rectangular location with a user-defined size. The camera will zoom in/out to the specified value, while Mario is in this location. All screen heights that we already know and that can be used zone-wide are available.

Please make sure the zone is large enough for the zoomed screen height!

For further information, see #####Level Editing How-To's: Zoom Controller

Rotation Controller

The spinning rotation controller can also be used to change the screen height on-the-fly.

Place a 149 into the level, and activate the flag Controls the Zone's Zoom Level. When enabled, the zone's zoom level will become fully dependant on the rotation controller's current angle. Thus, the camera will transition in accordance with the speed and current arc of the sprite. It supports all rotation modes, but works best with Stops and Returns. Don't forget to asign a rotation ID, as this is required.

This is the pattern the zoom level will follow:

  • 0° = Zooms to the zone's original screen height
  • 22.5° = Zooms out roughly to the next available screen height
  • 45° = Zooms out roughly 70% towards screen height 28
  • 67.5° = Zooms out roughly 95% towards screen height 28
  • 90° = Zooms out exactly to screen height 28
  • 112.5+° = The pattern above loops in reverse, ultimately back to the original screen heightat 180°

The animation/transition speed depends on the rotation speed of sprite 149.

Having this function enabled and activated at level start will prevent the initial zoom and will start with the selected screen height from the rotation controller right away.

Further information: #####Level Editing How-To's: Rotation Controller

Level Intro Zoom

The camera will have a screen height of 14 blocks at the start of the level. It will then zoom out (or in) to the selected screen height. No zoom for levels with screen height = 14 blocks, obviously. Some entrance types (check type 1?), area settings (credits/ambush), or sprites (149: Rotation Controller) with certain settings can prevent the initial zoom animation and start the level with the selected screen height directly.

Visibility (Spotlight)

Certain visibility modes can be chosen for the current zone. They range from full visibility to absolute darkness.
It's not possible to change the visibility while in a zone (only zone-wide).
The following modes are available:

  • Normal (Hidden): The screen is bright. Mario is behind layer 0 tiles. No spotlight will be shown.
  • Normal (On Top): The screen is bright. Mario is in front of layer 0 tiles.
  • Layer 0 Spotlight (Small/Large/Extremely Large): The screen is entirely bright. Mario is behind layer 0 tiles and a small/large/extremely large spotlight is shown.
  • Full Darkness (Lightbeam): The screen is entirely dark. Only a beam of light shines on Mario. The spotlight changes direction with Mario. Mario is also behind layer 0 tiles.
  • Full Darkness (Small/Large Foglight): The screen is entirely dark. Only an irregularly-sized blob of light surrounds Mario. Mario is also behind layer 0 tiles.
  • Full Darkness (Small/Large Focus Light): The screen is entirely dark. Only a circular blob of light surrounds Mario. This light grows with increased movement speed, and shrinks back to normal when standing still. Mario is behind layer 0 tiles.
  • Full Darkness (Absolute Black): The screen is entirely dark. Only a few sprites can break the darkness. Mario is behind layer 0 tiles.

Scroll Limiter

There's one group of sprites that can be used to alter the zone height and width at certain places. This allows to cut out junks of the zone that are not needed.
These sprites are called scroll limiters. There is always a left and right limiter and they must be used together for this function to work properly.

The top boundary is the same as the regular zone border: The camera won't scroll there, but Mario can climb up to 8 blocks into the void.
The bottom boundary is deadly for the player. The same rules apply as the regular zone border.

  • For the left side, use 162: Vertical Scroll Limiter 1 - Left Side (or 164: Vertical Scroll Limiter 2 - Left Side)
  • For the right side, use 163: Vertical Scroll Limiter 1 - Right Side (or 165: Vertical Scroll Limiter 2 - Right Side)

Uses

  • Can cut out unneeded parts of the zone. This is especially useful with an ascending or descending stage. In such a level, it might take a long time for Mario to reach the bottom zone border in case he falls down. Sometimes it's also useful to cut out unnecessarily tall parts of the zone in sections where it's not needed.
  • Can create multiple single-screen-rooms from one big zone, with or without scrolling.
  • Can create hidden parts of a zone (see link below).
  • Can create "Zelda-like" screen scrolling (see link below).
  • Can create a buffer area for enemies that would not load properly without it. Many enemies, if placed too high above the zone border, will not load. Scroll limiters can be used to prevent this.

For further information, see #####Level Editing How-To's: Scroll Limiter

Sprite Loading Behavior

Please see Sprite Loading Behavior in Areas for area-wide loading behavior.

Sprites inside or close enough to zones are usually loaded into memory at area start.

Pairs of sprites, for example a rotation controller and rotation controlled objects, are bound to the zone that contains the controlled objects, even if the controller is far outside the zone.

There is a group of sprites that is always active in the entire area, even if they are placed far outside zones. Event controllers, for example, will influence events in every zone. The same is true for Bosses and various controllers. To prevent this from happening, an empty zone can be created and the respective sprites placed inside.

The typical loading radius for most common sprites is 8 blocks above and below the zone, and 1 block to the left and right of it.

Actor Spawners are special in that regard: They must be placed inside a zone to work, or at least touch the zone border. Also see Zone Specifications and Limitations.

Sprite Appearing Behavior

All actors/sprites use an array of settings that controls, at which distance to the player they should load into the level and start moving.

Sprites will show up in a level roughly one block before they are actually visible on-screen! This is the case for most normal enemies. It allows the level designer to create predictable enemy jumps and other things.

Imagine Mario walking/running to the right in a level. Every enemy/sprite will start its movement, as soon as it is closer than 1 block from the right edge of the screen. This guarantees that the position of the enemy is pretty much the same in the level editor and when playing the level for real.
If Mario walks forward really, really slowly, then he can trigger the movement of an enemy before it is seen on-screen. The enemy will then enter the screen after a short amount of time.

Other sprites, especially those linked to path/movement/rotation controllers, other controllers, paired or grouped sprites, bosses, etc., are always active or have a larger loading radius.
Big or resized enemies can cause problems, especially if they are much larger than normal. They are loaded too late and we can see how they appear on the screen; they plop into existence. That happens because the origin of the sprite is less than one block away from the screen border, yet due to their size the sprite can't load entirely outside the screen.

Rendering

Zone Theme

Changes the way models and parts of the background are rendered (for blurring, darkness, lava effects, and so on).

Certain zone themes may have additional affects. For example, when "Ghost House" is selected, blocks with items jumping out of them make a Boo laugh.

Note: Settings with an asterisk appear to look the same as "Overworld".

Terrain Lighting

Changes the way the terrain is rendered. It also affects the parts of the background which the normal theme doesn't change.

More information about lighting can be found here: Lighting

Audio

Here we can set the background music that should play in our zone. We can choose from the available song IDs. For custom music, see Custom Music.
Sound Modulation changes the sound effect modulation in that zone.
Boss Flag is needed by boss fights to allow proper music switching via sprites.

Music can not be changed in zones, only when transitioning to another zone. There are a few actors though, that can make music switching possible. This usually comes with a few side effects or glitches. To do this, a STRM_BGM entry needs to be selected in sprite 332: Sound/Graphic Effects Spawner - Newer.

Cutscene or boss controllers will automatically switch the music if needed. Other sprites can do that, too, for example the goal flag, the chest, the Ambush or Toad controllers etc...

Zone Specifications and Limitations

Zone Specification Description
Number of Zones per Area 6 (some report 6-9 working zones). More can always be created, if they share the same settings in Zone Options. Especially important is Lighting and Audio in that regard.
Creating more than 6-9 zones with varying Zone Options will cause glitches. Please note that the settings of the last valid zone will be duplicated, if there are more than the limit.
There are a few techniques that allow us to create virtual zones within the bounds of a real zone. For example, we could separate two playable sections by distance by creating a sufficiently large gap or wall between the sections. We could also use the Scroll Limiter sprites to create virtual zones.
Max Zone Size Zone sizes are added together in an area. The addition of the size of all zones in an area must not exceed the limit value!!

Zones can be slightly larger if they are placed close to the canvas border, or relatively close to each other.

Possible zone sizes
10,000 x 1504px
1504 x 8192px

Max possible square:
3584 x 3584px (224 blocks)
Min Zone Size 300 x 200px
Size not recommended. Only working screen height = screen height -2.
It is highly recommended to make the zone larger than that.
Min Distance from Canvas border 16px (not recommended)
Recommended Distance from other Zones and Canvas Border 256px (16 blocks)
This is also highly recommended. Sprites may not load or function properly if zones are placed too close to each other.
Max Liquids Size (Animated Crest) 8192px
If a location for a liquid is bigger than that, the animated crest of that liquid will disappear.
Max Location Size
(for Liquids, Clouds etc...)
4352 x 4352px (272 blocks squared)
Bigger is possible but not recommended.
Max Loading Distance
(Player, Sprites, Locations, Paths, Entrances)
Player: 8 blocks above zone, 2-4 blocks below zone, 1 block left/right of zone border.

Sprites
Normal Enemies, all Effects, Clouds: 8 blocks above/below, 1 block left/right.
Actor Spawners: 1 block in each direction.
Paired/Grouped Sprites, Bosses, Controllers, Cutscene, etc: Always active. Belongs to closest zone or all zones, if placed too far outside a zone.
Event Controllers: Always active. Belongs to closest zone or all zones, if placed too far outside a zone.
Use empty zones for sprites that are required to load other sprites, but which shouldn't interfere with other sprites.

Locations: 8 blocks in each direction. Sprites controlling the location content, for example Clouds, need to be placed according to Sprites rules.
Paths: Should be kept inside zones (for autoscroller etc). Can be placed at least up to 8 blocks in each direction.
Entrances: 8 blocks above/below, 1 block left/right (has to touch zone border).

Zone Options

Zone Options allow us to configure each zone individually.
Let's go through all the entries one-by-one.

  • Tabs at the top of the dialogue

Each zone is represented with a tab. Here we can select, which zone we want to configure.
No zone/tab will be available for a new level.
To add a new zone, press the New button at the bottom of the dialogue. This will automatically create a new tab.
To delete a zone, press the Delete button. This will delete the currently selected zone and its tab. All subsequent zones will decrease their zone ID by 1.

Here we can set the position and dimensions of a zone.

  • Preset

Allows to select a preset for zone dimensions with common zone sizes.

  • Snap to 8x8 or 16x16 Grid

Snaps the zone borders to the grid, either to any full-block value (16x16), or to any half-block value (8x8). This is recommended for new zones that don't need to have a specific size.

This lets us configure the rendering and camera settings for the current zone. The following settings are available:

With those settings we can configure the invisible scrolling location.

In the last section we can set the parameters for the background music and the sound modulation.

  • Background Music ID ranges from 1-27 for NSMBW songs, and from 100-157 for Newer songs. To add custom music, see Custom Music.
  • Sound Modulation changes the sound effect modulation.
  • Boss Flag is needed to allow proper music switching by sprites.