Everything you'll ever need to know about empty voids.

This tutorial is meant to help you design levels in Super Mario Bros. X. It describes in greater detail how the edges of screens behave in the game and how best to work with them.

First, we’ll look at how to adjust screen edges. Each level section starts as a single-screen block. It’s 25 tiles wide and 18¾ tiles high. Pressing any of the arrow keys will move the screen and reveal its edges. They’re the gray empty void surrounding everything.

The top of block 19 gets cut off at standard size. In the level settings window, you can pick which side of the screen to adjust.

For as long as the glove cursor is yellow, you’ll adjust the selected side when you click. You can’t make it smaller than the single screen you start with, but you can make it larger by expanding in any direction. You’ll expand by clicking in the void beyond your selected boundary, or shorten it by clicking inside it. For example, if you select the Top Boundary, you can make the level taller by scrolling up and clicking. Scrolling back down and clicking in the level’s region will shrink it again. It automatically stops if you try to shrink it below standard screen-size. Right clicking will return the cursor to normal.

You can fit the 19th block into the region this way, but the screen will move up a little when Mario jumps. If you shrink up the bottom boundary afterward, the bottom block will be partially cut off instead.

You can expand your level to almost any size you want, but keeping the stage smaller is advisable. If the screen area is too big, the level may lag on weaker computers, and some backgrounds can’t stretch much in certain directions. You’d be better off splitting the stage into multiple sections.

Semi-related tutorial: SMBX: Potion Doors

Next, we’ll cover how SMBX registers objects in the off-screen space. When an NPC wanders off-screen, it’s not persistent there. It eventually reaches a point where the game despawns it. This varies from NPC to NPC, but for the most part, the limit is just four tiles.

This Goomba would wander back on-screen after hitting the block in the void. If the block were one tile to the left, the Goomba wouldn’t return. The shell, however, would bounce back even if the block was much further away. Item NPCs have persistence priority in SMBX.

Enemies that go off the side or top of the screen are despawned by SMBX. If they fall off the bottom, however, the game registers them as dead, and they won’t come back if you leave and return to the same place. Important items like keys and springboards always come back, though.

Sometimes, the player may hit a block at the level’s start and have their mushroom zip off the side of the screen before they can get it. It’s courteous to the player to place a block in the void to return their lost shroom to them.

The screen sides are a little more important for Mario than they are NPCs, since falling off the bottom costs him a life. Mario can’t cross the left or right boundaries unless certain conditions are met, but he can always go off the top of the screen. Doing so can let him jump or fly over obstacles below. He can also move underneath objects from the bottom of the screen, but doing so is dangerous on the player’s part.

This can be bad if you don’t want the player to just blow through your level. Luckily, there’s a way to control where they can and can’t go off-screen.

Here, we have a bottomless pit and a pipe going into the sky. We wouldn’t want the player to fly underneath the ground (possible with a blue shoe) or go over the pipe. Extending the pit wall low enough is easy since the player would die before they ever got below the wall, but how high must the pipe be extended to stop Mario flying over it? The answer is simple, and actually the same for both the top and bottom of the screen: 33 pixels. Anything solid extended greater than 32 pixels into the top or bottom of the screen counts as an impassable wall in SMBX.

Okay, we’re good now, right?

WRONG. The wall needs to be greater than 32 pixels in height. It’s hard to believe, but flying boot Mario could still get under that block and fly beneath the level.

There, now he’s boned! SMBX treats the cliff as having impassable walls now, so even if Mario didn’t die from going down that far, he still wouldn’t be able to get under the blocks.

Oh, but what now? That sneaky plumber thinks he can take his leaf and just soar over everything you worked so hard to make! Well, he’s got another thing coming!

There, that’s…actually, no, that’s the same problem we had with the cliff before! The wall’s only 32 pixels high, so Mario could fly right over it! UGH. Hold on…

There we g-

…well, okay, the pipe’s crooked, but there’s no way Mario can get over it now. He could land on that little nub on the left, but he couldn’t go any further even if he flew as high as possible. Incidentally…

The top of the pipe is still flush with the top of the screen, since we adjusted the screen top earlier to include all of block nineteen. If you lower the screen top again by just that little bit…

Haha, we’ve got it now! That little quarter-of-a-block is enough to make the wall too high to surmount. Remember, it only has to be 33 pixels or higher, so once again, Mario could land on our left-side nub, but the off-screen pipe is impossible to go above.

So, about cliffs that end in angles…

It’s unintuitive for an angled cliff to drop off sharply like this. It’s better to do something like the following:

There, now the cliff isn’t so misleading. It’s also a tile smaller than it was, so you may need to back up your slope, or even just avoid such an instance entirely. Do what’s best for the level you’re making.

Now, you may recall that Mario can only go off the screen sides under certain conditions. Well, those conditions are when level wrap is in effect or off-screen exit is enabled. The former of those creates the Pac-Man effect, where leaving one screen side puts you on the other, and the latter ends the level when Mario goes off-screen. For level wrap, you need some blocks off-screen to make it work correctly.

When level wrap is working, the game can register Mario one tile into either screen side, meaning nothing more than one tile off-screen isn’t registered.

Mario will never collide with the wooden block off-screen. However, NPCs like the shell will, so it’s best to avoid confusion and remove any unnecessary blocks from off-screen; at least when you’re using level wrap.

Normally, when Mario crosses one screen’s boundary, he immediately teleports to the other side, and there’s no risk of him falling down the crevice formed by the lack of off-screen blocks.

This crevice, as it were. Pictured here is the best way of how to imagine level wrap works. Mario is normally unaffected by this, as the game will zip him from one screen side to the other without incident. However, NPCs can still fall down this hole, and cliff-turning enemies will walk back instead of crossing over. Furthermore, you could run into this:

If Mario tries to enter the screen from the left, he’ll bump into this on-screen block on the right. He’ll still get far enough to teleport to the right side of the screen, though, so guess what? Without a block underneath him, he’ll fall to his doom. That’s no good!

There, now if he runs off the left screen and hits the obstacle on the right, he’ll have a block underneath him to save him from falling.

This would also work. If Mario tries to go off to the left, he’ll bump into the off-screen block on the right and fail to teleport as a result.

So, to safely use level wrap, make sure you include off-screen blocks to complete the ground. Just be careful of elevation changes between the screen sides. It’s best to keep things flat for simplicity’s sake.

As one final note about screen sides, be careful when you make sections that are completely underwater.

Like this. If Mario can swim anywhere, he’ll be able to swim under and over things just as if he were wearing a blue shoe in a normal stage. Make good use of off-screen blocks to stop him from swimming under or over everything. This is one case where blocking the sky completely may be wise.

What now, plumber?!

Hopefully, this guide has helped you better understand SMBX’s handling of screen sides and how to foolproof your levels so they work properly. Now get out there and stop Mario from cheesing his way through life!


Pages: 1
I am Pyrdoom, Hedgehog of Fire and the Time Controller.
I have never had trouble with screen-wrap before, so I don't think this would be an issue, but when you were speaking about screen-wrap and offscreen exit, I was getting extremely confused.
I tweaked it a little to make it more clear. I don't think those two features can work at the same time.
The 524 is for 524 Stone Crabs
Great tutorial, dude! I think I have to look back on some of the levels I made now. O_O

By the way, how do you expand the gray borders by pixel? The default always expand it by 32 pixel, or per tile.
Man, would it be convenient if you could. Sadly, no, you can only expand it by full tile amounts, or the quarter-tile that completes block 19. If there's a way to do it pixel perfect, I'm unaware of it.
The 524 is for 524 Stone Crabs
Wait, then how did you get those blocks to fully display in your third screenshot without the cut-off?
from halibabica
you can only expand it by full tile amounts, or the quarter-tile that completes block 19.
The 524 is for 524 Stone Crabs
Ooooh sorry. :(
It is impossible in SMBX to making expanding platforms?
from thiagoferreira
It is impossible in SMBX to making expanding platforms?

Technically, no. You could make the illusion of an expanding platform with layer and movement shenanigans, but this isn't really the place to ask.
that dude is a spam bot. beware any username that starts with thiago, and ignore
I suspected as much, since every post it makes is the same, but asking about some other aspect of SMBX. I thought maybe it was some poor foreign shmuck who just really didn't know any better.
It's impossible in SMBX to making Turn Block Bridges from Super Mario World?
that dude is a spam bot. beware any username that starts with thiago, and ignore

No, i am not a spam bot!
"I used to think it was ketona, without the first n, and that you were a girl"
then why are you spamming?
My God, is that a Thiago post that isn't phrased in the form of a random SMBX question?

I thought it is impossible in Thiago to making post not of random question?
that dude is a spam bot. beware any username that starts with thiago, and ignore
No, i am not a spam bot!

Yes, you are. Now at version 2.0 you seem to have the ability to speak more like us. I'm not fooled for a second.
Pages: 1