[4.5.9] Simple light-weight Rain

Gator83

New member
This is super cool and so easy to implement. Great work @9Panzer !!!
Yeah Board B! I'm new at this & slowly learning new things, but I watched your tutorial but can't get this to work because I don't want the animated tiles portion. Just want the rain, but I did get slopes to work. Not sure how to make a game timer or if there's one that'll work that's already existing on nesmaker. Or if anyone else would like to assist, more than welcome to do so.
 

baardbi

Well-known member
Yeah Board B! I'm new at this & slowly learning new things, but I watched your tutorial but can't get this to work because I don't want the animated tiles portion. Just want the rain, but I did get slopes to work. Not sure how to make a game timer or if there's one that'll work that's already existing on nesmaker. Or if anyone else would like to assist, more than welcome to do so.
Hey. To make a timer, just make a blank text file called gameTimer.asm and put it in this folder:

NESmaker_4_5_x\GameEngineData\Routines\BASE_4_5\Game\MOD_MetroidVania\Game

Then you go to Project Settings - Script Settings. Scroll down to where it says Game. Select the line that says "Handle Game Timer". In the area on the right you double click BASE_4_5, then do the same with Game, then MOD_MetroidVania, and then finally Game. Your gameTimer.asm file should be there. Just double click it. You have now connected your new timer file to the game timer setup. You don't need to do anymore in that menu. Just click Edit and paste the code from 9Panzer in that file and save it.
 

Gator83

New member
Hey. To make a timer, just make a blank text file called gameTimer.asm and put it in this folder:

NESmaker_4_5_x\GameEngineData\Routines\BASE_4_5\Game\MOD_MetroidVania\Game

Then you go to Project Settings - Script Settings. Scroll down to where it says Game. Select the line that says "Handle Game Timer". In the area on the right you double click BASE_4_5, then do the same with Game, then MOD_MetroidVania, and then finally Game. Your gameTimer.asm file should be there. Just double click it. You have now connected your new timer file to the game timer setup. You don't need to do anymore in that menu. Just click Edit and paste the code from 9Panzer in that file and save it.
Ok, looks like I'm still having some issues getting the rain to work. Where did I go wrong?
 

Attachments

  • Screenshot (1).png
    Screenshot (1).png
    203.6 KB · Views: 11
  • Screenshot (2).png
    Screenshot (2).png
    127.7 KB · Views: 11
  • Screenshot (3).png
    Screenshot (3).png
    127.7 KB · Views: 12
  • Screenshot (4).png
    Screenshot (4).png
    501.2 KB · Views: 12
Will utilizing the users screen bytes stop the"Rain" from showing up on every screen?. Currently using 4.5.9 Adventure module. Would like to to work on giving screens instead of all.
 
Last edited:
Yes it's the purpose of the user screen bytes. You can set it per screen.
So I have light rain on my all my screens regardless of the Screenbyte # i enter, so i added this , But no luck. What em I missing?

LDA ScreenType
CMP #22
BNE +
RTS
+

LDA RainingH
SBC camX ;When Scrolling - to make the rain move correctly
STA temp1
LDA RainingV
STA temp2
DrawSprite temp1, temp2, #111, #%00000001

LDA RainingH
ADC #40
SBC camX ;When Scrolling - to make the rain move correctly
STA temp1
LDA RainingV
ADC #100
STA temp2
DrawSprite temp1, temp2, #111, #%00000001


LDA RainingH
ADC #90
SBC camX ;When Scrolling - to make the rain move correctly
STA temp1
LDA RainingV
ADC #90
STA temp2
DrawSprite temp1, temp2, #111, #%00000001

LDA RainingH
ADC #130
SBC camX ;When Scrolling - to make the rain move correctly
STA temp1
LDA RainingV
ADC #180
STA temp2
DrawSprite temp1, temp2, #111, #%00000001


LDA RainingH
ADC #200
SBC camX ;When Scrolling - to make the rain move correctly
STA temp1
LDA RainingV
ADC #200
STA temp2
DrawSprite temp1, temp2, #111, #%00000001
 

dale_coop

Moderator
Staff member
There is no screenByte in that script.
But I see you use the screenType, that should work too.
Can you explain what you're trying to do? What you would like to do? (and we can adapt the script for your needs).
 
Top Bottom