Screen Refusing to Scroll

Hello! I am in scrolling platformer module, and I've run in to an issue... there are some levels in the game that when you get to the end, you go down into a pit and there's a second part to the level that goes left. Up until now, this has not caused any issues, but for some reason, now when you're dropped down, after getting to the very edge of the screen, some kind of seemingly invisible barrier blocks the screen from scrolling any further. Needless to say, this is a huge issue for the game as it cuts many levels in half. Does anyone know what this could be caused by or how to fix it? Thanks in advance!
 

Mugi

Member
scrolling to left direction is extremely broken in the vanilla nesmaker engine and doing that will make you amongst other things run into all sorts of invisible walls depending on what actually exists at the right side of the screen.
the map is not actually a square of 16x16 screens though, instead, the map is a sequential corridor that is 256 screens long. when you get to the last screen of a row on the map, the next screen to the right will be the first screen of the next row.
you can simply make your stages longer in a horizontal direction instead of jumping down and going to left if that is an option for your game.

alternatively, jorotroid shared a module somewhere in the archive subforum that is capable of actually scrolling into 2 directions, but moving your game into a new module will propably require you to rework a lot of things.
if scrolling is important for you though, it might be worth the effort, since you wont be getting really far scrolling in left direction or 2 directions with the vanilla engine, it's sole purpose is to have a SMB style one directional scroll to the right.
 

Dirk

Member
I have a similar problem when I backtrack in my levels. I my case it is only a one block high invisible area so I can jump over it. Is yours the height of the whole screen?
I have scroll left and right activated which is known to be glitchy. Do you have only right or left set in your individual screens?
 
Dirk said:
I have a similar problem when I backtrack in my levels. I my case it is only a one block high invisible area so I can jump over it. Is yours the height of the whole screen?
I have scroll left and right activated which is known to be glitchy. Do you have only right or left set in your individual screens?

The height of mine is the whole screen, and I only ever have either L or R scrolling activated on a screen.
 
Interestingly, it seems not to be an issue with scrolling. I just disabled all scrolling on the screen and the barrier is still there...
 

Dirk

Member
When you click on the "collision" button in the level editor in the problematic screen, are the collisions set correctly or is there a column of "01" which stands for "solid"?
That's probably not your problem, but worth a shot.
 

Mugi

Member
the bug in question is in the collision code and it's related to the wrapping of nametables. Basically your invisible wall appears when the rightmost tile in your screen is a solid tile, and it's collision data is registered on the left side
because of how the screen and screen attributes wrap. there is a fix for it somewhere in the forum, but that fix only fixes the issue for the non-scrolling module (even if you dont use scroll in the scrolling module, the bug is still there.)
 
Mugi said:
the bug in question is in the collision code and it's related to the wrapping of nametables. Basically your invisible wall appears when the rightmost tile in your screen is a solid tile, and it's collision data is registered on the left side
because of how the screen and screen attributes wrap. there is a fix for it somewhere in the forum, but that fix only fixes the issue for the non-scrolling module (even if you dont use scroll in the scrolling module, the bug is still there.)

I know what you're talking about; I've had to deal with that in Adventure Module games, but that's not it. I tried making the tiles on the far right null walkable which should fix it if it were that, but it did nothing.
 
Dirk said:
When you click on the "collision" button in the level editor in the problematic screen, are the collisions set correctly or is there a column of "01" which stands for "solid"?
That's probably not your problem, but worth a shot.

I wish it was as simple as that, but sadly, no... I checked that pretty much before anything else and all is set up correctly.
 
I just noticed it's also happening on the screen above; so not only is this not a scrolling issue, it's not a screen issue either. It's happening on the entire vertical line.
EDIT: It's also happening in both the overworld and the underworld.
 

Mugi

Member
making the right edge tiles walkable fixes it is SOME cases. not all.
it's a bit more involved than just an edge wrap in it's entirety and its really a sum of a lot of things. On one hand, it's related to collision, on the other hand it's related to wrapping of attribute tables,
and thirdly it's related to the actual reason why the nametables wrap as they do, which is camera movement. Thats why the posted fix seemed to fix it for the noscroll module, because the noscroll module doesnt deal with the camera
the same way scrolling modules do. (a simple extra check in those cases allowed the problem to more or less 100% vanish.)

This bug got a little better in my own project since the camerahandler is rewritten and it now correcly centers itself, preventing the edge wraps in some cases, but even so, it is still there,
and its the main reason why my project will eventually get the collision engine completely rewritten. This one can be band-aided with lots of band-aids but at the end of the day, might as well get it solved for good.

as far as coming up with a quick solution, no idea really, I'm more or less ignoring it for the time being until we get to properly dig into the root cause and see what has to be done in order to solve it the proper way.

there is a way to manipulate the occurrence of it to an extend by messing with the player speed, acceleration, and the scroll padding values though, which also further confirms the root cause.
if you set your player speed / scroll pad ratios in such a manner that the camera always moves a set amount of pixels and will never "go over" the edge (depends on movement speed and acceleration values) then the table will not wrap
and you wont have an invisible wall.

as for why the walls appear regardless of if the right edge is solid or not, it's because when you start scrolling left, the scroll buffers up half a screen worth of level data outside of the camera, and the moment it needs to pull more, unless you are dead-centered with your camera, it will pull the overflow column from the right edge (half a screen outside of the camera to the right if my memory serves me) and whatever happens to be there at that particular moment, will appear to the left nametable.
 
Mugi said:
making the right edge tiles walkable fixes it is SOME cases. not all.
it's a bit more involved than just an edge wrap in it's entirety and its really a sum of a lot of things. On one hand, it's related to collision, on the other hand it's related to wrapping of attribute tables,
and thirdly it's related to the actual reason why the nametables wrap as they do, which is camera movement. Thats why the posted fix seemed to fix it for the noscroll module, because the noscroll module doesnt deal with the camera
the same way scrolling modules do. (a simple extra check in those cases allowed the problem to more or less 100% vanish.)

This bug got a little better in my own project since the camerahandler is rewritten and it now correcly centers itself, preventing the edge wraps in some cases, but even so, it is still there,
and its the main reason why my project will eventually get the collision engine completely rewritten. This one can be band-aided with lots of band-aids but at the end of the day, might as well get it solved for good.

as far as coming up with a quick solution, no idea really, I'm more or less ignoring it for the time being until we get to properly dig into the root cause and see what has to be done in order to solve it the proper way.

there is a way to manipulate the occurrence of it to an extend by messing with the player speed, acceleration, and the scroll padding values though, which also further confirms the root cause.
if you set your player speed / scroll pad ratios in such a manner that the camera always moves a set amount of pixels and will never "go over" the edge (depends on movement speed and acceleration values) then the table will not wrap
and you wont have an invisible wall.

as for why the walls appear regardless of if the right edge is solid or not, it's because when you start scrolling left, the scroll buffers up half a screen worth of level data outside of the camera, and the moment it needs to pull more, unless you are dead-centered with your camera, it will pull the overflow column from the right edge (half a screen outside of the camera to the right if my memory serves me) and whatever happens to be there at that particular moment, will appear to the left nametable.

I think I was wrong about it being a scrolling issue, because it apparently happens on every (far right) screen on both overworld & underworld, and it seems to happen even before the screen scrolls at all (also it happens even if scrolling is disabled altogether).
 

dale_coop

Moderator
Staff member
FormulaFanboy
It’s a bug from the 4.1.5 itself. The edge collision is not correctly detected.
This issue was actually fixed in the 4.1.1 via a patch. But who knows why, not included in the 4.1.5.
The batch is still downloadable here
http://joshuafallon.com/nesmaker/?fbclid=IwAR1ZQaSV0CURv4vQv02i6BcKAM2u8zTpvwXfeye5uCeubdqc7lNThc2drnc

Install it via the menu “Project”, then “Run Project Script”.
 
dale_coop said:
FormulaFanboy
It’s a bug from the 4.1.5 itself. The edge collision is not correctly detected.
This issue was actually fixed in the 4.1.1 via a patch. But who knows why, not included in the 4.1.5.
The batch is still downloadable here
http://joshuafallon.com/nesmaker/?fbclid=IwAR1ZQaSV0CURv4vQv02i6BcKAM2u8zTpvwXfeye5uCeubdqc7lNThc2drnc

Install it via the menu “Project”, then “Run Project Script”.

It's telling me that it already exists, should I overwrite it?
 

Attachments

  • v.png
    v.png
    6.1 KB · Views: 819
dale_coop said:
FormulaFanboy
It’s a bug from the 4.1.5 itself. The edge collision is not correctly detected.
This issue was actually fixed in the 4.1.1 via a patch. But who knows why, not included in the 4.1.5.
The batch is still downloadable here
http://joshuafallon.com/nesmaker/?fbclid=IwAR1ZQaSV0CURv4vQv02i6BcKAM2u8zTpvwXfeye5uCeubdqc7lNThc2drnc

Install it via the menu “Project”, then “Run Project Script”.

Okay, I applied the patch, but the issue still persists... now what?
 

dale_coop

Moderator
Staff member
Now, as Mugi said... it might be an issue in the scrolling engine. So try to design your screens wisely (don't put any solid/death/particular tile near the edges of the screen), and it should work almost correctly.
You could also use jorotroid scrolling core. Or wait that someone fix the whole engine... or wait for the 5.0.
 
dale_coop said:
Now, as Mugi said... it might be an issue in the scrolling engine. So try to design your screens wisely (don't put any solid/death/particular tile near the edges of the screen), and it should work almost correctly.
You could also use jorotroid scrolling core. Or wait that someone fix the whole engine... or wait for the 5.0.

Well unfortunately for me, I've already completed designing all the levels... however, for the sake of experiment, I will try removing all the specific tiles from the edge, and see if it does anything. It would really suck if this was truly the only fix for this issue... I really hope it isn't something with the engine. Thanks so much for all the help.
 

dale_coop

Moderator
Staff member
Sorry to say that, but it IS definitely an issue with the engine. We all know that (even Joe knows that).
We just need to find workarounds
I think Mugi fixeed a lot of those issues when he re-wrote the scrolling engine for his game.
 

Mugi

Member
dale_coop said:
Sorry to say that, but it IS definitely an issue with the engine. We all know that (even Joe knows that).
We just need to find workarounds
I think Mugi fixeed a lot of those issues when he re-wrote the scrolling engine for his game.

not all of them but the rewrote of the camera handler and the NT/AT load routines did fix all the pertaining issues to incorrect tile and attribute loads.
my game still has this "invisible wall issue" as it requires a collision rewrite and some additional work regarding the way wrapping of tables happens.

it's a really deeep rooted problem with the basic mechanics of how the scroll is written and how it interacts with the collision and byt all means, I doubt it can be fixed at all using workarounds. It will simply require the whole thing
to be redesigned.

I'll be glad to be proven wrong though :p
 
Top Bottom