Add blinking "PRESS START" on the start screen [4.1.X Basic module]

Jonny

Well-known member
Thank you Dale! Got it working on my start screen. The graphics are unfinished (I think I'm going to add Castlevania style movie strip holes)...

Looking forward to trying it out on water / lava / blood bath tiles in game.

https://youtu.be/9P-Hrh8gTzc
 

mouse spirit

Well-known member
I was lookin for snow but this helped me in more ways than one. Thanks dale_coop, works great.

sdfasdg.gif


Im trying to rap my head around making rain or snow specifically with this. I keep drawing a blank. I tried but it looks like crap. It woild be great to see an example as it would be awesome to have rain and snow.

I will also go to ninja gaiden to see what they did there. Such a great nes series.

Also note when using a text box and doing this(atleast when doing all 4 available palletes on a screen) if you end thw text box early it can make the backgrounds tiles now off of the palette swaping and so they are showing now a different loop because they get offset.
 

mouse spirit

Well-known member
Although i sped up the palettes here and am only doin it with palette 3,i didnt change anything else.Imade a specific tile graphic for snowrain.
For when it's snowrain!(cute way to say snow-ing)It should be more seamless but i just did this a second ago.
You can probly tell what i'm goin for with the tile. I tried to make it cascade,the 3colors that are changing, as so to make it look like falling snowrain.
Not rising or sporadic either. I ended up checkin out Shadow of the Ninja for nes,also ninja gaiden but the snow on there is different.(both great games.)
So i slowed down the SOTNinja rom(almost put SOTN ) and concieved how they were doing it. Thanks again dale_coop.


ergtregaq.gif
snowrain.png



And please correct me if im wrong, but since i'm not using a tile hud anymore, can't i start using the fourth sub palette as i wish.
Meaning like i can now dedicate the fourth sub palette in my screens to doing this type of stuff in my screens?


Alot of potential for this code. I tried some stuff here. I was gonna go for a good torch or flame somehow.The grass looks bad but, these are just ideas.
efwf.gif
 

mouse spirit

Well-known member
crazygrouptrio said:
Any chance of getting this to work on scrolling games? The tiles graphics get glitchy and changes palettes for me as the screen scrolls.
I wanted to bump this as maybe someone has an answer and i felt like this may have gotten passed up.
 

crazygrouptrio

Active member
mouse spirit said:
crazygrouptrio said:
Any chance of getting this to work on scrolling games? The tiles graphics get glitchy and changes palettes for me as the screen scrolls.
I wanted to bump this as maybe someone has an answer and i felt like this may have gotten passed up.
It can't be done unfortunately. I know that now :(
 

dale_coop

Moderator
Staff member
I will adapt it, yeah...
But when the definitive 4.5 will be released. (in the current 4.5, the handle game timer is not implemented... so if I code something on it... when the definitive will be out, if the game timer is used, it will be confusing and difficult for a lot of members to use my code... it might break their projects)

But I am pretty sure, when the new 4.5 will be out, this tutorial will be easily adaptable... (because the gametimer variables and screentype variable, ... might be back)
 

offparkway

Active member
That would be great. I want to figure out a way to only use it on specific screens (like the start screen... I use all my color palettes on most other screens).

Looks like new modules will be rolling out over the next week, according to Joes post.
 

mouse spirit

Well-known member
Oh no! This should be original 4.1.5.

Code:
HandleGameTimer:
	DEC gameTimer
	BNE dontUpdateGameTimer
	LDA gameTimerLo
	CLC
	ADC #$01
	STA gameTimerLo
	LDA gameTimerHi
	ADC #$00
	STA gameTimerHi
;;;;;;;;;;;;;;;;;;;;;;;;;;; 
	;; DO WHATEVER READS OF THE GAMETIMER YOU MIGHT WANT HERE.
	JSR DoAlarm
;;;;;;;;;;;;;;;;;;;;;;;;;;;
	LDA #DayNightSpeed
	STA gameTimer
dontUpdateGameTimer:
	RTS
	
DoAlarm:
	
	;;; we're going to edge-load monsters one at a time if they are of edge type and are not active.
	LDX #$00
doLoadMonsterOnTimerLoop:

	LDA edgeLoaderInCue
	BEQ noEdgeMonstersInCue
	LDA currentBank
	STA prevBank
	LDY #$1C ;; data bank
	JSR bankswitchY
	JSR CreateTimedEdgeSpawner
	DEC edgeLoaderInCue
	LDY prevBank
	JSR bankswitchY

noEdgeMonstersInCue
	RTS
 

crazygrouptrio

Active member
Anyone get this working in 4.56? I can get it to cycle to the highest value then it just stops, because the new version apparently doesn't know what STY means near the end of the script.
 

voltopt

Member
From Dale, this will compile -

Code:
	TYA
    STA bckPal+3,x		;; move pocket (y) to 3


instead of STY. By the way, how did you get this to load? I'm working on palette cycling in the game timer and having trouble with some of the new variables/instructions
 

crazygrouptrio

Active member
voltopt said:
From Dale, this will compile -

Code:
	TYA
    STA bckPal+3,x		;; move pocket (y) to 3


instead of STY. By the way, how did you get this to load? I'm working on palette cycling in the game timer and having trouble with some of the new variables/instructions

Hey it works! Awesome thank you. I just changed "updatePalettes" to "updateScreenData" But here is my script just in case.
Code:
;;; handle game timer.
JSR handlePaletteCycleTimer
	LDA gameTimerTicks
	CLC
	ADC #$01 ;; change this to how fast you want the timer to run.
	STA gameTimerTicks
	LDA gameTimerLo
	ADC #$00
	STA gameTimerLo
	LDA gameTimerHi
	ADC #$00
	STA gameTimerHi
	JMP ++
	
handlePaletteCycleTimer:
	;WE DONT USE SPECIAL SCREENS ANYMORE
	
	;; Pal cycling on "Medium"-speed screens :
	LDA screenSpeed
	CMP #$01
	BEQ doPaletteCycleTimer

	;; another example, Pal cycling on screen type 255 screens :
	;LDA screenType
	;CMP #255
	;BEQ doPaletteCycleTimer

	
	JMP endPaletteCycleTimer
doPaletteCycleTimer: 
    ;; from here, DO the palette cycle:
    LDA palettesCycleTimer
    BNE dontUpdatePaletteCycleTimer
    JSR pickPaletteToCycle
    LDA #$10  			;; HERE !!! the SPEED of the cycling
    STA palettesCycleTimer
dontUpdatePaletteCycleTimer:
    DEC palettesCycleTimer
endPaletteCycleTimer:
    RTS    
pickPaletteToCycle:
    LDA #$02    		;; HERE !!! the "Sub 3" palette
    ASL
    ASL 				;; these multiply your literal or variable with 4 so we can get the right offset for each palette in increments of 4.
    TAX
    LDY bckPal+1,x		;; pocket colour 1 in reg y
    LDA bckPal+2,x 
    STA bckPal+1,x		;; move colour 2 to 1
    LDA bckPal+3,x 
    STA bckPal+2,x		;; move colour 3 to 2
	TYA
    STA bckPal+3,x	;; move pocket (y) to 3
	
    LDA #$01
    STA updateScreenData	;; loading anything but zero into this value tells NESmaker it needs to update palettes.
    RTS
This is working in the Arcade/Platformer module. I believe some modules handle the timer differently or not at all, but I could be wrong.
 

voltopt

Member
Allright, the reason I haven't gotten this to work yet in Adventure is this gameTimer script doesn't work with that module, yet. It basically locks up on the title screen.
 

voltopt

Member
I tested this on the arcade platform tutorial, and also on my adventure game and one-way scroll platformer, all in 4.5.6, and it locks up on each! I have the user variable created, set to 0, and the code crazygrouptrio posted. Frustrating!
 
Top Bottom