Lord_Klump_Of_Kongo_Bongo
Active member
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
& here's the screen edge reaction to make the cam move left or 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?
Let's improve scrolling together! [4.5.9] (dohandlecamera updates/fixes)
DOWNLOAD HERE I've been working on my own game and thought that people might benefit from a few tweaks/changes I've made to the doUpdateCamera script. (the script that handles all scrolling) Below is a version of the script that I've modified mostly by copy/pasting from other peoples tweaks...
www.nesmakers.com
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:
here's the before & after code in the camera script to check that:
before
& afterLDY #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 betterlDA hMapHandler
BEQ +
JMP +otherScreenFlags
+
LDY #124
LDA (temp16),y
STA ScreenFlags00
+otherScreenFlags
LDY #182
LDA (temp16),y
STA ScreenFlags01
& 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 rightGetObjectDirection 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
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?