Potential Bounds Issues? (4.15)

crazygrouptrio

Active member
[media]https://youtu.be/ug_dDOP5RVs[/media]

There's some strange bugs in my game that may or may not be related to bounds handling. As you can see in the video, the player can pass through bounds fine for awhile, but dropping down seems to cause multiple issues after done so many times (seemingly random, but I can duplicate it happening in the sequence above). Sometimes the player takes damage when passing through the bottom bounds at the top of the next screen, and then eventually the health bar is drawn larger for some reason and text is enabled when pressing the assigned button even when an NPC is not on the screen. These seem like different issues but they all happen together usually at the same time. This usually happens when going down several screens in a row. I know this is a complicated issue and who knows what code is involved, but I can say my bounds scripts are unchanged from what was provided with NESmaker. Just let me know what code you need to see and I will share it. Any help would be appreciated as I have no idea how to fix this. Thanks.
 

dale_coop

Moderator
Staff member
Yeah, that is weird... looks like you're having a collision with a hurting tile ou something else... while your falling down to the next screen.
 

crazygrouptrio

Active member
dale_coop said:
Yeah, that is weird... looks like you're having a collision with a hurting tile ou something else... while your falling down to the next screen.

Yeah, but my game doesn't even have a hurt tile and there's no monsters or anything that would cause damage. And if I start my player on the screen where the glitch happens in the video above it doesn't happen. It's only after dropping 3 or more times that this happens. I'm kind of at a loss :?
 

dale_coop

Moderator
Staff member
Yeah, maybe reading a collision data from another screen (above or... don't know)

Maybe you could try adding some checks in the handle tile collision script to prevent the collisions during screen transitions... like for example, :

Code:
HandleTileCollision:

    LDA update_screen	;; prevent collision during screen transitions ?
    BEQ +
		RTS		;; skip the collisions code
    +
    
    ;; etc

I know there are A LOT of issues with those screen transitions, collision data during those falling... it's the reason in my projects, I always try to not have too long falling moments (when designing the screens)
 

crazygrouptrio

Active member
dale_coop said:
Yeah, maybe reading a collision data from another screen (above or... don't know)

Maybe you could try adding some checks in the handle tile collision script to prevent the collisions during screen transitions... like for example, :

Code:
HandleTileCollision:

    LDA update_screen	;; prevent collision during screen transitions ?
    BEQ +
		RTS		;; skip the collisions code
    +
    
    ;; etc

I know there are A LOT of issues with those screen transitions, collision data during those falling... it's the reason in my projects, I always try to not have too long falling moments (when designing the screens)
Well this fixed the damage issue, but the health bar and text showing up still happens.. I can kind of understand the health bar getting messed up (even tho I can't fix that either) but the text popping up is very strange. I have no idea why that would happen.
I can confirm that it consistently happens when the player goes down 4 screens, regardless of what screen transitions happen in between unless its an Up transition. (for example going down 2, left 1, and down 2; or going down 2, up 1, down 3 and it happens) Is there a negative value somewhere that's getting thrown off by transitioning down that I don't know about?
 

crazygrouptrio

Active member
Okay well I THINK I fixed it. I forgot I had a leftover variable in my bounds code that would get the screen coordinates when transitioning. Even though the variable wasn't attached to anything anymore, removing the AddValue seemed to make the problem go away? It's strange but I'll take it. The only thing I understand is that the Y coordinate started at 6, and going down 4 would make it 10 and that's when it glitched. WHY it would cause all of that is beyond me.
 

dale_coop

Moderator
Staff member
Glad you fixed it ;)

I was really hoping the new version would have fixed all those weird screen transitions issue, but when I play with the current 4.5... I think there might still have those >_<
 
Top Bottom