Reversing the Schmup (Shooter) Scroll Direction

Darien

New member
Does anyone know how I would go about reversing the auto scrolling direction (making it go from right to left instead of left to right) in the Schmup (Shooter) module? Along with that, how would I go about changing the scrolling speed? I’m not very code savvy, so as much explanation as possible would be appreciated.
 
Does anyone know how I would go about reversing the auto scrolling direction (making it go from right to left instead of left to right) in the Schmup (Shooter) module? Along with that, how would I go about changing the scrolling speed? I’m not very code savvy, so as much explanation as possible would be appreciated.
I edited this script to do it as described:

I'd you need help with editing it i can share mine
 

Darien

New member
Ok, I implemented both of those scripts. If I understand correctly, when I turn on Screen Flag 6 and Right Edge for Scroll, it should scroll to the left. However, it does not, it just doesn't scroll at all. I wonder if the fact that the spaceship is still advancing to the right is part of the problem. How would I go about making the spaceship move to the left instead of the right?
 
Ok, I implemented both of those scripts. If I understand correctly, when I turn on Screen Flag 6 and Right Edge for Scroll, it should scroll to the left. However, it does not, it just doesn't scroll at all. I wonder if the fact that the spaceship is still advancing to the right is part of the problem. How would I go about making the spaceship move to the left instead of the right?
As I stated earlier I didn't make the script i edited it... I can share what I did but it won't work exactly the way you want probably do you still want to look at the code?
 

Darien

New member
Sure, I’ll take a look. Would you mind explaining how you change the scrolling speed? I saw in your video that it can be different from screen to screen.
 
Sure, I’ll take a look. Would you mind explaining how you change the scrolling speed? I saw in your video that it can be different from screen to screen.
okay, so how I handled it is like so:
first I added a variable in the Zero Page Ram (doesn't have to be that can also be in user vars):
hMapHandler ;; <-- the variable meaning horizontal map handler
then instead of the ScreenFlag check at the beginning of the script for the camera moving I did this...
Replace:
;now we get the direction. if left edge is checked, we go right. if right edge is checked, we go left.

LDA ScreenFlags00
AND #%00010000
BNE +
JMP +rightautoscroll ; autoscroll right
+
LDA ScreenFlags00
AND #%00100000
BNE +
JMP +leftautoscroll ; autoscroll left
+

RTS
With This:
LDA hMapHandler
BNE +
JMP +distanceNotReached
+
CMP #$01
BNE +isntLeftScreen
LDA camX
CMP #$FF
BEQ +camMovementCheck
JMP +distanceNotReached
+isntLeftScreen
LDA camX
BEQ +camMovementCheck
JMP +distanceNotReached
+camMovementCheck
LDA hMapHandler
CMP #$01
BNE +istLeftUpdate
LDA currentNametable
CLC
ADC #$01
JMP +updateDone
+istLeftUpdate
LDA currentNametable
CLC
SBC #$01
+updateDone
STA currentNametable
LDA currentNametable
LDX player1_object
STA Object_screen,x
LDA #$00
STA hMapHandler
JMP +skipScrolling
+distanceNotReached
LDA hMapHandler
BEQ +skipScrolling
CMP #$02
BEQ +isLeftScroll
JMP +rightautoscroll
+isLeftScroll
JMP +leftautoscroll
+skipScrolling
RTS
and that did it for me... but the way I have all this setup is it's similar to a Zelda screen transition and only horizontally
either way I think if you want the ship to go the other direction with just a button press?
it'd be something like this:
LDA hMapHandler
BNE +goleft ;;; equals zero
JMP +rightautoscroll ; autoscroll right
+goleft
JMP +leftautoscroll ; autoscroll left
and then for the button press to turn your ship around...
LDA hMapHandler
BNE +
DEC hMapHandler
RTS
+
INC hMapHandler
RTS
for your input script to go back and fourth direction wise... hope that helped!
 
Top Bottom