BinaryLab
New member
Hey everyone!
Palette cycling is such a cool effect, right? You can make waterfalls, lava, and bosses look way more cooler.
Researching the topic a came across this awesome thread with the solution:
http://www.nesmakers.com/index.php?threads/rotating-colors-on-a-sub-palette-for-nesmaker-4-5-6.5760/
Shoutout to everyone involved, @dale_coop, @Artix, @CutterCross, and many others.
Special thanks to @Bucket Mouse for point out that I didn't add the control flags in the zip files.
I thought I could give small contribution as well. I took the part that actually cycles the palette and encapsulated it in a macro, so the code looks cleaner.
Also, I'm attaching an example of game timer, used to call the CyclePalette macro. If this is the first timer you are using, just go to Script Settings and look for "Handle Game Timer" and point it to the file doGamTimers.asm in attachment. You will need to create variable counter in your zero page (mine is called paletteCycleTimer). Read the comments within the code for more information.
Instructions:
Step 1 - Create a variable called paletteCycleTimer on your Zero Page
Step 2 - Place the file doGameTimers.asm in your folder GameEngineData\Routines\BASE_4_5 (any subfolder you like. I use \Custom ). Now, under Project Settings > Script Settings find Game > Handle Game Timers and point it to the doGameTimers.asm. Alternatively, if you're already using timers, just append the contents of doGameTimers.asm to your own timer script.
Step 3 - Rename the User Flags 13 and 14 to something like "Cycle Palette 3" and "Cycle Palette 4". You can, of course, use other flags. Just change the code.
Step 4 - Place the macro CyclePalette.asm in your folder GameEngineData\Routines\BASE_4_5\System\Macros
Step 5 - Under Screen Info, click on "Cycle Palette X" to enable it for a particular screen.
Palette cycling is such a cool effect, right? You can make waterfalls, lava, and bosses look way more cooler.
Researching the topic a came across this awesome thread with the solution:
http://www.nesmakers.com/index.php?threads/rotating-colors-on-a-sub-palette-for-nesmaker-4-5-6.5760/
Shoutout to everyone involved, @dale_coop, @Artix, @CutterCross, and many others.
Special thanks to @Bucket Mouse for point out that I didn't add the control flags in the zip files.
I thought I could give small contribution as well. I took the part that actually cycles the palette and encapsulated it in a macro, so the code looks cleaner.
Also, I'm attaching an example of game timer, used to call the CyclePalette macro. If this is the first timer you are using, just go to Script Settings and look for "Handle Game Timer" and point it to the file doGamTimers.asm in attachment. You will need to create variable counter in your zero page (mine is called paletteCycleTimer). Read the comments within the code for more information.
Instructions:
Step 1 - Create a variable called paletteCycleTimer on your Zero Page
Step 2 - Place the file doGameTimers.asm in your folder GameEngineData\Routines\BASE_4_5 (any subfolder you like. I use \Custom ). Now, under Project Settings > Script Settings find Game > Handle Game Timers and point it to the doGameTimers.asm. Alternatively, if you're already using timers, just append the contents of doGameTimers.asm to your own timer script.
Step 3 - Rename the User Flags 13 and 14 to something like "Cycle Palette 3" and "Cycle Palette 4". You can, of course, use other flags. Just change the code.
Step 4 - Place the macro CyclePalette.asm in your folder GameEngineData\Routines\BASE_4_5\System\Macros
Step 5 - Under Screen Info, click on "Cycle Palette X" to enable it for a particular screen.
Attachments
Last edited: