drexegar
Member
UPDATE - I though the vblankTimer was a normal variable it is not... it waits for game code to finish thus creating bugs with the scrolling. PLEASE switch the vblankTimer to custom variable and that will eliminate the bugs of the camera stopping with SLOWdown and making your player disappear from the screen.
WARNING: The default speed is the slowest at 1 pixel per frame which is still to fast. A problem with this edit is when there is too many objects on the screen the scrolling will stop because of this but will resume as the slow down goes away. So use at your own RISK.
Ok so the scrolling speed in the Shooter module is too fast for me, so I spent all night as the novice coder I am to look through the files and found out how to cut the scrolling speed by half with the VblankTimer for a more closer speed of an average shooter like Gradius.
You need to place a few lines of code in these two files:
NESmaker_4_5_6\GameEngineData\Routines\BASE_4_5\Game\MOD_shooter\Subroutines\doUpdateCamera_shooter2.asm
NESmaker_4_5_6\GameEngineData\Routines\BASE_4_5\Game\MOD_shooter\Subroutines\doHandlePhysics_shooter2.asm
STEP 1: doUpdateCamera_shooter2.asm
We need to check Vblank for every other frame to skip the code:
1.This code goes right above the top of the file to check the Vblank:
It should look like this:
All the way in the bottom right before the "RTS" put the skipCamera Label so it will complete the JMP we did earlier.
It should look like this:
Save your file, you can test the game if you want, the background should move HALF SPEED, but the objects will not and will be pushing forward so lets fix that.
STEP 2: doHandlePhysics_shooter2.asm
we are going to do a similar thing this to cut that in half too.
We need to go the skipPhysics: section on line 411 and under the right ScreenFlagscode check after line 415 you can add these 3 lines:
the +skipCamMovement already exist so we are skipping over to that.
So it should look like this:
Save and Test the code and BAM! everything should scroll at half speed with no problems!
Enjoy!
WARNING: The default speed is the slowest at 1 pixel per frame which is still to fast. A problem with this edit is when there is too many objects on the screen the scrolling will stop because of this but will resume as the slow down goes away. So use at your own RISK.
Ok so the scrolling speed in the Shooter module is too fast for me, so I spent all night as the novice coder I am to look through the files and found out how to cut the scrolling speed by half with the VblankTimer for a more closer speed of an average shooter like Gradius.
You need to place a few lines of code in these two files:
NESmaker_4_5_6\GameEngineData\Routines\BASE_4_5\Game\MOD_shooter\Subroutines\doUpdateCamera_shooter2.asm
NESmaker_4_5_6\GameEngineData\Routines\BASE_4_5\Game\MOD_shooter\Subroutines\doHandlePhysics_shooter2.asm
STEP 1: doUpdateCamera_shooter2.asm
We need to check Vblank for every other frame to skip the code:
1.This code goes right above the top of the file to check the Vblank:
Code:
LDA vBlankTimer ;;Loads the vBlankTimer into the Accumalator
AND #%00000001 ;;Checks to see if the number is ODD
BNE doUpdateCamera ;; If Not Equal to ODD number Branch to doUpdateCamera: label
JMP skipCamera ;; skip over all code and jump straight to skipCamera: label
doUpdateCamera:
It should look like this:
All the way in the bottom right before the "RTS" put the skipCamera Label so it will complete the JMP we did earlier.
Code:
skipCamera:
It should look like this:
Save your file, you can test the game if you want, the background should move HALF SPEED, but the objects will not and will be pushing forward so lets fix that.
STEP 2: doHandlePhysics_shooter2.asm
we are going to do a similar thing this to cut that in half too.
We need to go the skipPhysics: section on line 411 and under the right ScreenFlagscode check after line 415 you can add these 3 lines:
Code:
LDA vBlankTimer ;;Loads the vBlankTimer into the Accumalator
AND #%00000001 ;;Checks to see if the number is ODD
BNE +skipCamMovement ;;If Not Equal to ODD number Branch to +skipCamMovement label
the +skipCamMovement already exist so we are skipping over to that.
So it should look like this:
Save and Test the code and BAM! everything should scroll at half speed with no problems!
Enjoy!