Attempting to have 2 way scrolling automatically with edges on a map for my strategy game (4.5.9) (SOLVED)

so I used this camera script in an attempt to have more than one screen in my strategy game (yes I'm back to working on that):


and am having issues with making the left and right edges cooperate as I've brought up before still... got a bit closer though here's a before and after with the issues:

View: https://youtu.be/JhOG9nMXCUw


here's the before & after code in the camera script to check that:

before

LDY #124
LDA (temp16),y
STA ScreenFlags00
+otherScreenFlags
LDY #182
LDA (temp16),y
STA ScreenFlags01
& after

lDA hMapHandler
BEQ +
JMP +otherScreenFlags
+

LDY #124
LDA (temp16),y
STA ScreenFlags00
+otherScreenFlags
LDY #182
LDA (temp16),y
STA ScreenFlags01
the map handler variable is being used to keep track of the direction the cursor is going better

& here's the screen edge reaction to make the cam move left or right:
GetObjectDirection player1_object
CMP #FACE_RIGHT
BEQ +isFacingRight
CMP #FACE_LEFT
BNE +isntFacingLeft
JMP +isFacingLeft
+isntFacingLeft
RTS
+isFacingLeftDuo
JMP +isFacingLeft
+isFacingRight
LDA ScreenFlags00
AND #%00100000
BEQ +isEdgeRight
AND #%11101111
ORA #%00000010
STA ScreenFlags00
LDA #$00
STA hMapHandler
ChangeFacingDirection player1_object, FACE_LEFT
+isEdgeRight
RTS
+isFacingLeft
LDA ScreenFlags00
AND #%00010000
BEQ +endThis
AND #%11011111
ORA #%00000010
STA ScreenFlags00
LDA #$01
STA hMapHandler
ChangeFacingDirection player1_object, FACE_RIGHT
+endThis
RTS
this makes it so that when the player's cursor is moving left it goes left when touching the edge and vice versa for the right
JamesNES has told me before that there is a better way to do this without the ScreenFlags but only told me that... so unfortunately I'm struggling to figure out what he meant
any ideas/advice to help me with this?
 
Okay, so update time
started to toy with the:
and have realized that it goes from
to
through the whole current screen
meaning the method to my understanding can only go right due to this
which also means there is something I'm missing to get the camera to go back with checking variables to have it go back left
still stuck but at least I know the issue...
also tried this but as said above no dice:
LDA ScreenFlags00
AND #%00010000
BNE +isntLeftScreen
LDA camX
CMP #$FF
BNE +distanceReached
JMP +camMovementCheck
+isntLeftScreen
LDA camX
BNE +distanceReached
+camMovementCheck
LDA #$00
STA hMapHandler
LDY #124
LDA (temp16),y
STA ScreenFlags00
+distanceReached

LDA hMapHandler
BEQ +
CMP #$01
BNE ++
JMP +rightautoscroll
JMP +
++
JMP +leftautoscroll
+
 
so I used this camera script in an attempt to have more than one screen in my strategy game (yes I'm back to working on that):


and am having issues with making the left and right edges cooperate as I've brought up before still... got a bit closer though here's a before and after with the issues:

View: https://youtu.be/JhOG9nMXCUw


here's the before & after code in the camera script to check that:

before


& after


the map handler variable is being used to keep track of the direction the cursor is going better

& here's the screen edge reaction to make the cam move left or right:

this makes it so that when the player's cursor is moving left it goes left when touching the edge and vice versa for the right
JamesNES has told me before that there is a better way to do this without the ScreenFlags but only told me that... so unfortunately I'm struggling to figure out what he meant
any ideas/advice to help me with this?
Got it done šŸ˜€
 
Top Bottom