Help w/ Weird Tile Collision Issue

slk7

New member
Hi,
I am working with the scrolling core in 4.1.5 with the following two modifications from this forum (in case it matters):

Jump On Hurts: http://nesmakers.com/viewtopic.php?f=40&t=1972&start=10
Fixing Ignore Gravity: http://www.nesmakers.com/viewtopic.php?f=35&t=1939&start=10

My project is a 1-way scrolling with scroll to the right only. I seem to be experiencing an issue where near the left side of the screen, the collision data may be stale with data from the previous screen after scrolling has occurred, even though the player is not scrolling in that direction.

The most obvious way that I've noticed this has been to put death spikes near the left side of the screen on one screen, and then something to mark the left side of the next screen like a prize block. If I walk past the start of the prize block so that I've scrolled into the next screen, and then turn back and walk left, then even though the game has not moved the camera, my player will die from the death spikes that were at that position on the previous screen. When this happens, I can momentarily see the death spike as the player dies even though it shouldnt be there.

Has anywhere observed this type of collision issue, and/or have any idea how to troubleshoot it? I'm assuming there is somewhere the collision table data is not being updated correctly, but I'm not sure how to troubleshoot this.
 

dale_coop

Moderator
Staff member
Yes, it's a know issue :( (also, if you put a solid tile, you will experience the invisible wall issue)..
Sadly, I think you will have to keep that in mind where you design your screens. I didn't see any real/clear fix for that, yet.
 

Dirk

Member
That's too bad. I hopped someone solved it already. This issue keeps me away from really making my game in 4.1.5. At the moment I create it in 4.0 and 4.1.5 and I still prefer the 4.0 version.
I hope someone finds a solution and shares it.
Well, maybe 5.0 solves the issue *fingers crossed*.
 

Dirk

Member
Okay, hmm. I've only encountered it in 4.1.5, but maybe my memory is just faulty.
My main problems are depicted here:

palette_error.png

When I enable scrolling left and right and walk back often the palettes will get messed up.
I know NESmaker is supposed to only scroll left OR right at the moment, but not both.
 

Mugi

Member
the scrolling isnt usable in 2 directions, it was not meant for it and joe himself said that while you CAN enable it, it will not function without significant amount of coding done to the scroll.
jorotroids scroll core (check archive subforum) works in 2 directions if you insist on having that. Alternatively you can dig in and patch it up yourself.

the main culprit that breaks scrolling in the vanilla engine is a function called forcescroll which under certain conditions starts overwriting already good values with bad ones when you change directions at certain points of the nametable.
getting it to cleanly scroll in 2 directions is much less work than it looks like.

i dont really recommend putting much time into it due to all the other inderlying problems the scrolling core has. At the end of the day, you will simply dig yourself deeper into the same rabbit hole i went into, and after 6 months of work
you will have something functional which is practically reprogrammed from scratch.
 

Dirk

Member
Mugi said:
getting it to cleanly scroll in 2 directions is much less work than it looks like.

Hmm, do you mean "much more work"? If not yippee!

Mugi said:
the scrolling isnt usable in 2 directions, it was not meant for it

I know, but it is soo tempting ^^

Mugi said:
jorotroids scroll core (check archive subforum) works in 2 directions if you insist on having that.

Hmm, I thought he didn't finish it or found a or some bugs and wanted to make the core complete before he posts it. I'll have to check it out.


Mugi said:
the main culprit that breaks scrolling in the vanilla engine is a function called forcescroll which under certain conditions starts overwriting already good values with bad ones when you change directions at certain points of the nametable.

Thanks for the insight. When my assembler and NES knowledge is better I'll have a look into that function and get lost in it.

Mugi said:
Alternatively you can dig in and patch it up yourself.

I'll have to learn a lot, before I'll be able to do that :)
 

Mugi

Member
i meant less work. not more.

the main problem is that once you get it to scroll without breaking up you'll notice how the core itself is so heavy that it cant handle scrolling with objects on screen (no matter what you do you will have bad tile loads because it's just not fast enough)
and then you start optimizing it for speed ups and then you notice how you cant because you dont have any space for code anymore and you start optimizing the code to make it smaller and then you start moving stuff in other banks
and writing custom load routines for new stuff in new banks and the list goes on and on.

i have an early verwsion of "my core" that has a full 2 directional scroll that works and it's fast enough to be usable even at the maximum scrolling speed but getting the engine optimized for that takes a lot more than
fixing the scroll engine's bad loads.

simply put, if you really want a 2 directional or 4 directional scrolling, it's not feasible to rig it up from the existing scroll code.
we went that route and in retrospect, it would have been easier to just write it from scratch to begin with, which we ended up doing anyway.
 

Dirk

Member
Mugi said:
i meant less work. not more.

Oh, cool. I thought it would be pretty hard, so now I have hope again ^^

Yes, reading your other posts and posts by Joe you really see that you have to juggle a lot to fit everything in and get it working.
 

slk7

New member
But in my case, I'm only scrolling in 1 direction and only desire to scroll in 1 direction. Are there any offending parts of these functions i can simply disable in this case to alleviate this issue? I am also using the default scrolling speed. I don't need left scrolling or auto scroll to ever work anywhere in my game - so if neither of those two things were a factor it would not harm my game.
 

dale_coop

Moderator
Staff member
Have you tried this:
http://nesmakers.com/viewtopic.php?p=13124#p13124
(I know it's not directly related to your tile glitch issue... but I use this one on all my scrolling projects, and it reduces my scrolling glitches)
 
Top Bottom