SciNEStist
Well-known member
I havent been able to replicate this ussue yet. have you found any more info?
I have not, I reverted to the regular scrolling handlers for now. It’s really weird how whenever I died it would warp me to the wrong place.I havent been able to replicate this ussue yet. have you found any more info?
My issue was totally unrelated to the newcamerahandler script. It was a mistake on my part.Let me start by saying that I absolutely love the newcamerahandler. It's now part of my default NESmaker setup. But I have a question for you. I am having a problem with screen triggers. They only work on even screens. On odd screens the screen is already triggered when it loads. So screens on the X column (on the map) where X is 3, 5 ,7 etc. do not work. I'm trying to find the culprit, so I was wondering if you have experienced that with this newcamerahandler script?
LDA Object_direction,x
AND #%00000100
CMP #%00000100
BNE +notfacingleft
RTS
+notfacingleft
LEFT_SCROLL_PAD = #$60
LDX player1_object
LDA Object_direction,x
AND #%00000100
BNE +notfacingright
RTS
+notfacingright
LDA Object_x_hi,x
SEC
SBC camX
CMP #LEFT_SCROLL_PAD
BEQ +doActivateScrollByte
BCC +doActivateScrollByte
LDA scrollByte
AND #%00111111
STA scrollByte
RTS
Thank you for try it out and "fix" it. I've updated the post above this with a description for everyone interested in the changes you've made.yes, this is expected behaviour. your character is close to the left side, so the camera moves left to get you into the center area of the screen. (it doesnt care which direction you are moving, it just reads your speed and adjusts its position to keep you in that zone) you can prevent this by setting a left camera edge if you like, but that means you wont be able to move left on purpose either.
Be careful using this code change. When setting the "left edge to scroll" and "right edge to scroll" screen flags, graphic artifacts occur when the player crosses the center line of the screen.Hi @SciNEStist - thank you! This solved some issues, finally.
UPDATE: SciNEStist fixed the following for me yesterday. If someone is interested in the changes, I will add them below.
I've got a video about a behaviour, I don't know if it's normal now:
View: https://www.youtube.com/watch?v=2U0DVbDxZmY
Description:
If the player re-enter a room after loose a life and the warp-in location is near the edge of the screen, the camera is scrolling (recenter the screen/ recenter the player to its normal x-axis position on the screen) in the opposite direction when the player starts walking. It could feel unusual, depends on the game you are making.
Answer:
It is the expected behaviour. If the character is close to the edge of the screen when respawn, the camera will recenter itself while start walking with the character.
Stop the camera recenter while start walking with the character:
The changes are based on the "newcamerahandler.asm" file from the first post (file version: Feb 16, 2023):
Change #1: Below "+doActivateScrollByte" (line 72 add the following 6 lines:
Change #2: Below "+leftscrolling" (original line 90) change the complete part - all above the following "+doActivateScrollByte")
Thanks
I fixed this a while ago: Metroidvania/Shooter scroll fixesBe careful using this code change. When setting the "left edge to scroll" and "right edge to scroll" screen flags, graphic artifacts occur when the player crosses the center line of the screen.View attachment 7283
View attachment 7282
Only with modifications. After I returned the standard code newcamerahandler, these bugs disappeared.is this problem happening with just the modifications mentioned above, or is it happening all the time with the newcamerahandler?
BCS +skipCheckForScrollScreenEdge ;;;;;;Added code for right edge for scroll/right edge for scroll no monster LDA ScreenFlags00 AND #%00001000 ;;;right edge for scroll no monsters screenflag BEQ +skipCheckForScrollScreenEdge JMP noHorizontalCameraUpdate +skipCheckForScrollScreenEdge ;;;;; LDA ScreenFlags00 AND #%00010000 ;;;right edge for scroll screenflag BEQ +skipCheckForScrollScreenEdge JMP noHorizontalCameraUpdate +skipCheckForScrollScreenEdge |
LDA ScreenFlags01
AND #%00010000
BNE +
JMP +leftautoscroll
+
even when on edge and changeLDA ScreenFlags01
AND #%00010000
BNE +
JMP +rightautoscroll
+
RTS
to:LDA ScreenFlags01
AND #%00010000
for this check script on edge...LDA currentBattlefield
BNE +
It does the same thing in the video ↑GetObjectDirection player1_object
CMP #FACE_RIGHT
BNE +goingLeft
ChangeFacingDirection player1_object, #FACE_DOWN
LDA #$01
STA currentBattlefield
JMP +doneHere
+goingLeft
ChangeFacingDirection player1_object, #FACE_DOWN
LDA #$02
STA currentBattlefield
+doneHere