Because you only need to make a handful of changes to the arcade platform tutorial. I figured I'd write up a quick how-to for anyone interested.
First start a new NESmaker 4.5.6 project. Create Blank Tileset, and select LR_Platformer_BASE_456.mod from the list.
View attachment 3320
Download the
Assets for the Arcade Style Platform Tutorial:
Follow the Arcade Style Platform
Beginner Tutorial.
Import the tilesets, monsters, gameobjects, monsters, palettes, monster palettes, and sound.
Once you have a working single screen platform set up, make sure you have a few screens connected horizontally to scroll through.
View attachment 3324
Now we just need to add the scroll left & scroll right input scripts, you'll find them in the folder: \NESmaker_4_5_6\GameEngineData\Routines\BASE_4_5\Game\MOD_PlatformerBase\Inputs\
View attachment 3325
Add those scripts to the input editor, as hold left and hold right inputs (don't replace the normal move left, and move right, you still need those too).
View attachment 3326
Now we just need to enable scrolling...
Make a copy of the Initialization.asm script here: \NESmaker_4_5_6\GameEngineData\Routines\BASE_4_5\Game\
and give it a unique name like Initialization_LRscroll.asm
Assign this new unique Initialization script under project settings>script settings>Game>Initialize
Open it and around line 87 change this text:
Code:
;LDA #%00110000
LDA #$00
STA scrollTrigger
;;;;; this sets up to ignore "screen edge" behavior
;;;;; for scrolling games.
;;Bit 7 = up
;;Bit 6 = Down
;;Bit 5 = left
;;Bit 4 = right
To this:
Code:
LDA #%00110000
;LDA #$00
STA scrollTrigger
;;;;; this sets up to ignore "screen edge" behavior
;;;;; for scrolling games.
;;Bit 7 = up
;;Bit 6 = Down
;;Bit 5 = left
;;Bit 4 = right
We're uncommenting out the line that sets LRscrolling, and commenting out the line that disables it.
That's it, if you play the game you should have scrolling... except, unless you got a fixed version of the module changed after I'm writing this, you'll only have right scrolling and not left scrolling, which is fine if you want it to work like Super Mario Bros. However, if you want both left & right scrolling, we just need to uncomment out the lines disabling it.
Open the file doUpdateCamera_L2R_PlatformBase.asm.
You'll find it here: \NESmaker_4_5_6\GameEngineData\Routines\BASE_4_5\Game\MOD_PlatformerBase\Subroutines\
At lines 31 - 51 you'll find the left scrolling code disabled:
Code:
; ;; is left camera update
; LDA camX_lo
; sec
; sbc tempA
; STA camX_lo
; LDA camX
; sbc tempB
; STA temp
; BCS +skipCheckForScrollScreenEdge
; LDA ScreenFlags00
; AND #%00100000
; BEQ +skipCheckForScrollScreenEdge
; JMP noHorizontalCameraUpdate
; +skipCheckForScrollScreenEdge
; LDA temp
; STA camX
; LDA camX_hi
; sbc #$00
; STA camX_hi
; JSR getCamSeam
JMP noHorizontalCameraUpdate
Just delete the semi-colon to re-enable left scrolling, like this...
Code:
; ;; is left camera update
LDA camX_lo
sec
sbc tempA
STA camX_lo
LDA camX
sbc tempB
STA temp
BCS +skipCheckForScrollScreenEdge
LDA ScreenFlags00
AND #%00100000
BEQ +skipCheckForScrollScreenEdge
JMP noHorizontalCameraUpdate
+skipCheckForScrollScreenEdge
LDA temp
STA camX
LDA camX_hi
sbc #$00
STA camX_hi
JSR getCamSeam
JMP noHorizontalCameraUpdate
BOOM! Left and Right scrolling should now work.
The only other thing is to tell NESmaker where to stop scrolling. You do this by setting Screen Flags in Screen Info. Set
Left Edge for Scroll flag on the left most screen, and set the
Right Edge for Scroll flag on the right most screen. Leave these flags unchecked for all the screens in between.
View attachment 3327