Pages: 1
Posted on 11-24-12, 11:44 pm (rev. 1 by ImageBot on 11-21-16, 02:34 am)


Karma: 8
Posts: 5/8
Since: 11-16-12
Hello.

I'm having a strange problem with the camera in NSMB. (I'm always having trouble with the camera, really. -.- )



As you can see, in this area of the level, when I jump up the camera scrolls to the right and then comes back when I land. I didn't screenshot this, but there are three coins floating one block above the hill that Mario is standing on in the picture.

Is there any way around this? Because the camera seems to do whatever it wants. It also seems to stop scrolling entirely when there are no blocks ahead and only sprites, or when there are no blocks ahead for a few miles.

Is there any way at all to stop it from doing this or do I have to just leave it the way it is?
Posted on 11-24-12, 11:57 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10010
Posts: 2908/4457
Since: 06-08-11
It's probably the "panning blocks" thing that's causing it.

The editor displays a grid of 16x16 blocks. If one of these blocks is empty (It has no objects. Sprites don't count) then the camera will not scroll into it.

There's a transparent object in Tileset 0 you can use to stop this behavior. Original NSMB levels do this. See 1-3 for example. Everything above that level has one square of it.
Posted on 11-25-12, 12:03 am


Karma: 8
Posts: 6/8
Since: 11-16-12
Alright, I tried that and it seems to work perfectly. Thanks for the help!

But what about when I have an object close to the top of the camera as shown in the two pictures? Is there any way to fix that? I also have an area in that level were there's a hidden 1-UP block just on top of the view, and this causes the camera to move to the right when I'm close to that block. (this has happened a lot in my levels)
Posted on 11-25-12, 12:08 am
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10010
Posts: 2909/4457
Since: 06-08-11
It's also caused by empty blocks.
If mario gets on a 16x16 block that's next to an empty block, the camera will "pan away" from the empty block, and it'll move sideways. Even if these blocks are offscreen or half-offscreen.

It's kind of buggy/weird behavior, but the solution is nearly always to place that object in nearby empty blocks.
Posted on 11-25-12, 12:11 am


Karma: 8
Posts: 7/8
Since: 11-16-12
Aha! Your advice worked. I placed those invisible blocks in the top-left corner of all the empty blocks and now the camera is not moving away anymore.

Thank you for the help! It's very appreciated.
Pages: 1